File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes variable passed to function result in objectHTMLInputElement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "variable passed to function result in objectHTMLInputElement" Watch "variable passed to function result in objectHTMLInputElement" New topic
Author

variable passed to function result in objectHTMLInputElement

albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 239
I like to pass a global variable to a function but
<script type="text/javascript">
var sortorder = true;
</script>

<input type="checkbox" name="choice" value="20" onchange="submitField(document.alertform.choice, 20, sortorder);">

This function is defined a file:
function submitField(field, id, sortorder) {
alert('sortorder ' + sortorder);

}

The alert box "sortorder [objectHTMLInputElement]" appear instead of "sortorder true".
Please help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: variable passed to function result in objectHTMLInputElement
 
Similar Threads
onKeyPress
JSON JQuery Grid Not getting value in JSP
Javascript onPaste
how to know whether the browser is IE or netscape
Javascript function trying to access Scriptlet value