Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:26

Escaping characters in a link problem..


Poster: Shap5202
Dated: Friday November 4 2005 - 17:19:54 GMT

So i have a link that looks like

Code:
aI("url=javascript:gotoUrl('somepage.jsp?absolutePath=C:\\workspace\\myfile.dat&lastModified=11/3/2005');text=Go;closeonclick=1;");


the gotoUrl method is just something that detects double-clicks and such to make sure only the first request is handled

however, when the link is clicked... the value that gets passed to the method is
'somepage.jsp?absolutePath=C:workspaceestfile.dat&lastModified=11/3/2005'

and it loses the correct path. I put a temp fix in to just convert any \\'s into a / and it will still work. But was just wondering if it is something the menu is doing funky, or just (my) javascript.


Poster: Ruth
Dated: Friday November 4 2005 - 20:15:58 GMT

Hi,

I just tried your posted aI, but of course all I get is an error since I don't have the gotoUrl part. I note, and just figured it was a 'typo', that you don't have a closing ' or ) after the 2005, which is also an error I get.

Ruth


Poster: Shap5202
Dated: Friday November 4 2005 - 20:19:18 GMT

yes, you're right, that was a typo... fixed it above..

if you wanted to try it out.. for simplitity's sake, here's the goto method

Code:

function gotoUrl(url){
    location.href = url;
}


thanks for the help


Poster: Ruth
Dated: Friday November 4 2005 - 22:51:47 GMT

I can try it, but I can't help on this because I really don't know what it is you're asking. I know that you use backquotes to escape characters in an aI string ` but I don't know if that's what you mean. Sorry, I don't do js or functions.

Ruth