brokenhope Posted March 22, 2006 Share Posted March 22, 2006 Im making a cancel button for my registration, and I was wondering how I would get the cancel button to direct you to a diffrent page? I mean do I have to make a whole new <form action="diffrentpage.php" method="post><input type="submit" value="Cancel"></form>? Or can I do some onClick="" event? This might involve some light javascript? Im not sure, but I would prefer it was within the same form tag as the registration button, which submits the form... is that possible? Is that a good or bad idea? Quote Link to comment https://forums.phpfreaks.com/topic/5538-cancel-button/ Share on other sites More sharing options...
.-INSANE-. Posted March 23, 2006 Share Posted March 23, 2006 i dont quite understand what ur saying but what i think you want is a button that directs you to a new pageheres what you can dogo to insert>media>flash button fill out the field EXCEPT for the link partthen ur button will appear now go to the code and insert this code[code]<a href="whateverpage.php" class="style1"></a>[/code]that should worki jus did it this way with inserting the code that way you can change it whenever you want to youdont have to go bak and make a new flash button.you can also make you own buttons and click on it then fill out the link field Quote Link to comment https://forums.phpfreaks.com/topic/5538-cancel-button/#findComment-19828 Share on other sites More sharing options...
brokenhope Posted March 23, 2006 Author Share Posted March 23, 2006 That doesnt make sense... I dont edit in dreamweaver or anything... I use notepad... and by button i mean, submit button, not a button in flash... Quote Link to comment https://forums.phpfreaks.com/topic/5538-cancel-button/#findComment-19829 Share on other sites More sharing options...
.-INSANE-. Posted March 23, 2006 Share Posted March 23, 2006 ok u dont make the button in flash its made in dreamweaver and i didnt kno u coded in notepad nvm i figured it out [code]<a href="whateverpage.php"><button>Cancel</button></a>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/5538-cancel-button/#findComment-19831 Share on other sites More sharing options...
Gast Posted March 23, 2006 Share Posted March 23, 2006 That is not what he means, and I would advise using <input type="button" /> not the <button> tag.I assume you want to have a form that they can submit normally but also cancel it if they want. If you want information to send when they click cancel as well, then you cannot have 2 submit buttons, but you can use:[code]<input tpye="button" value="Cancel" onclick="window.location='differentpage.php'" />[/code]Hope that helps. If you do want it to send information, then let me know and you can do it with javascript. Quote Link to comment https://forums.phpfreaks.com/topic/5538-cancel-button/#findComment-19893 Share on other sites More sharing options...
.-INSANE-. Posted March 24, 2006 Share Posted March 24, 2006 [!--quoteo(post=357540:date=Mar 23 2006, 03:48 AM:name=Gast)--][div class=\'quotetop\']QUOTE(Gast @ Mar 23 2006, 03:48 AM) [snapback]357540[/snapback][/div][div class=\'quotemain\'][!--quotec--][!--coloro:red--][span style=\"color:red\"][!--/coloro--][!--sizeo:3--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--]That is not what he means, and I would advise using <input type="button" /> not the <button> tag.[!--sizec--][/span][!--/sizec--][!--colorc--][/span][!--/colorc--]I assume you want to have a form that they can submit normally but also cancel it if they want. If you want information to send when they click cancel as well, then you cannot have 2 submit buttons, but you can use:[code]<input tpye="button" value="Cancel" onclick="window.location='differentpage.php'" />[/code]Hope that helps. If you do want it to send information, then let me know and you can do it with javascript.[/quote] what ever itll do the same thing Quote Link to comment https://forums.phpfreaks.com/topic/5538-cancel-button/#findComment-20166 Share on other sites More sharing options...
Gast Posted March 24, 2006 Share Posted March 24, 2006 [!--quoteo(post=357821:date=Mar 24 2006, 01:45 AM:name=.-INSANE-.)--][div class=\'quotetop\']QUOTE(.-INSANE-. @ Mar 24 2006, 01:45 AM) [snapback]357821[/snapback][/div][div class=\'quotemain\'][!--quotec--]what ever itll do the same thing[/quote]Yes, but it will probably not validate. Quote Link to comment https://forums.phpfreaks.com/topic/5538-cancel-button/#findComment-20305 Share on other sites More sharing options...
Javizy Posted March 25, 2006 Share Posted March 25, 2006 [!--quoteo(post=357970:date=Mar 24 2006, 05:08 PM:name=Gast)--][div class=\'quotetop\']QUOTE(Gast @ Mar 24 2006, 05:08 PM) [snapback]357970[/snapback][/div][div class=\'quotemain\'][!--quotec--]Yes, but it will probably not validate.[/quote]Why don't you have the buttons like[code]<input type="submit" name="submit" value="submit" /><input type="submit" name="submit" value="cancel" />[/code]Then on the page the form usually leads to, check the submit value first off and redirect if it's cancel. Quote Link to comment https://forums.phpfreaks.com/topic/5538-cancel-button/#findComment-20728 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.