JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 9th, 2008, 04:02 AM
xsm xsm is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2008
Posts: 1 xsm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 15 sec
Reputation Power: 0
Need Help Debugging Script/Error in Script - /x27

Hi ,
I need help with handling apostrophe's in javascript.
Any ideas ,
Thanks in advance.
sm
<html>
<head>
<script language=Javascript>
function test()
{
alert("Calling function test");
alert("This is \x27 ");

var str1 = "This is test's script";

alert("Str1 " + (str1));
alert( "str2 :" + replace(escape(str1),"\x27", "A"); -- error
alert("Result : " + str2);
}
</script>
</head>
<body onLoad=test();>
</body>
</html>

Reply With Quote
  #2  
Old September 9th, 2008, 04:18 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 552 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 1 m 33 sec
Reputation Power: 14
syntax

Hi xsm, welcome to the forums,
The line you incated as --error, has 3 opening parentheses and only 2 closing. i.e. (..(..(..)..)
But I believe the syntax is wrong anyway. Try
source_string.replace(target_value, replacement_value)
and you also have an undefined variable - str2
__________________
WP plugins - Error Reporting, Clean Options
http://www.mittineague.com/dev/er.php
http://www.mittineague.com/dev/co.php

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Need Help Debugging Script/Error in Script - /x27


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap