powersitedesign Posted July 14, 2008 Share Posted July 14, 2008 I have a form that I want to have a browser notification window / pop-up (not an actual pop-up page) after the submit button has been pushed. I can get this to work just fine for my required fields in the form itself but it's not working for me on the Submit button once the form goes through it just sits there. Here's my source code if you want to take a look. If you need further clarification of what I am talking about please hit me back and I will be glad to explain further. Thanks for your help in advance <?php // Change these two variables to meet your needs. $myemail = '[email protected]'; $subject = 'Ownership Resorts Inquiry'; $op = $_POST[op]; if($op == 'contact') { $name = stripslashes($_POST[name]); $company = stripslashes($_POST[company]); $address = stripslashes($_POST[address]); $city = stripslashes($_POST[city]); $state1 = stripslashes($_POST[state1]); $zip = stripslashes($_POST[zip]); $phone_1 = stripslashes($_POST[phone_1]); $phone_2 = stripslashes($_POST[phone_2]); $phone_3 = stripslashes($_POST[phone_3]); $email = stripslashes($_POST[email]); $ad_source = stripslashes($_POST[method]); $method_other = stripslashes($_POST[method_other]); $questions_comments = stripslashes($_POST[questions_comments]); $referer = $_POST[referer]; $remote_host = $_SERVER[REMOTE_ADDR]; $server = $_SERVER[sERVER_NAME]; $browser = $_SERVER[HTTP_USER_AGENT]; if(!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$",$email)) { $status = ""; } if(!$name) { $status .= ""; } if(!$questions_comments) { $status .= ""; } if(!$status) { $header = "From: $email\r\nReply-To: $email\r\n"; $message = " Contact Information Name: $name Company: $company Address: $address City: $city State: $state1 Zip: $zip Phone: ($phone_1)$phone_2-$phone_3 Email: $email Method: $method / $method_other Questions/Comments: $questions_comments Referer & Browser Data Referer: $referer Site: $server Remote Host: $remote_host Remote Browser: $browser "; if(mail($myemail, $subject, $message, $header)) { $status = ""; } else { $status = ""; } } else { $status .= ""; } } // Now check the referer page and ensure it's a proper URL $referer = $_SERVER[HTTP_REFERER]; if(!preg_match('#^http://[a-z0-9-]+.([a-z0-9-]+.)?[a-z]+#i', $referer)) { unset($referer); } ?> <?php print $status; ?> </span> <body> </p> <form method="POST" action="<?php print $_SELF; ?>" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1"> <input type="hidden" name="op" value="contact"> <input type="hidden" name="referer" value="<?php print $referer; ?>"> <table style="width: 395px" cellspacing="1"> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Name:</font><font face="Verdana" style="font-size: 8pt">*</font></td> <td width="225" align="left"><font color="#FFFFFF"> <!--webbot bot="Validation" b-value-required="TRUE" --><input name="name" size="32" value="" tabindex="1" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Company:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <input name="company" size="32" value="" tabindex="2" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Address:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <input name="address" size="32" value="" tabindex="3" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">City:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <input name="city" size="32" value="" tabindex="4" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">State/Province:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <select name="state1" tabindex="5" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0" size="1"> <option value="------------">Select</option> <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AZ">Arizona</option> <option value="AR">Arkansas</option> <option value="CA">California</option> <option value="CO">Colorado</option> <option value="CT">Connecticut</option> <option value="DE">Delaware</option> <option value="DC">District of Columbia</option> <option value="FL">Florida</option> <option value="GA">Georgia</option> <option value="HI">Hawaii</option> <option value="ID">Idaho</option> <option value="IL">Illinois</option> <option value="IN">Indiana</option> <option value="IA">Iowa</option> <option value="KS">Kansas</option> <option value="KY">Kentucky</option> <option value="LA">Louisiana</option> <option value="ME">Maine</option> <option value="MD">Maryland</option> <option value="MA">Massachusetts</option> <option value="MI">Michigan</option> <option value="MN">Minnesota</option> <option value="MS">Mississippi</option> <option value="MO">Missouri</option> <option value="MT">Montana</option> <option value="NE">Nebraska</option> <option value="NV">Nevada</option> <option value="NH">New Hampshire</option> <option value="NJ">New Jersey</option> <option value="NM">New Mexico</option> <option value="NY">New York</option> <option value="NC">North Carolina</option> <option value="ND">North Dakota</option> <option value="OH">Ohio</option> <option value="OK">Oklahoma</option> <option value="OR">Oregon</option> <option value="PA">Pennsylvania</option> <option value="RI">Rhode Island</option> <option value="SC">South Carolina</option> <option value="SD">South Dakota</option> <option value="TN">Tennessee</option> <option value="TX">Texas</option> <option value="UT">Utah</option> <option value="VT">Vermont</option> <option value="VA">Virginia</option> <option value="WA">Washington</option> <option value="WV">West Virginia</option> <option value="WI">Wisconsin</option> <option value="WY">Wyoming</option> <option value="--">-----</option> <option id="CAN-AB" value="AB">Alberta</option> <option id="CAN-BC" value="BC">British Columbia</option> <option id="CAN-MB" value="MB">Manitoba</option> <option id="CAN-NB" value="NB">New Brunswick</option> <option id="CAN-NL" value="NL">New & Lab</option> <option id="CAN-NT" value="NT">NW Territories</option> <option id="CAN-NS" value="NS">Nova Scotia</option> <option id="CAN-NU" value="NU">Nunavut</option> <option id="CAN-PE" value="PE">PEI</option> <option id="CAN-SK" value="SK">Saskatchewan</option> <option id="CAN-ON" value="ON">Ontario</option> <option id="CAN-QC" value="QC">Quebec</option> <option id="CAN-YT" value="YT">Yukon</option> <option value="-1">------</option> <option value="-2">Not Listed</option></select></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Zip Code:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="10" --><input name="zip" size="10" value="" tabindex="6" maxlength="10" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Telephone:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="3" s-validation-constraint="Greater than or equal to" s-validation-value="000" s-validation-constraint="Less than or equal to" s-validation-value="999" --><input name="phone_1" size="3" value="" tabindex="7" maxlength="3" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"><font face="Verdana"><span style="font-size: 8pt">-</span></font><!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="3" s-validation-constraint="Greater than or equal to" s-validation-value="000" s-validation-constraint="Less than or equal to" s-validation-value="999" --><input name="phone_2" size="3" value="" tabindex="7" maxlength="3" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0">-<!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="4" s-validation-constraint="Greater than or equal to" s-validation-value="0000" s-validation-constraint="Less than or equal to" s-validation-value="9999" --><input name="phone_3" size="4" value="" tabindex="7" maxlength="4" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Email Address:</font><font face="Verdana" style="font-size: 8pt">*</font></td> <td width="225" align="left"><font color="#FFFFFF"> <!--webbot bot="Validation" s-data-type="String" b-allow-letters="TRUE" b-allow-digits="TRUE" s-allow-other-chars="@." b-value-required="TRUE" --><input name="email" size="32" value="" tabindex="10" style="border:1px solid #000000; font-family: Verdana; font-size: 8pt; color: #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td valign="top" width="163" align="left"> <font color="#FFFFFF"><span style="font-size: 8pt">How Did You Find Us:</span></font><font face="Verdana" style="font-size: 8pt">*</font></td> <td width="225" align="left"> <font color="#FFFFFF" style="font-size: 4pt"> <!--webbot bot="Validation" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select name="ad_source" id="method" title="How Did You Find Us?" tabindex="11" style="border:1px solid #000000; font-family: Verdana; font-size: 8pt; color: #000000; background-color:#FFFFA0" size="1"> <option value="Select">Select</option> <option value='RV TV'>RV TV</option> <option value='Outdoor Channel'>Outdoor Channel</option> <option value='FMCA Magazine'>FMCA Magazine</option> <option value='FMCA Newsletter'>FMCA Newsletter</option> <option value='Motorhome Magazine'>Motorhome Magazine</option> <option value='Escapees Magazine'>Escapees Magazine</option> <option value="Big Rigs Best Bets">Big Rigs Best Bets</option> <option value='Monaco Coach Lifestyles'>Monaco Coach Lifestyles</option> <option value="Country Coach Destinations">Country Coach Destinations </option> <option value='Marathon Coach Maratime'>Marathon Coach Maratime</option> <option value="Prevost Prouds">Prevost Prouds</option> <option value="Beaver Coach Journal">Beaver Coach Journal</option> <option value="Lazydays Magazine">Lazydays Magazine</option> <option value='Direct Mail Piece'>Direct Mail Piece</option> <option value="Trade Show">Trade Show</option> <option value="ParkModels.com">ParkModels.com</option> <option value='RVLOA'>RVLOA</option> <option value='Google Search'>Google Search</option> <option value='Yahoo Search'>Yahoo Search</option> <option value='MSN Search'>MSN Search</option> <option value='Other'>Other</option></select></font></td> </tr> <tr> <td valign="top" width="163" align="left"> </td> <td width="225" align="left"> <font color="#FFFFFF" style="font-size: 4pt"> <textarea name="method_other" cols="32" rows="2" tabindex="12" style="border:1px solid #000000; font-family: Verdana; font-size: 8pt; color: #000000; background-color:#FFFFA0">If Other Specify</textarea></font></td> </tr> <tr> <td valign="top" width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Questions/Comments:</font><font face="Verdana" style="font-size: 8pt; text-align: right;">*<p align="right" style="text-align: left; color: #FFFFFF"> <font color="#FFFFFF" face="Verdana" style="font-size: 8pt"> Required Field</font> <font color="#FFFFFF">= </font>* </font></td> <td width="225" align="left" valign="top"><font color="#FFFFFF"> <!--webbot bot="Validation" b-value-required="TRUE" --><textarea name="questions_comments" cols="32" rows="4" tabindex="13" style="border:1px solid #000000; font-family: Verdana; font-size: 8pt; color: #000000; background-color:#FFFFA0"></textarea></font></td> </tr> <tr> <td valign="top" width="388" colspan="2"></td> </tr> <tr> <td valign="top" width="163"> </td> <td width="225" align="left"> <p align="center"> <input type="submit" value="Submit" style="font-family: Verdana; font-size: 8pt; color: #000000; font-weight: bold; border: 1px solid #FFCC00; background-color: #FFCC00"> </td> </tr> <tr> <td colspan="2"> </td> </tr> </table> </form> Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/ Share on other sites More sharing options...
JasonLewis Posted July 14, 2008 Share Posted July 14, 2008 You mean like a javascript alert()? I'm confused. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589333 Share on other sites More sharing options...
powersitedesign Posted July 14, 2008 Author Share Posted July 14, 2008 If you go to the page http://www.ownershipresorts.com/contact.php and don't enter in anything in the contact form and just hit submit, a browser popup will show up and tell you to enter in your name, etc.. This is the type of popup I am talking about. It's not an actual file on the site that's being popped up, instead it's coming from the Browser I guess, thanks. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589338 Share on other sites More sharing options...
JasonLewis Posted July 14, 2008 Share Posted July 14, 2008 That is done by using "Javascript" which is done on the client-side. If you are going to use something like that, then also include PHP error checking, so people can't just disable their javascript. This link should help you with what you are trying to achieve: http://www.tizag.com/javascriptT/javascriptform.php Good luck. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589343 Share on other sites More sharing options...
powersitedesign Posted July 14, 2008 Author Share Posted July 14, 2008 Thanks, I looked at the page and it was close to what I was needing but not exactly. They had just the validation for the fields if left empty, etc. What I am needing is once the form is submitted it displays a "form has been sent" message. I might be able to tweak this out though and make something work from this... Required Field: <input type='text' id='req1'/> <input type='button' onclick="isEmpty(document.getElementById('req1'), 'Please Enter a Value')" value='Check Field' /> Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589346 Share on other sites More sharing options...
JasonLewis Posted July 14, 2008 Share Posted July 14, 2008 On the registration complete page, have this: <script language="javascript" type="text/javascript"> function formComplete(){ alert("Thankyou, your form has been submitted."); } </script> <body onload="javascript: formComplete()"> Or you can just chuck the alert inside the onload event handler. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589348 Share on other sites More sharing options...
powersitedesign Posted July 14, 2008 Author Share Posted July 14, 2008 that is what is sort of weird about this, the client doesn't want it to go to a new page, they just want the popup window thing to come up, here's what I put in there... Notice I changed it from onclick= to onsubmit= <script language="javascript" type="text/javascript"> function formComplete(){ alert("Your Information Has Been Sent!"); } </script> </form> <body onsubmit="javascript: formComplete()"> It works more for when you click the submit button but go to the page, http://www.ownershipresorts.com/contact.php and click on submit w/out entering in any of the required data, it submits a form anyway, and then pops up a window saying that the form went through okay, weird. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589372 Share on other sites More sharing options...
JasonLewis Posted July 14, 2008 Share Posted July 14, 2008 You want the form to submit WITHOUT it leaving the page? Well that would require Ajax then. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589376 Share on other sites More sharing options...
powersitedesign Posted July 14, 2008 Author Share Posted July 14, 2008 Actually, after submitting the form and that browser alert comes up and says that the form has been sent, I can then have the page redirect on out to another page after that but he wants that browser popup to come up before it goes out. I have seen this done before, I think that I have even done it myself before but I honestly am drawing a blank as to how it needs to go... Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589379 Share on other sites More sharing options...
waynew Posted July 14, 2008 Share Posted July 14, 2008 <script> var i = 0; while(i < 100000){ alert("Thanks for submitting the form"); i++; } </script> I hate JS meddlers. PS, don't use that code. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589381 Share on other sites More sharing options...
JasonLewis Posted July 14, 2008 Share Posted July 14, 2008 In the form tag put this: onsubmit="javascript: formComplete()" Is that what you mean? Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589383 Share on other sites More sharing options...
powersitedesign Posted July 14, 2008 Author Share Posted July 14, 2008 Thanks, I tried that, it still will pass through the form w/ all of the required fields left blank and say that the form went through okay... I dunno, scratching my head on this one... <form method="POST" action="<?php print $_SELF; ?>" onsubmit=javascript: formComplete()" language="JavaScript" name="FrontPage_Form1"> <input type="hidden" name="op" value="contact"> <input type="hidden" name="referer" value="<?php print $referer; ?>"> <table style="width: 395px" cellspacing="1"> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Name:</font><font face="Verdana" style="font-size: 8pt">*</font></td> <td width="225" align="left"><font color="#FFFFFF"> <!--webbot bot="Validation" b-value-required="TRUE" --><input name="name" size="32" value="" tabindex="1" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Company:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <input name="company" size="32" value="" tabindex="2" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Address:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <input name="address" size="32" value="" tabindex="3" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">City:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <input name="city" size="32" value="" tabindex="4" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">State/Province:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <select name="state1" tabindex="5" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0" size="1"> <option value="------------">Select</option> <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AZ">Arizona</option> <option value="AR">Arkansas</option> <option value="CA">California</option> <option value="CO">Colorado</option> <option value="CT">Connecticut</option> <option value="DE">Delaware</option> <option value="DC">District of Columbia</option> <option value="FL">Florida</option> <option value="GA">Georgia</option> <option value="HI">Hawaii</option> <option value="ID">Idaho</option> <option value="IL">Illinois</option> <option value="IN">Indiana</option> <option value="IA">Iowa</option> <option value="KS">Kansas</option> <option value="KY">Kentucky</option> <option value="LA">Louisiana</option> <option value="ME">Maine</option> <option value="MD">Maryland</option> <option value="MA">Massachusetts</option> <option value="MI">Michigan</option> <option value="MN">Minnesota</option> <option value="MS">Mississippi</option> <option value="MO">Missouri</option> <option value="MT">Montana</option> <option value="NE">Nebraska</option> <option value="NV">Nevada</option> <option value="NH">New Hampshire</option> <option value="NJ">New Jersey</option> <option value="NM">New Mexico</option> <option value="NY">New York</option> <option value="NC">North Carolina</option> <option value="ND">North Dakota</option> <option value="OH">Ohio</option> <option value="OK">Oklahoma</option> <option value="OR">Oregon</option> <option value="PA">Pennsylvania</option> <option value="RI">Rhode Island</option> <option value="SC">South Carolina</option> <option value="SD">South Dakota</option> <option value="TN">Tennessee</option> <option value="TX">Texas</option> <option value="UT">Utah</option> <option value="VT">Vermont</option> <option value="VA">Virginia</option> <option value="WA">Washington</option> <option value="WV">West Virginia</option> <option value="WI">Wisconsin</option> <option value="WY">Wyoming</option> <option value="--">-----</option> <option id="CAN-AB" value="AB">Alberta</option> <option id="CAN-BC" value="BC">British Columbia</option> <option id="CAN-MB" value="MB">Manitoba</option> <option id="CAN-NB" value="NB">New Brunswick</option> <option id="CAN-NL" value="NL">New & Lab</option> <option id="CAN-NT" value="NT">NW Territories</option> <option id="CAN-NS" value="NS">Nova Scotia</option> <option id="CAN-NU" value="NU">Nunavut</option> <option id="CAN-PE" value="PE">PEI</option> <option id="CAN-SK" value="SK">Saskatchewan</option> <option id="CAN-ON" value="ON">Ontario</option> <option id="CAN-QC" value="QC">Quebec</option> <option id="CAN-YT" value="YT">Yukon</option> <option value="-1">------</option> <option value="-2">Not Listed</option></select></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Zip Code:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="10" --><input name="zip" size="10" value="" tabindex="6" maxlength="10" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Telephone:</font></td> <td width="225" align="left"><font color="#FFFFFF"> <!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="3" s-validation-constraint="Greater than or equal to" s-validation-value="000" s-validation-constraint="Less than or equal to" s-validation-value="999" --><input name="phone_1" size="3" value="" tabindex="7" maxlength="3" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"><font face="Verdana"><span style="font-size: 8pt">-</span></font><!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="3" s-validation-constraint="Greater than or equal to" s-validation-value="000" s-validation-constraint="Less than or equal to" s-validation-value="999" --><input name="phone_2" size="3" value="" tabindex="7" maxlength="3" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0">-<!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" i-maximum-length="4" s-validation-constraint="Greater than or equal to" s-validation-value="0000" s-validation-constraint="Less than or equal to" s-validation-value="9999" --><input name="phone_3" size="4" value="" tabindex="7" maxlength="4" style="font-family: Verdana; font-size: 8pt; color: #000000; border: 1px solid #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Email Address:</font><font face="Verdana" style="font-size: 8pt">*</font></td> <td width="225" align="left"><font color="#FFFFFF"> <!--webbot bot="Validation" s-data-type="String" b-allow-letters="TRUE" b-allow-digits="TRUE" s-allow-other-chars="@." b-value-required="TRUE" --><input name="email" size="32" value="" tabindex="10" style="border:1px solid #000000; font-family: Verdana; font-size: 8pt; color: #000000; background-color:#FFFFA0"></font></td> </tr> <tr> <td valign="top" width="163" align="left"> <font color="#FFFFFF"><span style="font-size: 8pt">How Did You Find Us:</span></font><font face="Verdana" style="font-size: 8pt">*</font></td> <td width="225" align="left"> <font color="#FFFFFF" style="font-size: 4pt"> <!--webbot bot="Validation" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select name="ad_source" id="method" title="How Did You Find Us?" tabindex="11" style="border:1px solid #000000; font-family: Verdana; font-size: 8pt; color: #000000; background-color:#FFFFA0" size="1"> <option value="Select">Select</option> <option value='RV TV'>RV TV</option> <option value='Outdoor Channel'>Outdoor Channel</option> <option value='FMCA Magazine'>FMCA Magazine</option> <option value='FMCA Newsletter'>FMCA Newsletter</option> <option value='Motorhome Magazine'>Motorhome Magazine</option> <option value='Escapees Magazine'>Escapees Magazine</option> <option value="Big Rigs Best Bets">Big Rigs Best Bets</option> <option value='Monaco Coach Lifestyles'>Monaco Coach Lifestyles</option> <option value="Country Coach Destinations">Country Coach Destinations </option> <option value='Marathon Coach Maratime'>Marathon Coach Maratime</option> <option value="Prevost Prouds">Prevost Prouds</option> <option value="Beaver Coach Journal">Beaver Coach Journal</option> <option value="Lazydays Magazine">Lazydays Magazine</option> <option value='Direct Mail Piece'>Direct Mail Piece</option> <option value="Trade Show">Trade Show</option> <option value="ParkModels.com">ParkModels.com</option> <option value='RVLOA'>RVLOA</option> <option value='Google Search'>Google Search</option> <option value='Yahoo Search'>Yahoo Search</option> <option value='MSN Search'>MSN Search</option> <option value='Other'>Other</option></select></font></td> </tr> <tr> <td valign="top" width="163" align="left"> </td> <td width="225" align="left"> <font color="#FFFFFF" style="font-size: 4pt"> <textarea name="method_other" cols="32" rows="2" tabindex="12" style="border:1px solid #000000; font-family: Verdana; font-size: 8pt; color: #000000; background-color:#FFFFA0">If Other Specify</textarea></font></td> </tr> <tr> <td valign="top" width="163" align="left"> <font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Questions/Comments:</font><font face="Verdana" style="font-size: 8pt; text-align: right;">*<p align="right" style="text-align: left; color: #FFFFFF"> <font color="#FFFFFF" face="Verdana" style="font-size: 8pt"> Required Field</font> <font color="#FFFFFF">= </font>* </font></td> <td width="225" align="left" valign="top"><font color="#FFFFFF"> <!--webbot bot="Validation" b-value-required="TRUE" --><textarea name="questions_comments" cols="32" rows="4" tabindex="13" style="border:1px solid #000000; font-family: Verdana; font-size: 8pt; color: #000000; background-color:#FFFFA0"></textarea></font></td> </tr> <tr> <td valign="top" width="388" colspan="2"></td> </tr> <tr> <td valign="top" width="163"> </td> <td width="225" align="left"> <p align="center"> <input type="submit" value="Submit" style="font-family: Verdana; font-size: 8pt; color: #000000; font-weight: bold; border: 1px solid #FFCC00; background-color: #FFCC00"> </td> </tr> <tr> <td colspan="2"> </td> </tr> </table> </form> <script language="javascript" type="text/javascript"> function formComplete(){ alert("Your Information Has Been Sent!"); } </script> <body onsubmit="javascript: formComplete()"> Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589396 Share on other sites More sharing options...
powersitedesign Posted July 14, 2008 Author Share Posted July 14, 2008 Thanks for your help, if you have any other ideas, please shoot them over. I will probably look at this in the morning and kick myself in the head because it has me puzzled. ha. Hopefully in the morning a fresher set of eyes looking at the code and some starbucks will help me figure it out. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589397 Share on other sites More sharing options...
JasonLewis Posted July 14, 2008 Share Posted July 14, 2008 Well you would just do the error handling like in that tutorial I showed you. If it passes, tell them the form has been submitted then go on to process the form. Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589401 Share on other sites More sharing options...
powersitedesign Posted July 14, 2008 Author Share Posted July 14, 2008 I was thinking the same thing, that's what I will do. Thanks, Link to comment https://forums.phpfreaks.com/topic/114624-showing-a-browser-notification-pop-up-once-a-form-is-submitted/#findComment-589408 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.