Hi
I'm not quite good in JS, so I need a little help.
I am using the menu and most of the menu items are linking to another domain like http://www.xyz.com/<different sites>.
Currently, I am writing this url hard-coded in each menu link, but I would prefer to write it in a JavaScript variable in one of the first lines and use it then
<a href="variable+\"/site1.htm\" "
or similar.
As you see, I don't even know in which of the both files I have to declare the variable und also not the correct syntax to use this variable in the links.
Maybe someone can help me ??
Thanks in advance
Thomas
Using a variable for always the same url in Links
You need to set the variable in the top of your menu_data file. Something like...
var urlString = "www.something.com";
and then in your menu item code you need to swap this in...I am fading on the v3 syntax but it might be somethng like....
,,,"","",,,"http://" + urlString + "/somepage.html","","",,,,,"",1
Essentially you need to take the String where you were declaring your url cut out a chunk of it and put in " + var + ". Get what I am saying. Sorry I am so vague, I pulled an all nighter last night, got a project due friday at midnight so I am alittle out of it.
var urlString = "www.something.com";
and then in your menu item code you need to swap this in...I am fading on the v3 syntax but it might be somethng like....
,,,"","",,,"http://" + urlString + "/somepage.html","","",,,,,"",1
Essentially you need to take the String where you were declaring your url cut out a chunk of it and put in " + var + ". Get what I am saying. Sorry I am so vague, I pulled an all nighter last night, got a project due friday at midnight so I am alittle out of it.
Dave Hergert
Software Engineer
"Helping to make the menu better, one at a time."
Software Engineer
"Helping to make the menu better, one at a time."