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



One more thing,
You might want to get rid of that /$amtop section identifier. It is too
confusing to PC-based HTML editing tools and not widely used anymore. In
CGILIB you can write out the virtual top section of your HTML by calling
cgiWrtSection('*TOP'), in CGIDEV2, I believe you call WrtSection('noname')
to get similar results. 

-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Shane_Cessna@xxxxxxx
Sent: Wednesday, April 20, 2005 10:24 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] get vs post...

Bob,

I'm using CGIDEV2...using the zhb procedures to retrieve values from the 
web page...so, I can only use those procedures with method="get" right?...

also, I have no <Limit GET> or <Limit POST> directives in my HTTP server 
config...so, i don't know why my method="get" isn't working...

Brad,

"rendering it useless" = when i hit the button, my program doesn't get 
called or anything...it just sits there and laughs at me...

here's my source for the web page:

/$amtop
Content-type: text/html

<html>
<head>
<title>Standard Parts - Database</title>
<script language=javascript>
function OpenPopup(){
        var nW = 
window.open("http://nal820.flora.nal.com/cgihtml/popup.htm";, "PopupHwnd", 
status=no,resizable=no,scrollbars=no,width=400,height=250,top=250,left=400")
;
        nW.focus();
        nW = null;
}

function validate(fieldvalue, fieldname, fieldtype) {
        var fvalue = fieldvalue;
        var fname = fieldname;
        var ftype = fieldtype;
 
        if (ftype == "Num 155") {
                if (!IsNumeric(fvalue)) {
                        alert('Please enter only numbers or decimal points 
in ' + fieldname + '.');
                        return false;
        }
    }
        if (ftype == "Num 10") {
                if (!IsInteger(fvalue)) {
                        alert('Please enter only numbers in ' + fieldname 
+ '.');
                        return false;
        }
        }
        if (ftype == "Y/N") {
                if (fvalue != 'Y' && fvalue != 'N') {
                        alert('Please enter only Y or N in ' + fieldname + 
'.');
                        return false;
                }
        }
}

function IsNumeric(sText) {
        var ValidChars = "0123456789.";
        var IsNumber = true;
        var Char;
 
        for (i = 0; i < sText.length && IsNumber == true; i++) { 
                Char = sText.charAt(i); 
                if (ValidChars.indexOf(Char) == -1) {
                        IsNumber = false;
                }
        }
        return IsNumber;
}

function IsInteger(sText) {
        var ValidChars = "0123456789";
        var IsNumber = true;
        var Char;
 
        for (i = 0; i < sText.length && IsNumber == true; i++) { 
                Char = sText.charAt(i); 
                if (ValidChars.indexOf(Char) == -1) {
                        IsNumber = false;
                }
        }
        return IsNumber;
}
</script>
</head>
<body>
<center><img src="/pics/nallogo.jpg" alt="North American Lighting, 
Inc."><br>
Standard Parts - Database</center><br>
<br>
<button onclick="javascript: alert('Cost Information\n\nFlora\nCurrent 
Cost: /%fcc%/\nFrozen Standard Cost: /%ffsc%/\nCurrent Standard Cost: 
/%fcsc%/\n\nSalem\nCurrent Cost: /%scc%/\nFrozen Standard Cost: 
/%sfsc%/\nCurrent Standard Cost: /%scsc%/\n\nParis\nCurrent Cost: 
/%pcc%/\nFrozen Standard Cost: /%pfsc%/\nCurrent Standard Cost: 
/%pcsc%/')">View Cost</button>&nbsp;&nbsp;
<button onclick="OpenPopup();">Rate Part</button><br>
<br>
<form action="/cgi-bin/spdbsavec" name="db3" method="get">
<input type="hidden" name="purrate" value="/%purrate%/">
<input type="hidden" name="mfgengrate" value="/%mfgengrate%/">
<input type="hidden" name="prengrate" value="/%prengrate%/">
<input type="hidden" name="ddrate" value="/%ddrate%/">
<input type="hidden" name="tdrate" value="/%tdrate%/">
<input type="hidden" name="sqerate" value="/%sqerate%/">
Mode: <font color="red">/%waction%/</font><input type="hidden" 
name="waction" value="/%waction%/"><br>
NAL Part #: /%wpart%/<input type="hidden" name="wpart" 
value="/%wpart%/"><br>
Commodity Code: /%wcommcd%/<input type="hidden" name="wcommcd" 
value="/%wcommcd%/"><br>
Description: /%wdesc%/<input type="hidden" name="wdesc" 
value="/%wdesc%/"><br>
Vendor: /%wvendor%/<input type="hidden" name="wvendor" 
value="/%wvendor%/"><br>
Preferred Vendor: <input type="text" name="wpref" size="1" maxlength="1" 
value="/%wpref%/"><br>
Vendor Part #: /%vpart%/<input type="hidden" name="vpart" 
value="/%vpart%/"><br>
Unit of Measurement: /%uom%/<input type="hidden" name="uom" 
value="/%uom%/"><br>
Commodity Type: <select name="wctype">
<option value=" "> </option>

/$amoptions
/%option%/

/$ammiddle
</select><br>
Original Part #: <input type="text" name="opart" size="25" maxlength="18" 
value"/%opart%/"><br>
<table border=2>
<th>Field Name<th>Value

/$amsubfile
<tr>
<td>/%fieldname%/</td>
<td><input type="text" name="/%fielddata%/" size="/%size%/" 
maxlength="/%maxlength%/" value="/%valuevalue%/" onblur="javascript: 
validate(this.value, '/%fieldname%/', '/%fieldtype%/');"><input 
type="hidden" name="fieldtype" value="/%fieldtype%/"></td>
</tr>

/$ambottom
</table><br>
<input type="Submit" value="Submit">&nbsp;&nbsp;<input 
type="Reset"></form>
<form action="/cgi-bin/spdbw" method="get"><input type="Submit" 
value="Back"></form>
/%date%/&nbsp;&nbsp;/%time%/
</body>
</html>


Shane Cessna  
iSeries Programmer
iSeries WAS Administrator
North American Lighting, Inc.
(618) 662-4483 x2776
shane_cessna@xxxxxxx 



"Brad Stone" <brad@xxxxxxxxxxxx> 
Sent by: web400-bounces@xxxxxxxxxxxx
04/20/2005 09:50 AM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
cc

Subject
Re: [WEB400] get vs post...






What do you mean by "redering it useless"?  That could mean
the button doesn't do anything, or it calls your CGI
program but errors, etc.

It could be an issue with your HTML form or how your CGI
app is handling the request.

Brad

On Wed, 20 Apr 2005 09:23:34 -0500
 Shane_Cessna@xxxxxxx wrote:
> I have a CGI program that's acting funny...
> 
> if I put method="get" in my <form> tag, my submit button
> won't 
> work...however, if i change it to method="post", it
> works...why is this? 
> Is there any reason why a method="get" would render a
> <input type="submit" 
> value="submit"> tag useless as opposed to a method="post"
> tag making the 
> button work?
> 
> Shane Cessna 
> iSeries Programmer
> iSeries WAS Administrator
> North American Lighting, Inc.
> (618) 662-4483 x2776
> shane_cessna@xxxxxxx 

Bradley V. Stone
BVS.Tools
www.bvstools.com
-- 
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





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.