aspose 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 Java 8 in Action this week in the Java 8 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
Javascript function trying to access Scriptlet value
how to know whether the browser is IE or netscape
JSON JQuery Grid Not getting value in JSP
Javascript onPaste