|
the only copy of the program (SPDBSAVEC) exists in my CGIBIN library...and it calls 2 programs (SPDBSAVE & SPDBW) both of which exist only in CGIBIN... Shane Cessna iSeries Programmer iSeries WAS Administrator North American Lighting, Inc. (618) 662-4483 x2776 shane_cessna@xxxxxxx "Bob Cozzi" <cozzi@xxxxxxxxx> Sent by: web400-bounces@xxxxxxxxxxxx 04/20/2005 11:34 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... IS the program in the right library? Are you making changes to a program that you aren't actually calling? Are there two copies of the program object out there? When you recompile is it going into the CGI library? Taking out /$amtop will work (but is unrelated to your problem). Just callp WrtSection('noname') instead of WrtSection('amtop'). -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 11:23 AM To: Web Enabling the AS400 / iSeries Subject: RE: [WEB400] get vs post... Bob, sorry, I've got all the /copy members in the program...also, no messages in qsysopr or in the job log for the HTTP server - cgi instance... I also tried taking out the /$amtop section of the web page...that didn't work either...i dont think my problem is in displaying the web page, but in getting the Submit button to work...I have the same type of web pages (submit button with a cgi program as the form action) all over the place...i just dont know why this one refuses to work on a method="get"... Shane Cessna iSeries Programmer iSeries WAS Administrator North American Lighting, Inc. (618) 662-4483 x2776 shane_cessna@xxxxxxx I stopped using CGIDEV2 early last year... RPG xTools CGILIB is compatible with the HTML for CGIDEV2 so I ported it and don't have these kinds of issues. So I don't think I can help, perhaps Mel (the author of CGIDEV2 could shed some light, but it is probable just a coding error. Maybe look at the CGI program... does it have all the CGIDEV2 /COPY members specified correctly in the Calc specs? I know that was one of the reasons I abandoned CGIDEV2. Also, are there any messages in the QSYSOPR message queue? Are you using Apache? Are there any messages in the CGI job for that instance that might offer a clue? I find these two things tend to help. Also, if there are no messages, then you're obviously looking in the wrong place for the problem, so that's also helpful. 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> <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"> <input type="Reset"></form> <form action="/cgi-bin/spdbw" method="get"><input type="Submit" value="Back"></form> /%date%/ /%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. -- 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. -- 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 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.