Select to view content in your preferred language

Open URL Link in New Window (width = 450 height = 600)

1763
8
Jump to solution
09-11-2012 01:35 AM
EdinZametica
Emerging Contributor
Dear Friends,
I use ArcGIS ArcGISViewerForFlex-flexviewer-3.0-src and FlashBuilder 4.6

- I have created a popup and added the URL link that works and everything is OK, but I want to open a link in a new window, measuring width = 450 height = 600th
PopUp.xml

[PHP]<?xml version="1.0" ?>
<configuration>
    <title>{NAZIV}</title>
    <description><![CDATA[<a href="http://my_srv/bsce_gis/bsc_ericsson.aspx?GID={GID}" <b>Podaci o saobra??aju na BS</b> <img src="assets/images/i_saobracaj.png" height="20" width="20"/></a>]]></description>
</configuration>[/PHP]

- Same URL link I created on eSearch widget, and I want it to open in a new window size, width = 450 height = 600

eSearchWidget.xml

[PHP]...
<links>
   <link alias="Podaci o saobra??aju na BS">
     <![CDATA[http://my_srv/bsce_gis/bsc_ericsson.aspx?GID={GID}]]>
     <icon><![CDATA[assets/images/i_saobracaj.png]]></icon>    
    </link>
   </links>
   <zoomscale>25000</zoomscale>
   <autoopendatagrid>true</autoopendatagrid>
...[/PHP]

Thanks in advance for your answers, I need your help ...

The attached three pictures:
Link_PopUp.jpg - looks like PopUp
Link_eSearch.jpg-looks like eSearch
It-should-look-like-this.jpg - I would like to open links in new window!!!

Regards
Edin Z.
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: rscheitlin

Edin,

   Sure just comment out the code where the html anchor is added to the description text in the link for loop in the configurePopUpInfo of the eSearchWidget.mxml

View solution in original post

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus
Edin,

   Your Desire to have the new window open at a particular size is not supported in the eSearch Widget out of the box. It would require you to modify all the different source files that invoke the showLink function. You can find some code for opening the window a particular size in this thread I answered a couple of years ago:

http://forums.esri.com/Thread.asp?c=158&f=2421&t=295861

You will have to update the showLink function in the SearchResultItemRenderer.mxml. The lblData_clickHandler function in the HyperLinkColumn.mxml. The hyperIcon_clickHandler in the hyperIcon_clickHandler.mxml. Doing this for the PopUp, you are on your own as I don't have time to dive into all that needs to be done there.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
by Anonymous User
Not applicable
Original User: edin.zametica

Robert,

Thanks for your prompt response.
With your instructions I have made changes to

SearchResultItemRenderer.mxml
private function showLink(event:MouseEvent):void
            {
    event.stopImmediatePropagation(); // don't dispatch ID_RESULT_CLICK since we don't want to zoom to feature
    //navigateToURL(new URLRequest(event.currentTarget.name));
    var feats:String = "scrollbars=1,width=950,height=650"
    ExternalInterface.call("window.open", event.currentTarget.name, "_blank" , feats);
            }


HyperLinkColumn.mxml
protected function lblData_clickHandler(event:MouseEvent):void
   {
    u = new URLRequest(data[column.dataField]);
    //navigateToURL(u);    
    var feats:String = "scrollbars=1,width=950,height=650"
    ExternalInterface.call("window.open", u, "_blank" , feats);
   }


HyperLinkIconColumn.mxml
protected function hyperIcon_clickHandler(event:MouseEvent):void
   {
    if(data[column.dataField] == "defined"){
     return;
    }
    u = new URLRequest(data[column.dataField]);
    //navigateToURL(u);    
    var feats:String = "scrollbars=1,width=950,height=650"
    ExternalInterface.call("window.open", u, "_blank" , feats);
   }

Open the link in a new window on the results works great, but not functional in the window that appears beside the point.
I probably made �??�??a mistake somewhere!!!
Picture attached perhaps speaks more...

P.S.
To modify PopUp'll try to find me, Respect for All...

Edin Z.
0 Kudos
EdinZametica
Emerging Contributor
Robert,
I solved the problem with the popup, I just installed the Attachment Relate Info Window Widget by Robert Scheitlin.
I have implemented a URL link and configured to open in a new window  width = 950 height = 650.

AttRelateInfoWinWidget.mxml
//show link
   private function showLink(event:Event):void
   {
    //event.currentTarget.name
    //navigateToURL(new URLRequest(event.currentTarget.name));
    var feats:String = "scrollbars=1,width=950,height=650"
    ExternalInterface.call("window.open", event.currentTarget.name, "_blank" , feats);


Robert, I have still a problem with eSearch InfoWindow, URL link still opens up a whole new window.
If you have the time just me specify where to correct the code or how do I take the URL link from eSearch InfoWindow.
Thanks....

Best Regards
Edin Z.
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Edin,

   I have already spend a good deal of time looking into this with no success. The eSearch uses a popup and the link is added to the popup as an html anchor in the popups text. The fact that it is an html anchor is the big issue as you can not just do the fix as I recommended for the others.
0 Kudos
EdinZametica
Emerging Contributor
Robert,
Sorry if I caused the loss of time.
Is it possible to hide (not display) link to InfoWin eSearch widget???
Please to answer if you do not take a lot of time!

Regards,
Edin Z
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Edin,

   Sure just comment out the code where the html anchor is added to the description text in the link for loop in the configurePopUpInfo of the eSearchWidget.mxml
0 Kudos
EdinZametica
Emerging Contributor
Robert,
Thanks, that's it ...
R E S P E C T . . .

Regards,
Edin Z.
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Edin,

   See this thread as I have now found a way to do this.

http://forums.arcgis.com/threads/73109-Flexviewer-popup-javascript-window.open?highlight=window.open
0 Kudos