PDA

View Full Version : URL Link to XML File


Hioncc
09-20-2009, 07:15 PM
Hello,
I have recently purchased a .SWF navigation bar type thing for my website and all is working smoothly. However I wish to add it so that when you click you go to the relevant link, below is the original .xml (tried to add google.com link so ignore that).

<?xml version="1.0" encoding="UTF-8"?>
<MENU itemSpace="20" backgroundColor="0x000000" percentSize="100">
<ITEM iconType="1" separator="true" separatorWidth="80" separatorHeight="1" separatorX="0" separatorY="10" separatorColor="0x999999" separatorAlpha="-200">
<LABEL up="Home" over="" out="" press="" down=""/>
<LABELCOLORS up="0x999999" over="0xffffff" out="0xffffff" press="0x000000" down="0xff0000"/>
<GLOWCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<MIRRORCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<ONCLICK action="getURL" parameters="javascript:ajaxpage('http://www.google.com', 'bottom');"/>
</ITEM>
<ITEM iconType="1" separator="true" separatorWidth="80" separatorHeight="1" separatorX="0" separatorY="10" separatorColor="0x999999" separatorAlpha="-200">
<LABEL up="Specials" over="" out="" press="" down=""/>
<LABELCOLORS up="0x999999" over="0xffffff" out="0xffffff" press="0x000000" down="0xff0000"/>
<GLOWCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<MIRRORCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<ONCLICK action="getURL" parameters="javascript:ajaxpage('ajaxfiles/external2.htm', 'bottom');"/>
</ITEM>
<ITEM iconType="1" separator="true" separatorWidth="80" separatorHeight="1" separatorX="0" separatorY="10" separatorColor="0x999999" separatorAlpha="-200">
<LABEL up="Services" over="" out="" press="" down=""/>
<LABELCOLORS up="0x999999" over="0xffffff" out="0xffffff" press="0x000000" down="0xff0000"/>
<GLOWCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<MIRRORCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<ONCLICK action="getURL" parameters="javascript:ajaxpage('ajaxfiles/external3.htm', 'bottom');"/>
</ITEM>
<ITEM iconType="1" separator="true" separatorWidth="80" separatorHeight="1" separatorX="0" separatorY="10" separatorColor="0x999999" separatorAlpha="-200">
<LABEL up="Portfolio" over="" out="" press="" down=""/>
<LABELCOLORS up="0x999999" over="0xffffff" out="0xffffff" press="0x000000" down="0xff0000"/>
<GLOWCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<MIRRORCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<ONCLICK action="getURL" parameters="javascript:ajaxpage('ajaxfiles/external.htm', 'bottom');"/>
</ITEM>
<ITEM iconType="1" separator="true" separatorWidth="80" separatorHeight="1" separatorX="0" separatorY="10" separatorColor="0x999999" separatorAlpha="-200">
<LABEL up="Contact" over="" out="" press="" down=""/>
<LABELCOLORS up="0x999999" over="0xffffff" out="0xffffff" press="0x000000" down="0xff0000"/>
<GLOWCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<MIRRORCOLORS over="0xffffff" out="0xffffff" press="0xbb0000" down="0xbb0000"/>
<ONCLICK action="getURL" parameters="javascript:ajaxpage('ajaxfiles/external2.htm', 'bottom');"/>
</ITEM>

</MENU>

Can see you must have to change:
<ONCLICK action="getURL" parameters="javascript:ajaxpage('ajaxfiles/external3.htm', 'bottom');"/>
Somehow but i'm unsure how.

Any help is appreciated.

Regards
Tom

orca8767
09-21-2009, 01:36 AM
Try
<ONCLICK action="getURL" parameters="javascript:window.location='blah.html';"/>

You change the string after window.location=

gisvimhud
09-25-2009, 09:06 AM
Great post! It's very nice and userful.
Thank you so much for your post.
__________________
Simulation pret immobilier | Taux credit immobilier de France | Calcul de financement par courtier (http://simulationdecreditimmobilier.org)

Hioncc
09-27-2009, 08:34 PM
Try
<ONCLICK action="getURL" parameters="javascript:window.location='blah.html';"/>

You change the string after window.location=

Hello,
Thank you it works however it will only redirect to *.html links and not to *.php links. Is there anyway to change this, excluding making a html redirect page?

Kindest Regards
Tom

orca8767
10-15-2009, 01:54 PM
I don't see why it wouldn't work with .php...

Just change the extension at the end.
If it refuses to work, try using ModRewrite to rewrite .html to .php in the URLs.

.htaccess:
RewriteEngine On
RewriteBase /

RewriteRule ^([A-Za-z0-9_]+)\.html$ $1.php