Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Enable a button via javascript with PostBackUrl set -> the postbackurl doesn't work

Reply
Thread Tools

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

 
 
Fabio Mastria
Guest
Posts: n/a
 
      03-03-2008
Why a button enabled via javascript don't post to a page to the url set in
PostBackUrl property?

thank you all
Fabio

 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      03-03-2008
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)


"Fabio Mastria" wrote:

> Why a button enabled via javascript don't post to a page to the url set in
> PostBackUrl property?
>
> thank you all
> Fabio
>
>

 
Reply With Quote
 
 
 
 
rose
Guest
Posts: n/a
 
      03-04-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to append DropDownList value to button's PostBackUrl? rob ASP .Net 3 03-20-2008 08:03 PM
PostBackURL causes Object reference not set error with Master page Fresh_Air_Rider@Hotmail.com ASP .Net 0 01-18-2007 09:24 PM
How to enable people to pay me....(enable credit card payments in my web app) Patrick ASP .Net 1 11-10-2005 11:07 AM
Enable/Disable a control via JavaScript? Bear Lin ASP .Net Web Controls 0 05-23-2005 10:28 PM
Enable/Disable a control via JavaScript? Paul D. Fox ASP .Net Web Controls 0 04-25-2005 09:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57