Jump to content


Photo

Cancel Button


  • Please log in to reply
7 replies to this topic

#1 brokenhope

brokenhope
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 22 March 2006 - 10:09 PM

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?

#2 .-INSANE-.

.-INSANE-.
  • Members
  • PipPip
  • Member
  • 29 posts

Posted 23 March 2006 - 03:09 AM

i dont quite understand what ur saying but what i think you want is a button that directs you to a new page

heres what you can do
go to insert>media>flash button fill out the field EXCEPT for the link part
then ur button will appear
now go to the code and insert this code
<a href="whateverpage.php" class="style1"></a>
that should work

i 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

#3 brokenhope

brokenhope
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 23 March 2006 - 03:18 AM

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...

#4 .-INSANE-.

.-INSANE-.
  • Members
  • PipPip
  • Member
  • 29 posts

Posted 23 March 2006 - 03:34 AM

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
<a href="whateverpage.php"><button>Cancel</button></a>


#5 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 23 March 2006 - 10:48 AM

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:

<input tpye="button" value="Cancel" onclick="window.location='differentpage.php'" />

Hope that helps. If you do want it to send information, then let me know and you can do it with javascript.
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application

#6 .-INSANE-.

.-INSANE-.
  • Members
  • PipPip
  • Member
  • 29 posts

Posted 24 March 2006 - 01:45 AM

[!--quoteo(post=357540:date=Mar 23 2006, 03:48 AM:name=Gast)--][div class=\'quotetop\']QUOTE(Gast @ Mar 23 2006, 03:48 AM) View Post[/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:

<input tpye="button" value="Cancel" onclick="window.location='differentpage.php'" />

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

#7 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 24 March 2006 - 05:08 PM

[!--quoteo(post=357821:date=Mar 24 2006, 01:45 AM:name=.-INSANE-.)--][div class=\'quotetop\']QUOTE(.-INSANE-. @ Mar 24 2006, 01:45 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
what ever itll do the same thing
[/quote]

Yes, but it will probably not validate.
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application

#8 Javizy

Javizy
  • Members
  • PipPipPip
  • Advanced Member
  • 44 posts

Posted 25 March 2006 - 11:50 PM

[!--quoteo(post=357970:date=Mar 24 2006, 05:08 PM:name=Gast)--][div class=\'quotetop\']QUOTE(Gast @ Mar 24 2006, 05:08 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Yes, but it will probably not validate.
[/quote]

Why don't you have the buttons like


<input type="submit" name="submit" value="submit" />
<input type="submit" name="submit" value="cancel" />

Then on the page the form usually leads to, check the submit value first off and redirect if it's cancel.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users