<html>
<body>
<form method="post" name="test">
<input type="button" name="button1" value="login" onClick="javascript:
document.test.action='login.php';document.test.submit();"><input type="button" name="button2" value="Register"
onClick="javascript: document.test.action='register.php';document.test.submit();">
</form>
</body>
</html>
You can do it this way.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
If javascript is disabled, even the form validation/ajax wouldn't work. :)
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
What Ajax? A well written script will function without either javascript or Ajax. A good example: http://holyculturedownload.com/
That unfortunately, didn't work in FF2 when I disabled javascript. Click on the "Listen" button to test. Strangely, even gmail's "send" button didn't work when I disabled javascript.A form should not rely only on javascript for validation - the PHP side should also check the $_POST data.
Yes, ofcourse.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
The point was that the SITE functions without javascript for the purpose of search engine indexing (which it does very well).... I dont believe that Googlebot listens to music
Nope. That wasn't the point. The point was,And if the user has javascript turned off? Nothing happens, not good.What Ajax? A well written script will function without either javascript or Ajax. A good example: http://holyculturedownload.com/.
But the bottomline is, if javascript is disabled, many options in the site holyculturedownload doesn't work.
FYI,JavaScript must be enabled in order for you to use Gmail in standard view. However, it seems JavaScript is either disabled or not supported by your browser. To use standard view, enable JavaScript by changing your browser options, then try again.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
Clearly you have a bee in your bonnet. So, you find that javascript controls dont work on a site when javascript is turned off? Congratulations, perhaps you learned something?
Unfortunately, I didn't learn anything (well, because there is nothing to learn from that.) But the answer forSo, you find that javascript controls dont work on a site when javascript is turned off?
is, Yes. With javascript turned off, some features of the site doesn't work. the point there was that this is vital for search engines,
I never mentioned any search engine. The OP had a question and I just answered. not for users who KNOW they cannot disable javascript on such a site and expect to enjoy the rich features.
if the user has javascript turned off? Nothing happens, not good.I know exactly what my first point was - that if javascript is turned off in a FORM for user input and it does not function, then that is not good (your form example).
Again, how can one turn off javascript IN a form and not the whole page. (From the end user's POV.)Try the form on holyculturedownload.com and tell me that it doesn't work, both with and without javascript - THAT is how forms should work.
I had enough of that stupid site. And the enduser can't "turn off" javascript for a form. If he turns it off, he turns it off for the whole page.
Cheers,
Naveen
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
There, by your own hand. Your "solution" was a very bad one.
Damn. This is so bad. You didn't get the feeling of sarcasm from that.As for your bagging of holyculturedownload.com, I believe that is jealousy pure and simple
ROFLMAO. Jealous of what ? That website ? :twisted: Wow man ! You have some "nice" imagination.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
You are sarcastic about the reality of how bad your solution is? Now THAT is funny :icon_cheesygrin:
:twisted: Nope ! I was sarcastic about your first statement.if the user has javascript turned off? Nothing happens, not good. duh!You spend so much time bagging a site because non essential javascript controls don't work when javascript is turned off in a user's browser (surprise, surprise!),
A user can't turn off javascript for a FORM (More surprise !!!).yet cant see the reality of how bad it is to code an ESSENTIAL feature that is totally dependent on javascript.....
I thought the "LISTEN" button was an ESSENTIAL feature of that stupid site !the ONLY point you have proved is how BAD our solution is.
:icon_rolleyes: Yeah, asking the user to have a hyperlink instead of what he asked for(ie., a button), is a VERY GOOD solution!Yes, you are quite clearly jealous... that is even funnier :icon_lol:
Give me one good reason why I should jealous of one crappy site ? ;) If a site can make someone jealous, then oh yeah, I am jealous of yahoo, msn, google, and oh, daniweb as well ! LMAO.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
Why be sarcastic about something that is quite clearly correct?
Quite clearly correct ? :icon_lol: setting the action of a form when a button is clicked is correct as well. Just like how "some" features of a stupid site doesn't work when javascript is turned off, a form which uses javascript to assign the action, wouldn't work. You try to make a point that non essential things like "listen" buttons not working are "bad", yet cant see how ridiculous it is to create a form that wont function without javascript. DUH!!!!!
Thats exactly my point. If you "Turn off" javascript, anything dependent on javascript will fail. Oh really? Paste your own code into a file, open it in your browser with javascript turned off. Then tell me that it still works :icon_lol: SURPRISE!!!!!..... it doesn't.
As I have already said umm.. more than 10 times, anything DEPENDENT on javascript WILL NOT work if javascript is turned off. Eg.JavaScript must be enabled in order for you to use Gmail in standard view. However, it seems JavaScript is either disabled or not supported by your browser. To use standard view, enable JavaScript by changing your browser options, then try again.
To use Gmail's basic HTML view, which does not require JavaScript, click here.
If you want to view Gmail on a mobile phone or similar device click here. Yes, a user CAN turn off javascript for your form.
Wow ! Is that so ? A user can turn off javascript ONLY for a form and not for the whole page ! Hmmm.. you know something that others dont ! *wink wink* You thought wrong (as you do about many things). I think you will find that you can still, browse the site, create an account, purchase music and any other essential thing with javascript turned off. The essential things all work just fine.
Lol..But still some things wouldn't work. Oh, I noticed something.. Even Daniweb's smiley dropdown, undo, redo wouldn't work if I turn off javascript :( ! Sad, Isn't it ? That you like to call it "stupid" only indicates your own insecurity.
Wow! Insecurity ! You will steal my job ! :S LOL.. You probably are. One good reason? Ok, you wouldn't have a clue how to make anything close to it.
I just noticed its a site done by you/your company ! awww! you poor thing ! If my words hurt your feelings, I am sorry ! :twisted:
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356