How do I trigger a button Postback from javascript.

How do I trigger a button Postback from javascript.

Post by Lakshan Wannakuwatt » Thu, 15 Aug 2002 12:19:56



Hi all,
  I have a Submit button which is a button server control to submit the
page when the user presses on it.  I have also validation controls on
the page to do client side validations.  On one side of the page I have
Quick Links for the user to navigate to other pages.  
  Now when a user clicks on a quicklink I want to ask the user if he
wants to save the page data.  If the user selects 'Yes' I want to make
the page post back as if the user had pressed the Submit button and
attach some extra info to the event argument to be processed on the
server side.  
  Is there a way to achieve this from the client side javascript.

  Your help will be greatly appreciated.

Thanks
Lakshan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

How do I trigger a button Postback from javascript.

Post by Victor Garcia Apre » Thu, 15 Aug 2002 12:26:55


Hi Lakshan,

If your user pressed 'yes' you could call the ASP.NET generated javascript
function __doPostBack(eventTarget, eventArgument) with the params of your
choice,

-Victor.

--
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.


Quote:> Hi all,
>   I have a Submit button which is a button server control to submit the
> page when the user presses on it.  I have also validation controls on
> the page to do client side validations.  On one side of the page I have
> Quick Links for the user to navigate to other pages.
>   Now when a user clicks on a quicklink I want to ask the user if he
> wants to save the page data.  If the user selects 'Yes' I want to make
> the page post back as if the user had pressed the Submit button and
> attach some extra info to the event argument to be processed on the
> server side.
>   Is there a way to achieve this from the client side javascript.

>   Your help will be greatly appreciated.

> Thanks
> Lakshan

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!


 
 
 

How do I trigger a button Postback from javascript.

Post by Lakshan Wannakuwatt » Fri, 16 Aug 2002 03:24:02


Thanks for your response Victor

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!