0

Hey I am trying to know what is the value of of a check box (true, or false)

but i cant seem to get it write

function getPrice(boxName){

	alert(form1.Soft_Top_Cloth.checked) // Hard code box name it works
	alert(form1.boxName.checked) // passed threw variable not working 
}
<input type="checkbox" name="<%= boxName %>" id="<%= boxName %>>" onchange="getPrice('<%= boxName %>')" />

Thanks for all the help

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Airshow
0

Moiseszaragoza,

Is that client-side VB?

If so, then boxname is well and truly out of scope - it being a server-side asp|jsp (or similar) variable - and you need to address the HTML element by the value of boxName.

I don't know VB so can't suggest more but that may point you in the right direction.

Airshow

0

Thanks for trying.


the problem was a typo where there are 2 > but its working fine now

thanks

0

Moiseszaragoza,

Cool.

I didn't spot the double >>.

And I know why I thought the code was VB but I'm not going to explain because everyone will think me real stooooopid.

Airshow

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.