Linera Posted March 3, 2007 Share Posted March 3, 2007 How does this form take the user to another page? <form method="post"><input type="image" src="images/createaccount-button2.gif" alt="Create Account" ></form> Link to comment Share on other sites More sharing options...
Anders Moen Posted March 3, 2007 Share Posted March 3, 2007 <form action="some_other_site.php" method="post"><input type="image" src="images/createaccount-button2.gif" alt="Create Account" ></form> Is this what you mean? Link to comment Share on other sites More sharing options...
boen_robot Posted March 3, 2007 Share Posted March 3, 2007 In this form, it doesn't. You need to make some <input type="submit"/> or submit the form with JavaScript on some event. Link to comment Share on other sites More sharing options...
Linera Posted March 3, 2007 Author Share Posted March 3, 2007 This is all i saw in the code for the button which takes you to the page titled agreement.html. Link to comment Share on other sites More sharing options...
boen_robot Posted March 3, 2007 Share Posted March 3, 2007 This is all i saw in the code for the button which takes you to the page titled agreement.html.Unless this form is in agreemenet.html itself, you need to have at least the action attribute, as andersmoen has whoed. Either that, or JavaScript to add it. Care to show the whole page's code (a link ideally)? Link to comment Share on other sites More sharing options...
Linera Posted March 3, 2007 Author Share Posted March 3, 2007 http://signup.theendless.logical-host.com/ Link to comment Share on other sites More sharing options...
boen_robot Posted March 3, 2007 Share Posted March 3, 2007 If you look at the page you'll see that the elf takes you to agreement.html and the code on the elf is: <a href = "agreement.html"><img src = "images/circle-ac2.jpg" width = "186" height = "184" border = "0"></a> The form takes you to to mehu.html, which is actually the same page you're on (that's what I said would happen without the action attribute). Link to comment Share on other sites More sharing options...
Linera Posted March 4, 2007 Author Share Posted March 4, 2007 I know the elf image takes you to agreement.html but the button labeled Create Account also takes you to agreement.htmlGoto http://signup.worldofwarcraft.comThen click Create account. Link to comment Share on other sites More sharing options...
boen_robot Posted March 4, 2007 Share Posted March 4, 2007 I know the elf image takes you to agreement.html but the button labeled Create Account also takes you to agreement.htmlGoto http://signup.worldofwarcraft.comThen click Create account.On worldofwarcraft.com that indeed happens, but on theendless.logical-host.com it doesn't, yet the markup is (almost) equivalent (excluding the guest thing). I guess their server is set up to parse ".html" files as some S3L, which btw, they haven't revealed (it's not visible in the HTTP response headers). Either that language, or Apache itself parses the POST data and from it, realises that it needs to redirect you to agreement.html.In other words: don't bother copying, because there's some stuff you can't copy. Just add the action attribute. Link to comment Share on other sites More sharing options...
Xenon Design Posted March 4, 2007 Share Posted March 4, 2007 Well it would work by some tricky DOM javascript. Since theres no ID tags it makes it more difficult for a developer to make but more to copy/steal. But basically with a few document.getElementsByName and targeting the form tag you could easily make a javascript firing script. From there its a piece of cake :)If you want me to I can make a mock up? Link to comment Share on other sites More sharing options...
Linera Posted March 4, 2007 Author Share Posted March 4, 2007 I prefere to do it myself.I am doing this all to help me learn stuff like right now I'm learning on making a complete signup page for accounts. Link to comment Share on other sites More sharing options...
boen_robot Posted March 4, 2007 Share Posted March 4, 2007 I prefere to do it myself.I am doing this all to help me learn stuff like right now I'm learning on making a complete signup page for accounts.Well then, learn to add the action attribute. Link to comment Share on other sites More sharing options...
Linera Posted March 4, 2007 Author Share Posted March 4, 2007 I know there has to be another way to do it since blizzard did it with their site. Link to comment Share on other sites More sharing options...
boen_robot Posted March 4, 2007 Share Posted March 4, 2007 I know there has to be another way to do it since blizzard did it with their site.I told you, it's a server configuration. Edit the page's extension to PHP and add this at the top of the file:<?phpif (!empty($HTTP_RAW_POST_DATA) {http_redirect ('agreement.html');}?> If you have access to Apache's configuration, add this to it and you can safely .html while still having this working: AddType application/x-httpd-php .html Link to comment Share on other sites More sharing options...
Linera Posted March 4, 2007 Author Share Posted March 4, 2007 Thank you so much.Edit: After placing the coding in, I found it doesn't redirect to agreement.html. Link to comment Share on other sites More sharing options...
justsomeguy Posted March 5, 2007 Share Posted March 5, 2007 Also, just to point out, you don't need <input type="submit"> to submit a form. This is how you create a submit button based on an image:<input type="image" src="...">type="image" is defined to submit the form on click. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now