aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Handling dot in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Handling dot in javascript" Watch "Handling dot in javascript" New topic
Author

Handling dot in javascript

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
hi,

in my html the names of my textboxes are like this "attributes(first_name).value"

Now i need to peform a validation on this textbox, let's say mandatory check.

But i don't know how to escape the dot "." that is present in the name of the textbox "attributes(first_name).value"

when i write this in my javascript

document.forms[0].attributes(first_name).value.value then i doesn't work.

Please help!

thnx
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I will not ask why in the world they are named like this

You need to use the element array

document.forms[0].elements["elementName"].value = "asdf";

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling dot in javascript