Select to view content in your preferred language

Links in Popop

605
3
10-16-2012 06:59 AM
NasifAlshaier
Deactivated User
Hello Team

I have the following xml popup file:
===========================================================
<?xml version="1.0" ?>
<configuration>
    <title>{NAME}</title>
    <precision> </precision>
     <description>
    <![CDATA[<b>Name:</b>{NAME}<br><br><b>Type:</b> {TYPE}<br><br><a href='../survey/images/{DATA_SRCE}' target='_blank'>Click Here to View County Data Sheet</a><br>]]>
    <![CDATA[<br><a href='{DATA_SRCE}' target='_blank'>Click Here to View NGS Data Sheet</a>]]>
     </description>
    <fields>
       <field name="NAME"/>
        <field name="TYPE"/> 
    </fields>
    <showattachments>true</showattachments>
</configuration>
===============================================

I would like to display only one link instead of two and it will depends on the value of the "Name" field.. any feedback is appreciated.

Thanks
Tags (2)
0 Kudos
3 Replies
AnthonyGiles
Honored Contributor
Nasif,

Remove one of your CDATA tags and place name in the href area:


<?xml version="1.0" ?>
<configuration>
<title>{NAME}</title>
<precision> </precision>
<description>
<![CDATA[<a href='{NAME}' target='_blank'>Click Here</a>]]>
</description>
<fields>
<field name="NAME"/>
<field name="TYPE"/>
</fields>
<showattachments>true</showattachments>
</configuration>

Regards

Anthony
0 Kudos
NasifAlshaier
Deactivated User
Hi Anthony..

thank you for your reply. I attached a file explaining the issue more in detail.

thanks
0 Kudos
AnthonyGiles
Honored Contributor
Nasif,

Ok I see what you are trying to do my misunderstanding. The problem your are going to have is I don't think you can use scripting (i.e. JavaScript) inside the CDATA in the config file so you have no way creating a conditional statement on the value of the name field.

I would say this cannot be achieved using the popup config files, unless anyone out there can has got scripting to work in the popup config?

Sorry

Anthony
0 Kudos