I have a variable that is in my javascript code. I would like to create a url with variables from javascript to pass to another page. Example: http://www.bla.com/test.aspx?var1="jsvar1"&var2="jsvar2" etc. What would be the best way of doing this?
hmm, i dont fully understand but if you use the js for redirection you can probably use window.location ="yourintendedpage.htm?jsvar="+jsVarValue+"&jsvar2="+jsvar2Value and so on...
I'm trying to compose the following url <a href=http://www.bla.com/test.aspx?var1="jsvar1"&var2="jsvar2"onclick="hidePopupMenu();">Mark</a>
As said earlier, to concatenate strings in javascript you must use + (plus sign). Just like you do it with a . (dot) in PHP. So, your code will have to be: <a href=http://www.bla.com/test.aspx?var1="+jsvar1+"&var2="+jsvar2+" onclick="hidePopupMenu();">Mark</a> Code (markup):