www.webdeveloper.com
Results 1 to 9 of 9

Thread: Submitting Form creates prompt to "save or run" target script

  1. #1
    Join Date
    Oct 2009
    Posts
    4

    Submitting Form creates prompt to "save or run" target script

    Here's a nasty one, guys.

    Have a form that, when submitted, creates a prompt as to whether to save or run the target .cgi script.

    Extensions are correct, the browser has Perl, script saved in Linux/unix format with proper line endings, permissions on target .cgi are correct... all the usual causes of abject squirreliness have been checked...

    This is part of a HUGE perl/cgi application that has worked for over a decade. Seriously. This is just NOW showing up. Other forms IN THE SAME .pl file work correctly. Method is set to "post," nothing hinky in the form declaration. Path is to the same directory in the form "action='./myscript.cgi'>"

    Any ideas?

  2. #2
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    I'm thinking that your script is returning the wrong 'content type'

    print "Content-Type: text/html\n\n"; -or- print $cgi_obj->header();
    (including the important "\n\n")

  3. #3
    Join Date
    Oct 2009
    Posts
    4

    Nope

    Nope.. that's not it. Already checked.

  4. #4
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    Quote Originally Posted by Incognitii View Post
    ...Other forms IN THE SAME .pl file work correctly. Path is to the same directory in the form "action='./myscript.cgi'>"
    Hmmm
    Same .pl file -and- ./myscript.cgi. Is it .pl -or- .cgi?
    Is your server set up to handle either?

  5. #5
    Join Date
    Oct 2009
    Posts
    4

    .pl v .cgi

    Yes, the server has been set up to handle both.

  6. #6
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    Quote Originally Posted by Incognitii View Post
    ..This is just NOW showing up.
    Got me.
    So what did you just do? (-or- what did your host just do?)

  7. #7
    Join Date
    Oct 2007
    Location
    Vienna, Austria
    Posts
    391
    I would try to make another minimal form that would work and changed it piece by piece to the shape of this malfunctioning one. Like this, you'll either have another form that will work and do what you want or you'll identify the cause more closely, so we'll be able to get further.

  8. #8
    Join Date
    Oct 2009
    Posts
    4
    Here's the HTML for the page...

    Code:
    <form name="Call" method="post" action="./reps.cgi">
    					<input type="hidden" name="a" value="save_notes">
    					<input type="hidden" name="id" value="88">
    					<input type="hidden" name="rid" value="1">
    						<fieldset>
                              <legend><font size="2" face="Arial, Helvetica, sans-serif"><b>Enter 
                              Notes/Send Email</b></font></legend><table width="95&#37;" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td>
    
                              <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr> 
                                  <td width="28%"><div align="right"><strong><font size="2" face="Arial, Helvetica, sans-serif">Call 
                                      Results: </font></strong></div></td>
                                  <td width="2%">&nbsp;</td>
                                  <td width="70%"><select name="Results" size="1" id="Results">
                                  	  <option value=""></option>
                                      <option value="NI">Not Interested</option>
                                      <option value="CB">Call Back</option>
    
                                      <option value="CO">Call Completed</option>
                                      <option value="LP">Left Message - Personal</option>
                                      <option value="LV">Left Message - Voicemail</option>
                                      <option value="NA">No Answer</option>
                                      <option value="DI">Disconnected</option>
                                      <option value="MI">Mail Information</option>
    
                                      <option value="EI">Email Information</option>
                                      <option value="FU">Long-Term Follow-Up</option>
                                      <option value="RE">Register for Demo</option>
                                    </select></td>
                                </tr>
                                <tr> 
                                  <td width="28%"><div align="right"><strong><font size="2" face="Arial, Helvetica, sans-serif">Register To: </font></strong></div></td>
    
                                  <td width="2%">&nbsp;</td>
                                  <td width="70%"><select name="DemoID" size="1" id="DemoID">
                                  	  <option value=""></option>
    <option value='29'>Wednesday, Oct 28, 2009 at 2:00 EDT</option><option value='28'>Wednesday, Oct 28, 2009 at 09:00 EDT</option><option value='25'>Tuesday, Oct 27, 2009 at 09:00 EDT</option><option value='26'>Tuesday, Oct 27, 2009 at 2:00 EDT</option><option value='23'>Monday, Oct 26, 2009 at 10:00 EDT</option><option value='24'>Monday, Oct 26, 2009 at 2:00 EDT</option><option value='21'>Friday, Oct 23, 2009 at 09:00 EDT</option><option value='22'>Friday, Oct 23, 2009 at 2:00 EDT</option><option value='20'>Wednesday, Oct 21, 2009 at 2:00 EDT</option>                                </select></td>
    
                                </tr>
                                <tr> 
                                  <td><div align="right"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Call 
                                      Back On:</strong> </font></div></td>
                                  <td>&nbsp;</td>
                                  <td>
    								<input type="text" name="Date" id="Date" width="10" maxlength="10"><a href="#" border="0" id="atagclicked" onclick="calobj=this.parentNode.previousSibling;document.getElementById('calendarframe').style.display='inline';clicked='true';"><img id="btnimg" border="0" src="../../images/calendaropen.gif" style="position:relative"></a>
    								<iframe align="center" src="../../lm_calendar.html" id="calendarframe" align="left" marginheight="0" marginwidth="0" scrolling="no" style="position:absolute;z-index:100;display:none;top:300px;left:640px;width:160px;height:200px" frameborder="none"></iframe>
                                    <font size="2" face="Arial, Helvetica, sans-serif">at 
                                    <select name="Time" size="1" id="Time">
    
                                    	<option value=""></option>
    					                <option value="em">Early Morning</option>
    					                <option value="mm">Mid Morning</option>
    					                <option value="lm">Late Morning</option>
    					                <option value="n">Around Noon</option>
    					                <option value="ea">Early Afternoon</option>
    
    					                <option value="ma">Mid-Afternoon</option>
    					                <option value="la">Late Afternoon</option>
    					                <option value="d">Around Dinnertime</option>
    					                <option value="ee">Early Evening</option>
    					                <option value="le">Late Evening</option>
    						            <option value="00:00">12:00 Midnight</option>
    
    				                <option value="08:00">8:00am</option>
    					                <option value="08:30">8:30am</option>
    					                <option value="09:00">9:00am</option>
    
    					                <option value="09:30">9:30am</option>
    					                <option value="10:00">10:00am</option>
    					                <option value="10:30">10:30am</option>
    					                <option value="11:00">11:00am</option>
    					                <option value="11:30">11:30am</option>
    					                <option value="12:00">12:00 noon</option>
    
    					                <option value="12:30">12:30pm</option>
    						            <option value="13:00">1:00pm</option>
    					                <option value="13:30">1:30pm</option>
    					                <option value="14:00">2:00pm</option>
    					                <option value="14:30">2:30pm</option>
    					                <option value="15:00">3:00pm</option>
    
    					                <option value="15:30">3:30pm</option>
    					                <option value="16:00">4:00pm</option>
    					                <option value="16:30">4:30pm</option>
    					                <option value="17:00">5:00pm</option>
    					                <option value="17:30">5:30pm</option>
    					                <option value="18:00">6:00pm</option>
    
    					                <option value="18:30">6:30pm</option>
    					                <option value="19:00">7:00pm</option>
    					                <option value="19:30">7:30pm</option>
    					                <option value="20:00">8:00pm</option>
    					                <option value="20:30">8:30pm</option>
    					                <option value="21:00">9:00pm</option>
    
    					                <option value="21:30">9:30pm</option>
    					                <option value="22:00">10:00pm</option>
    					                <option value="22:30">10:30pm</option>
    					                <option value="23:00">11:00pm</option>
    					                <option value="23:30">11:30pm</option>
                                    </select>
    
                                    </font> </td>
                                </tr>
                                <tr> 
                                  <td><div align="right"><strong><font size="2" face="Arial, Helvetica, sans-serif">Notes:</font></strong></div></td>
                                  <td>&nbsp;</td>
                                  <td><textarea name="Notes" cols="45" rows="5" wrap="PHYSICAL" id="Notes"></textarea></td>
                                </tr>
                                <tr> 
                                  <td width="28%"><div align="right"><strong><font size="2" face="Arial, Helvetica, sans-serif">Send Email: </font></strong></div></td>
    
                                  <td width="2%">&nbsp;</td>
                                  <td width="70%"><select name="Template" size="1" id="Template">
                                  	  <option value="">(Select Email Template)</option>
    <option value='GI'>General Information - First Contact</option><option value='2'>Test Campaign 2</option>                                </select> <font size="2" face="Arial, Helvetica, sans-serif"> 
                                    -- OR --</font> </td>
                                </tr>
    
                                <tr> 
                                  <td><div align="right"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Subject:</strong> 
                                      </font></div></td>
                                  <td>&nbsp;</td>
                                  <td><input name="Subject" type="text" id="Subject" size="45" maxlength="255"></td>
                                </tr>
                                <tr> 
                                  <td><div align="right"><strong><font size="2" face="Arial, Helvetica, sans-serif">Message:</font></strong></div></td>
                                  <td>&nbsp;</td>
    
                                  <td><textarea name="Message" cols="45" rows="5" wrap="PHYSICAL" id="Message"></textarea></td>
                                </tr>
                                  <td colspan="3"><div align="center"> 
                                      <input type="submit" name="submit" id="submit" value="Done">
                                    </div></td>
                                </tr>
                              </table>
                              </td>
                          </tr>
    
                        </table></fieldset></form>

  9. #9
    Join Date
    Oct 2007
    Location
    Western Massachusetts, USA
    Posts
    387
    Make sure your server is set to execute CGI. This is done in Apache by using some directory block setings for /cgi-bin, I believe.
    Computer programmer / web developer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles