[Javascript] Apostrophise in JavaScript Functions (ASP created)

Peter Brunone peter at brunone.com
Tue Jul 3 10:18:25 CDT 2001


Apostrophise in JavaScript Functions (ASP created)Phil,

    I don't see why using JavaScript's built-in escape character (\) won't work.  This is an established function of the JS engine and has been for several versions now...
  ----- Original Message ----- 
  From: Phil Winstanley 
  To: 'javascript at LaTech.edu' 
  Sent: Tuesday, July 03, 2001 7:41 AM
  Subject: [Javascript] Apostrophise in JavaScript Functions (ASP created)




  I have an iccle problem. 

  People should be banned from having apostrophise in their names ... 

  Below is some HTML code, notice the 3rd passed parameter when calling the onClick and it contains a text string ... With an apostrophise I need to keep the apostrophise visually but lose it to code - what did people come up with ?

  I have tried replacing a single apostrophise with a double apostrophise without luck. 

  ASP -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o- 

  &nbsp;&nbsp;&nbsp;<span class="delete" onClick="confirmdelete('emergency/delete.asp?id=<%=emergency_emergencyID%>&amp;tabsheet=Emergency&amp;EmpID=<%=EmpID%>','Emergency Contact','<%=emergency_name%>');" id="email/delete.asp?id=<%=emergency_emergencyID%>&amp;tabsheet=Emergency">

  <IMG SRC="http://intranet/images/delete.gif" title="Delete the Emergency record for <%=emergency_name%>."> 

  </span> 

  Rendered HTML -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o- 

  <span class="delete" onClick="confirmdelete('emergency/delete.asp?id=76&amp;tabsheet=Emergency&amp;EmpID=1028','Emergency Contact','Mrs Margaret D'Souza');" id="email/delete.asp?id=76&amp;tabsheet=Emergency">

  <IMG SRC="http://intranet/images/delete.gif" title="Delete the Emergency record for Mrs Margaret D'Souza."> 

  </span> 

  ___________________________________________ 
  Phil Winstanley 
  MIS Database Support 
  Software Creations (Holdings) Ltd 
  "A Computer Games Developer with Balls!" 
  140 Cheetham Hill Road 
  Manchester 
  M8 8PZ 
  England 
  Tel: +44(0)161 839 2239 
  fax: +44(0)161 832 0412 ___________________________________________ 
  ICQ: 29163700 
  http://www.creations.co.uk/ 
  phil.winstanley at creations.co.uk 
  "We don't do Duvets, Leather or JavaScript." 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010703/5a3f9dc3/attachment.htm>


More information about the Javascript mailing list