nkamp
05-15-2006, 10:03 AM
Hello,
I have a URL with variable where in the & character is used (noord & oost). But the browser thinks that this is starting a new variable. Now I want to encode this variable.
.Write "openModalWin('info_popup_print_antemortem.asp?PROC_ID=" & Session("PROC_id") & "&BDRE_id=" & Session("BDRE_id") &"'+ExtraString, 0.95*screen.availWidth,0.95*screen.availHeight, 'yes');" & vbcrlf
In the javascript variable ExtraString are URL variables invoked.
Now I have three things:
1.
.Write "ExtraString = encodeURIComponent(ExtraString);" & vbCrLf
The URL is encoded but in the opened file the variable cannot be used anymore because the browser see it now as one variable
2. Mixing ASP en JS
I have tried to use & Server.URLEncode("%>+ExtraString+<% & ... But this is not working. Is this possible
3.
How to decode the URL? I have already the code where I have Request("URLvar") but I don't want to change every line of code like:
Request(decodeURIComponent("URLvar"). Is it possible that I decode my URL without the need to change the rest of my code?
Thanks in advance.
Nico
I have a URL with variable where in the & character is used (noord & oost). But the browser thinks that this is starting a new variable. Now I want to encode this variable.
.Write "openModalWin('info_popup_print_antemortem.asp?PROC_ID=" & Session("PROC_id") & "&BDRE_id=" & Session("BDRE_id") &"'+ExtraString, 0.95*screen.availWidth,0.95*screen.availHeight, 'yes');" & vbcrlf
In the javascript variable ExtraString are URL variables invoked.
Now I have three things:
1.
.Write "ExtraString = encodeURIComponent(ExtraString);" & vbCrLf
The URL is encoded but in the opened file the variable cannot be used anymore because the browser see it now as one variable
2. Mixing ASP en JS
I have tried to use & Server.URLEncode("%>+ExtraString+<% & ... But this is not working. Is this possible
3.
How to decode the URL? I have already the code where I have Request("URLvar") but I don't want to change every line of code like:
Request(decodeURIComponent("URLvar"). Is it possible that I decode my URL without the need to change the rest of my code?
Thanks in advance.
Nico