|
Peter to do what you are trying to do you need to use the checked property of the checkbox not the value. On the client side the form.checkbox.value will always be the value, and since the value does default to true you are seeing that it is always true. What was not mentioned in your first post was that you are accessing this checkbox in on the client side and things are a bit different. This should demonstrate The first button will alert the checked status <true|false> the second button will alert the property value <yes> -------------------------- <html> <body> <form name="myform"> <input type="checkbox" name="checkbox1" value="yes"/> <input type="button" name="b1" value="Test Checked" onclick="alert(checkbox1.checked)"/> <input type="button" name="b2" value="Test Value" onclick="alert(checkbox1.value)"/> </form> </body> </html> ------------------------ HTH - Greg -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Peter Vidal Sent: Friday, January 13, 2006 8:56 AM To: Web Enabling the AS400 / iSeries Subject: Re: [WEB400] ***** <input TYPE="checkbox"> issue Thanks Sarah. I understand your explanation of the checkbox and its behavior with the browser. The issue is that it does not matter if I check it or not, the value is TRUE, always TRUE, no matter what I do. I also tested your recomendation to use "GET" but with no sucess. To give you all an idea of how thigns are rolling, this is the code: =============================================== %HTML(INPUT) { <html> <head> <script LANGUAGE="JavaScript"> <!-- function setParms() { alert(Form1.rating.value); var base = "../Top20CusSum/report?"; var parms = "&co=" + Form1.co.value + "&ioc=" + Form1.ioc.value + "&rating=" + Form1.rating.value + "&reptyp=" + Form1.reptyp.value ; adr = base + parms; } // --> </script> <style> <!-- BODY {font-family: verdana, helvetica, arial, sans-serif; font-size:x-small} TABLE {font-family: verdana, helvetica, arial, sans-serif; font-size:x-small} --> </style> </head> <body> ... some page headings <form METHOD="POST" action="javascript:location.href=adr" name="Form1"> ... some headings <input type=checkbox name="rating"> <input type="submit" value="Display Statistics" name="B1" onClick="setParms();"> </form> </body> </html> It is incredible (based on the beginner knowledge I have) that Form1.rating.value is always TRUE... Peter Vidal PALL Corporation / SR Programmer Analyst, IT Development Group 10540 Ridge Rd., Ste 203, New Port Richey, FL 34654-5111 http://www.pall.com "Labor to keep alive in your heart that little spark of celestial fire - Conscience." George Washington
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.