Select to view content in your preferred language

Pop-up content displaying in a new tab

1664
6
02-08-2014 04:23 AM
DilsonKitoko
Emerging Contributor
Hi All,

I have a issue with my webapp.

When I click to display the photos, its does not appear, but when you click the link opens correctly in a new tab.

In my application u just see a empty pop-up. I want the photo to load inside of a pop-up, not in a new tab. I added a attachment with the view of pop-up.

Here is my xml file:

<?xml version="1.0" ?>

<configuration>

<title> {ID}</title>
<description>
<![CDATA[<p align='justify'> <b>{CODE}</b>, {SOURCE_DIG} <b>{TIME_}</b>.</p>]]>
</description>

<medias>
<media type="image"

imagelink="{PHOTO}"
imagesource="{PHOTO}"/>

</medias>

</configuration>

The field "PHOTO" is where my photos are stored (UNC path). I appreciate any help to point me to the right direction.

Thanks,

Dimba
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Dilson,

    Though you can get UNC paths to work you really should setup a virtual directory so that instead you can use a proper url for the photo in that field.

Can you provide an example of what one of your actual PHOTO paths looks like?
0 Kudos
DilsonKitoko
Emerging Contributor
Hi Robert,

Thanks for your prompt reply. My path looks like this "\\my-server\myfolder\project\file.jpg " I also tried to used a path like
F:\myfolder\project\file.jpg, but get the same result. Im working on top of apache server.

Regards
0 Kudos
DilsonKitoko
Emerging Contributor
Dilson,

    Though you can get UNC paths to work you really should setup a virtual directory so that instead you can use a proper url for the photo in that field.

Can you provide an example of what one of your actual PHOTO paths looks like?




Robert,

I was asking myself if my xml isn't missing some tag, to display or load emebebed image.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dilson,

   The only thing I see that is missing from the XML is the fields list. Here is an example I have working on my end. The BIG difference to note is I am using a virtual directory to gain a TRUE url. Using UNC paths or file paths is possible but different based on the browser. Firefox for example needs /// in the path "file:///c:/Assets/images/IMG_3663.jpg" where other browsers do not. This is why it is ill advised to use actual file paths or UNC path when in a web browser solution like Flex.

<?xml version="1.0" ?>
<configuration>
    <title>{NAME}</title>
    <description>
        <=!=[=C=D=A=T=A=[<p><b>Parcel Address: </b>{ADDRESS_3}</p><p><b>Owner Name: </b>{NAME}</p><p><b>Parcel Number: </b>{PARCEL_NUMBER}</p>]=]=>
    </description>
    <fields>
        <field name="ADDRESS_3" visible="false"/>
        <field name="NAME" visible="false"/>
        <field name="PARCEL_NUMBER" visible="false"/>
        <field name="URL" visible="false"/>
    </fields>
    <medias>
        <media type="image" caption="Image PPIN {PPIN}" imagesource="http://gislap183/Assets/Images/{URL}" imagelink="http://gislap183/Assets/Images/{URL}"/>
    </medias>
</configuration>


Here is a link to setting up a virtual directory on Apache:

http://w3shaman.com/article/creating-virtual-directory-apache
0 Kudos
DilsonKitoko
Emerging Contributor
Dilson,

   The only thing I see that is missing from the XML is the fields list. Here is an example I have working on my end. The BIG difference to note is I am using a virtual directory to gain a TRUE url. Using UNC paths or file paths is possible but different based on the browser. Firefox for example needs /// in the path "file:///c:/Assets/images/IMG_3663.jpg" where other browsers do not. This is why it is ill advised to use actual file paths or UNC path when in a web browser solution like Flex.

<?xml version="1.0" ?>
<configuration>
    <title>{NAME}</title>
    <description>
        <=!=[=C=D=A=T=A=[<p><b>Parcel Address: </b>{ADDRESS_3}</p><p><b>Owner Name: </b>{NAME}</p><p><b>Parcel Number: </b>{PARCEL_NUMBER}</p>]=]=>
    </description>
    <fields>
        <field name="ADDRESS_3" visible="false"/>
        <field name="NAME" visible="false"/>
        <field name="PARCEL_NUMBER" visible="false"/>
        <field name="URL" visible="false"/>
    </fields>
    <medias>
        <media type="image" caption="Image PPIN {PPIN}" imagesource="http://gislap183/Assets/Images/{URL}" imagelink="http://gislap183/Assets/Images/{URL}"/>
    </medias>
</configuration>


Here is a link to setting up a virtual directory on Apache:

http://w3shaman.com/article/creating-virtual-directory-apache



Robert,

Looking at your code, i can see that you use a path instead of just the field name on image source and imagelink, can ask why? When you use the path in your code, how your attribute table looks like?(''filename.jpg")

Also, what the tag caption="Image PPIN {PPIN}"  does mean on your code?

Sorry if I am asking so many question.

I will take a look on link that you sent.

Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dilson,

   In my feature data I chose not to waste space with the whole path of the file, so I just store the actual file name (abc.jpg). You can discover the details of the caption attribute in the documentation here (at the bottom of the page where it discusses medias):

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Pop_up_configuration_files/01m3...
0 Kudos