This code is working perfectly in Chrome and Firefox but i am unable to work it out in IE can some help me out with this

<form name="login" method="post" id="login_form">
	  		<div class="form_back">
		    	<input name="text" type="text" id="username" />
				<input name="text2" type="password" id="password" />
				<a href="" onclick="$(this).closest('form').submit(); return false;" class="login"><div id="login_button"></div></a>
			</div>
		</form>

Regards,
Daneuchar

Recommended Answers

All 3 Replies

Instead of: $(this).closest('form').submit() try: $('#login_form').submit() AND make sure that there is NO html element with name="submit" (nor id="submit" )

What errors did you get? Form always required 'action', that is the url where the form data received and processed.

<form name="login" method="post" id="login_form" action="login.php">

I tested with IE7 and it sent the data finely. What version of IE are you using and what is the problem ? Post more info and we can help.

@hielo thanx a lot worked like a charm :)
@Zero i am using $("#login").submit(function(){..... with $.post so i am not defining action in the form attributes

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.