Enable a button via javascript with PostBackUrl set -> the postbackurl doesn't work

F

Fabio Mastria

Why a button enabled via javascript don't post to a page to the url set in
PostBackUrl property?

thank you all
Fabio
 
B

bruce barker

dpends on how you are enabling the control. if you are using a PostbackUrl,
this is done in javascript by setting the button's onclick event to
WebForm_DoPostBackWithOptions. one of the args is the postback url. this
function updates the action, does a form submit and cancels the buttons event.

view source to see what javascript is on the button's onclick (maybe you
defined an action that prevents the proper behavior).


-- bruce (sqlwork.com)
 
R

rose

It might be because in the javascript code, you have set the return
statement to false. i.e. return false;
If it is so, the button will not postback
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top