Escaping characters in a link problem..

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Shap5202
Super Advanced
Super Advanced
Posts: 62
Joined: Thu Sep 29, 2005 2:36 pm

Escaping characters in a link problem..

Post by Shap5202 »

So i have a link that looks like

Code: Select all

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.
Last edited by Shap5202 on Fri Nov 04, 2005 9:17 pm, edited 1 time in total.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
Shap5202
Super Advanced
Super Advanced
Posts: 62
Joined: Thu Sep 29, 2005 2:36 pm

Post by Shap5202 »

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: Select all


function gotoUrl(url){
    location.href = url;
}
thanks for the help
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
Post Reply