Jump to content

how does this form work?


Linera

Recommended Posts

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

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

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

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

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...