homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Display first 10 characters
ahmed24




msg:4310365
 2:55 pm on May 10, 2011 (gmt 0)

I have the following onChange code on a input text field that calls the frmShow function with "this.value" of the form field.

However, I need it to call the frmShow function with only the first 10 characters of the "this.value"

onChange="frmShow('hide', 'text', this.value)"

can anyone kindly tell me how this can be done?

thanks

 

ahmed24




msg:4310368
 3:12 pm on May 10, 2011 (gmt 0)

its ok i have figured it out like this:

this.value.substr(0,10)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved