Check if File in onclick is Valid

  • Hello,

    I'm trying to create an action/if condition in my 'vtourskin.xml' to check if the url in my onclick attribute for a plugin is valid. If it is not valid, I want to set the plugin be hidden (visible == false)

    Here is my plugin:

    Code
    <plugin name="download" type="image" style="skin_base|skin_glow" visible="true" title="click to download" scale="0.85" url="../skin/download.png" align="right" x="130" y="0" keep="true" onclick="openurl('downloads/regalia_gear.zip');" />

    And my current action:

    Code
    if(  plugin[download].onclick == null, set(plugin[download].visible, false),	 set(plugin[download].visible, true);	);

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!