0

I have form that takes input and i have submit button and reset input type... i have issue with submit button tag in IE 7, all rest of browser and IE version >7 working fine...

here is my code ...

 <form id="form_searchProperty" action="../jQuery Search Engine/searchPage01.html"> //input tag for form value <div class="submitCriteria"> <button class="button_submit" >Search</button> <input class="button_reset" type="reset" /> </div> </form> 

jQuery function

 $("#form_searchProperty").submit(function () { var givenCriteria = $(this).serializeArray(); }); 
3
  • Not sure I get it? A button inside a form will submit the form, so you need to prevent that, but your javascript function doesn't really do anything? What seems to be the problem! Commented Jun 17, 2013 at 11:59
  • 1
    You forget to define type="submit" for button...Its IE you must not forget this. Commented Jun 17, 2013 at 12:00
  • sorry my fault i totally miss out type in button Commented Jun 17, 2013 at 12:04

2 Answers 2

5

Use the type submit,

<button class="button_submit" type='submit' >Search</button> 
Sign up to request clarification or add additional context in comments.

Comments

-1

<button> does NOT submit forms unless you tell it to - at least, it's not supposed to. It does in some browsers, for some annoying reason.

Why not use an actual submit button?

<input type="submit" class="button_submit" value="Search" /> 

2 Comments

It actually does in all browsers, except old IE !
yh that true ... i was struggling with IE 7

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.