This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

variable passed to function result in objectHTMLInputElement

albert kao
Ranch Hand
Posts: 252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like to pass a global variable to a function but
<script type="text/javascript">
var sortorder = true;

<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:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic