× 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.



Peter,
Glad you see the checked vs value difference. :)

Normally, the SUBMIT button can be used to automatically create the encoded
parameter list and pass it to the corresponding CGI program. You don't need
to push it through JavaScript or any scripting language. If you were using
AJAX-techniques, then that's a different story.

<form method="POST" action="/cgi-bin/mypgm" NAME="MYFORM">
<input type="checkbox" name="co" value="Hello">
<input type="text" name="nm" size="20">
<input type="SUBMIT">

When the end-user enters the name in the above for, and checks or doesn't
check the checkbox named "co", the URL is automatically created and called.

http://www.mydomain.com/cgi-bin/mypgm?co=Hello&nm=Bob+Cozzi

And this is sent off to the CGI program named MYPGM.
Where is MYPGM? It is in a library that is cloaked by the /cgi-bin
map/directory entry in the configuration file of the web server. Typically
it would get mapped to something like: /qsys.lib/mycgilib.lib/mypgm.pgm
Then out of the environment (for GET methods) or from standard input (for
POST methods) the CGI program would retrieve the HTML form data.


-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: Monday, January 16, 2006 7:22 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] ***** <input TYPE="checkbox"> issue

"You are not allowing the normal process to work. You are using JavaScript 
to override the behavior of the browser."

===> Thanks Bob.  What would be the right way to do it, if I decide not to 
use JS?  I think that so far, the JS code present in this CGI is only to 
"be able to send parameters to the next CGI program/script"... does this 
sounds correct or I can do this without JS?

"  if (Form1.co.checked) {
     coValue = Form1.co.value;
  }
  else {
     coValue = "";
  }"

BAM!  Hey Bob, that really did the trick!  Again, it was a 
misunderstanding of the object attribute!  Thanks to Bob Cozzi, Sarah 
Poger Gladstone and all the others for their inputs and tips to resolve 
this.

However, your recommendations on these previous issues are welcome.

Regards and have a blessed day!


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

"Wisdom outweighs any wealth."
Sophocles (496 BC - 406 BC), Antigone



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.