× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Pete,

You are not allowing the normal process to work. You are using JavaScript to
override the behavior of the browser.
The problem is the following line of code that YOU wrote:

  var parms = "&co="      + Form1.co.value +
              "&ioc="     + Form1.ioc.value +
              "&rating="  + Form1.rating.value +
              "&reptyp="  + Form1.reptyp.value ;

The Form1.co.value is _always_ the value of the checkbox object; in
JavaScript. 
You are asking for the check-state in your questions here, but are
retrieving the value instead. 
You need to get the checkstate as follows:
  
  if (Form1.co.checked) {
     coValue = Form1.co.value;
  }
  else {
     coValue = "";
  }

  var parms = "&co="      + escape(coValue) +
              "&ioc="     + escape(Form1.ioc.value) +
              "&rating="  + escape(Form1.rating.value) +
              "&reptyp="  + escape(Form1.reptyp.value) ;

-Bob Cozzi
www.RPGxTools.com
RPG xTools - Enjoy programming again.


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Peter Vidal
Sent: Friday, January 13, 2006 7: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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.