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 June 21st, 2010, 12:26 PM
lb55 lb55 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2010
Posts: 2 lb55 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 33 sec
Reputation Power: 0
Need Help Debugging Script/Error in Script - String value changes before passing to script func

Hi,
this is my first debugging JS/cgi. I'm trying to fix the existing problem but I'm not able to understand it completely.

printf ("\t\t\t<input type=\"text\" maxlength=\"%d\" value=\"%s\" name=\"%s\" id=\"%s\" onChange=\"fieldchanged('%s', true, '%s', %d);\" onKeyPress=\"return validateChar(this, event,true);\" onfocus=\"document.getElementById('spanHelp').innerHTML='%s' ;\">\n",
flCurr->validation.stringVal.length, flCurr->current_value, flCurr->tagname, flCurr->tagname, flCurr->tagname, "C:\dummy\directory", flCurr->fieldnum, flCurr->help);

When I ran firebug I see the value changing from "C:\dummy\directory" to "c:dummydirectory" in fieldChanged(). validateChar doesn't seem to have any modifications but I'm not sure how it is getting changed.
Any help is greatly appreciated. thanks in advance.
lb

Reply With Quote
  #2  
Old June 21st, 2010, 01:16 PM
mecanicu mecanicu is offline
anonymous
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 244 mecanicu User rank is Private First Class (20 - 50 Reputation Level)mecanicu User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 12 h 21 m 10 sec
Reputation Power: 13
Haven't you forgot to escape the backslashes?
like this
"C:\\dummy\\directory"

all the best

Reply With Quote
  #3  
Old June 21st, 2010, 02:31 PM
lb55 lb55 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2010
Posts: 2 lb55 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 33 sec
Reputation Power: 0
Quote:
Originally Posted by mecanicu
Haven't you forgot to escape the backslashes?
like this
"C:\\dummy\\directory"

all the best


No luck with "\\". Still removes all slashes.

Reply With Quote
  #4  
Old June 21st, 2010, 10:38 PM
mecanicu mecanicu is offline
anonymous
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 244 mecanicu User rank is Private First Class (20 - 50 Reputation Level)mecanicu User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 12 h 21 m 10 sec
Reputation Power: 13
I'm quite sure this is the wrong part.
So escape backslashes and clear the cache of your FireFox. It should work.
all the best

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Need Help Debugging Script/Error in Script - String value changes before passing to script func


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