Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Escape Sequence?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3059
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Escape Sequence?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Escape Sequence? - 5/19/2005 7:05:27 AM   
  bigairguy

 

Posts: 1
Score: 0
Joined: 5/19/2005
From:
Status: offline
I have a webform with data that is passed to a popup window through a querystring. The popup window just displays the data from the original page in a printer-friendly format. However, the javascript will not execute to open the popup window if there are any data fields that have special characters such as ',?,!, etc. Based on research, I think that I need to pass an escape sequence to the querystring that will replace the special characters. I am trying to do one for an ampersand with the following code:

<script language="JavaScript" type="text/javascript" src="lib_popup.js"></script>

<%
FirstName = rsSelectGroup("FIRST_NAME")
AmpEsc = Replace(FirstName, &, &)

'(Last parameter is '&' followed by 'amp' and ';', so accordingly shows up as '&' in the forum)
%>

<center><a href="JavaScript://" onclick="win1=openNewWindow('PrintTransaction.asp?FirstName=<%=AmpEsc%>', 'saPrint', 600, 400, 'scrollbars,location,status,menubar,toolbar,resizable,status')">Printer-friendly version</a></center>


However, my code doesn't work, and I can't find a list of several other escape sequences, such as ',$,!, etc. Can someone help me out with this?

Thanks in advance,
Patrick
 
 
Post #: 1
 
 Re: Escape Sequence? - 5/19/2005 8:56:29 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
Replace:

AmpEsc = Replace(FirstName, &, &)

with:

AmpEsc = Replace(FirstName,"&","_and_")

(in reply to bigairguy)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Escape Sequence? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts