Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

onclick javascript event not called on submit button

Avatar of rohan_koudinya
rohan_koudinya asked on
ASP.NETRegular Expressions
9 Comments1 Solution659 ViewsLast Modified:
I am using an onclick javascript event on a submit button, but that is not getting executed!!
this code works fine in Mozilla but not in IE7 (am using the same code at several other pages where it works fine even in IE7)
here is the code:
buttonSavePassword.Attributes.Add("onclick ", "return VerifyXssCharacters('" + textBoxNewPassword.ClientID + "','" + textBoxVerifyNewPassword.ClientID + "','" + RM.GetString("InvalidPatternExpression") + "');");
i register this event in the page_load()
also when viewing the view source of the page the code for the button reads as:

<input type="submit" name="ctl00$C$buttonSavePassword" value="Save Changes" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$C$buttonSavePassword&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_C_buttonSavePassword" class="button-mouseout" onmouseover="this.className='button-mouseover'" onmouseout="this.className='button-mouseout'" />

can somebody help!!
Avatar of muhammadyasir
muhammadyasirFlag of Pakistan image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answers