spires Posted October 22, 2008 Share Posted October 22, 2008 Hi Guys I'm trying to add some java script into one of my PHP functions. I know I need to escape some of the single quotes, but I can't work out which ones. Any help would be great. Code: <table width='165' border='0' cellspacing='0' cellpadding='0'> <tr> <td> <img src="GFX/livechat/gif/top.gif" /> </td> </tr> <tr> <td align="center"> <a id="_lpChatBtn" href='http://server.iad.liveperson.net/hc/25363161/?cmd=file&file=visitorWantsToChat&site=25363161&byhref=1&imageUrl=http://www.businessmobiles.com/GFX/livechat/gif/' target='chat25363161' onClick="lpButtonCTTUrl = 'http://server.iad.liveperson.net/hc/25363161/?cmd=file&file=visitorWantsToChat&site=25363161&imageUrl=http://www.businessmobiles.com/GFX/livechat/gif/&referrer='+escape(document.location); lpButtonCTTUrl = (typeof(lpAppendVisitorCookies) != 'undefined' ? lpAppendVisitorCookies(lpButtonCTTUrl) : lpButtonCTTUrl); window.open(lpButtonCTTUrl,'chat25363161','width=475,height=400,resizable=yes');return false;" ><img src='http://server.iad.liveperson.net/hc/25363161/?cmd=repstate&site=25363161&channel=web&&ver=1&imageUrl=http://www.businessmobiles.com/GFX/livechat/gif/' name='hcIcon' border=0></a> </td> </tr> <tr> <td> <a href='http://server.iad.liveperson.net/hc/25363161/?cmd=file&file=visitorWantsToTalk&site=25363161&byhref=1&SESSIONVAR!skill=Click to Call&imageUrl=http://www.businessmobiles.com/upload' target='call25363161' class="bluelink" onclick="javascript:window.open('http://server.iad.liveperson.net/hc/25363161/?cmd=file&file=visitorWantsToTalk&site=25363161&SESSIONVAR!skill=Click%20to%20Call&imageUrl=http://www.businessmobiles.com/upload&referrer='+escape(document.location),'call25363161','width=472,height=320');return false;" ><img src="GFX/livechat/gif/call_back.gif" /></a> </td> </tr> <tr> <td> <img src="GFX/livechat/gif/bottom.gif" /> </td> </tr> </table> Thanks Link to comment https://forums.phpfreaks.com/topic/129651-escaping-special-characters-help-please/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.