Would like to open a single "web page" from a link in a popup w/o opening new windows

1865
9
Jump to solution
11-19-2013 01:38 PM
JohnLeon
New Contributor III
Ok... so this is my first post so here goes. I'm currently using FlexViewer 3.4 and FlashBuilder 4.6.

I'm using "popups" for property information when a user selects a parcel. For this purpose, I have an Assessor Parcel Number and a link to a property report. Unfortunately, the link on the popup creates "new" web browser windows after clicking on the property report link when switching from parcel to parcel.

Attached is a screenshot of the popup.

This is the code for the popup xml file.

~~~~~~~~~~~~~~~~~~~~~~~~~

<?xml version="1.0" ?>
<configuration>
<title>APN {APN}</title>
<description>
<![CDATA[
<font color="#ffd700"><b>{OWNER_NAME}</b></font>
<a HREF="http://myserver/prop/report.cfm?key={APN}" TARGET="PropInfo">View Property Report</a>
]]>
</description>
<showattachments>true</showattachments>
</configuration>
~~~~~~~~~~~~~~~~~~~~~~~~~

Do I need to modify the InfoPopup.mxml file for this action to work properly with popups. If so, what is the tweak?

In fact, the "MySplash" widget by Robert Scheitlin works beautifully. I have links using a named target and they work just fine. The named targeted links all go to a single web page without opening new ones.

Any help would be appreciated!

Thanks in advance...
John
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DasaPaddock
Esri Regular Contributor
This fix is also included in version 3.6 which is due to be released by early next week.

View solution in original post

0 Kudos
9 Replies
DasaPaddock
Esri Regular Contributor
Try changing this line in PopUpRendererSkin.mxml:

From:
if (linkElement && linkElement.target != "_blank")


To:
if (linkElement && linkElement.target == "_self")
0 Kudos
JohnLeon
New Contributor III
Hi Dasa

Any thoughts how this would be done within the Flex Viewer code not the Flex API code?

I tried adding the PopUpRendererSkin.mxml file from the API code to the Flex Viewer code.  I've tried several attempts but to no avail.  Am I missing any other files to bring over as well?

Thanks in advance!
John
0 Kudos
AnthonyGiles
Frequent Contributor
John,

If you copy the ags folder from src/com/esri in the API download to src/com/esri in your viewer code this should work.

Regards

Anthony
0 Kudos
JohnLeon
New Contributor III
Hi Anthony,

I copied the ags folder and its subdirs according to your recommendation.  Recompiled with the code recommendation from Dasa and still a no go.  I've attached a several screen shots for popup xml target code, DASA code change and file location in the directory path.

Do you see anything in the wrong place or coded incorrectly?  Again much appreciated.

Thanks,
John
0 Kudos
MayJeff
Occasional Contributor
I  used PopUpRendereSkin.mxml and put under com.esri.viewer\skins.  You can use different name if you prefer.
0 Kudos
AnthonyGiles
Frequent Contributor
John,

I can see by your screenshot from flash builder you have errors in your project (denoted by the red crosses). Are you sure your API version matches the viewer version being used? (i.e. 3.4 Api with 3.4 of the viewer). Flash builder will not compile with errors present.

Regards

Anthony
0 Kudos
DasaPaddock
Esri Regular Contributor
This fix is also included in version 3.6 which is due to be released by early next week.
0 Kudos
JohnLeon
New Contributor III
Hi everyone,

Thank you for all of your assistance on this, it is very much appreciated!

MayMay - In fact, I tried that early on and it was a no go.

Anthony - I moved the ags/"skins" directory and its subdirs under the "com.esri" directory and the errors went away. I recompiled but to no avail. See my attached screen shot of the correction if you don't mind.

Dasa - It seems like such a minor code change and it's frustrating that I can't make it happen.

Even with all of the guidance from everyone, I don't want to waste any more of your time on this. I really tried to research this issue on my own before posting here. Great to hear this is fixed in the next release. I'll deal with it then.

Thanks,
John
0 Kudos
JohnLeon
New Contributor III
Hi Dasa,

I just downloaded 3.6 and did a quick test.  It works great!!!  Many thanks to you and the entire ESRI Flex team!

Cheers,
John
0 Kudos