Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Targeting by name with space in name?
Old 11-04-2005, 01:14 PM Targeting by name with space in name?
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
Is there any way to target an object using its name if it has a space in it?
HTML Code:
		<form id="myform" action="" method="get" name="myform">
			<input type="text" name="test field" value="asdasdasd" size="24"><input onclick="alert(document.myform.test%20field.value);" type="submit" name="submitButtonName">
		</form>
Using %20 in place of the space doesn't work. Thanks.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
 
Register now for full access!
Old 11-06-2005, 03:46 AM
Average Talker

Posts: 20
Location: Benevento
Trades: 0
Quote:
Originally Posted by funkdaddu
Is there any way to target an object using its name if it has a space in it?
HTML Code:
        <form id="myform" action="" method="get" name="myform">
            <input type="text" name="test field" value="asdasdasd" size="24"><input onclick="alert(document.myform.test%20field.value);" type="submit" name="submitButtonName">
        </form>
Using %20 in place of the space doesn't work. Thanks.


http://www.w3.org/TR/html401/interact/forms.html#h-17.3
http://www.w3.org/TR/html401/types.html#type-cdata

You should not use spaces for "name", anyway if you use them remember that in most cases(?) the space in the name serverside will result in an underscore (_).

cheers
j2be is offline
Reply With Quote
View Public Profile Visit j2be's homepage!
 
Old 11-07-2005, 10:43 AM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
That's what I figured, thanks.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to Targeting by name with space in name?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11697 seconds with 12 queries