Hello everyone... Here is my code: This is not the complete code, i just posted the important codes. I want a redirect code that when users click on the submit button they will be redirected to a thank you page. Example: thankyou.htm but the problem is i dont know the code and i dont know where to add the code... I really need the code for redirecting my user to the thankyou.htm page... Please help me... Thank You! <form accept-charset="UTF-8" action="http://examplepage.com" class="new_entry" id="frmNew" method="post" name="frmNew"> <tr> <td class="fw-editor-label">Categories:</td> <td> <select id="entry_category_1" name="entry[category_1]" style="width: 175px"> <option value="">-Select a Category-</option> <option value="1183433">example 1</option> <option value="1183434">example 2</option> </select> </td> </tr> </table> <tr> <td class="fw-editor-label">WEBSITE URL:</td> <td><input maxlength="40" size="40" id="entryBody" name="entry[body]" type="text"></td> </tr> <input id="entry_do_save_categories" name="entry[do_save_categories]" type="hidden" value="1"> <input id="entry_draft" name="entry[draft]" type="hidden" value="false"> <input id="entry_pending_approval" name="entry[pending_approval]" type="hidden" value="false"> <input id="page" name="page" type="hidden"> <div style="margin-top: 10px;"> <input type="submit" class="fw-input-big fw-button" onclick="document.getElementById('entry_draft').value=0; document.forms['frmNew'].submit();return false;" value="Submit" /> <input type="button" class="fw-input-big fw-button" onclick="document.location='http://examplepage.com/1.htm'; return false;" value="Cancel"/> </div> </form>
I think that Aweber does that automatically. I am not such a techie myself but I learned a lot to accomplish that now. whenever I create an Html page I use a WYSIWYG program that easies it all up for me. i don't need to stumple upon too much coding. The more you easy it up the less time you will spend on it. You can use webbuilder 7.0 Then you can easily create the thank you page or any other program and you can put the order from the home page to the thank you page, or any other page that you would like to build in . NVU for example. The less time you spent on it the more time you would have on other things like linkbuilding etc.
Thanks Amasran but i really dont need that stuff right now. All the codes are working right on my site i just want the redirect code.
First: never use a cancel button in forms. You don't need it and visitors will click it accidently. About your problem: let the page that handles the form show a thankyou message.
Since you have no action item in the form header, and no onSubmit code showing, we don't know whether the form self-submits (submits to the page the form is on) or some other code. But. as webdesigner says, I'd do the redirect on the page you're submitting to. If the submit works, thank the user. If not, post some relevant error message.
Hi Kearra, There is no submit button in your code. How are you trying to submit your page? Usually we have a submit button in form and we associate some action on submitting form, in that action you can redirect to user to Thank you page. code will look like following : <form action="thanksyou.php" method="post"> // form content <input type="submit" value="submit" name="submit"/> </form> So whenever user will click on submit button, action associated with form will execute, in our case its thanksyou.php file. In this file you can write your thanks you message for user. Other than submit button we have other ways also to submit the form. but first you should try this, if codes work for this you can switch to other method. Let me know if you need any further help Regards, Sheetal
Hey Kearra, you should use following line instead of your <form.... <form accept-charset="UTF-8" action="http://examplepage.com/thankyou.htm" class="new_entry" id="frmNew" method="post" name="frmNew">
Gah. Thank you. Gotta love filling out a form with thirty fields then hitting "Clear" or something similar, haha.