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
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: 245
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