473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Autopostback prgrammitically from client-side script

EC
I have a web control button with which runs a client side script before it
the autopostback using the onclick event. It is working fine when the user
clicks it.

What I would like to do is "click" this button programmtically from a client
side script. Any ideas?

Or is there a way to call the autopostback event of the button and still run
the client side script?
Nov 18 '05 #1
3 1424
You can declare a server side script block and call that from the client.

- Sahil Malik
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik
"EC" <X@x.x> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have a web control button with which runs a client side script before it
the autopostback using the onclick event. It is working fine when the user clicks it.

What I would like to do is "click" this button programmtically from a client side script. Any ideas?

Or is there a way to call the autopostback event of the button and still run the client side script?

Nov 18 '05 #2
<script>
document.getElementById('buttonID').click();
</script>

-- bruce (sqlwork.com)

"EC" <X@x.x> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have a web control button with which runs a client side script before it
the autopostback using the onclick event. It is working fine when the user clicks it.

What I would like to do is "click" this button programmtically from a client side script. Any ideas?

Or is there a way to call the autopostback event of the button and still run the client side script?

Nov 18 '05 #3
That was it. Thanks!
"bruce barker" <no***********@safeco.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
<script>
document.getElementById('buttonID').click();
</script>

-- bruce (sqlwork.com)

"EC" <X@x.x> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have a web control button with which runs a client side script before
it
the autopostback using the onclick event. It is working fine when the

user
clicks it.

What I would like to do is "click" this button programmtically from a

client
side script. Any ideas?

Or is there a way to call the autopostback event of the button and still

run
the client side script?


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: huobazi | last post by:
Can NOt AutoPostBack for two DDL Posted: 07-03-2003 01:35 AM I have a usercontrol a.ascx ,put two DDL on the ascx. in an aspx's codebehind Page_Load i use LoadControl to Load the a.ascx in my...
3
by: Lloyd Sheen | last post by:
I have a page that works fine. I am trying to optimize the page by overriding some of the Information that is being saved in the hidden VIEWSTATE. If I make the properties of the dropdown False...
1
by: Matthew Louden | last post by:
why need to set autopostback property to be true?? I know autopostback event means to send the form to the server automatically. I tried checkbox, checkbox list, radio button, and radio button...
6
by: Sunil | last post by:
Dear All I am a bit confused about AutoPost Back. My concept about AutoPostBack is that If AutoPostBack i "TRUE" for a Web Form the Web Form Goes back to the server and displays a fresh copy of...
0
by: Scott | last post by:
Hi. I'm having some problems with AutoPostBack in my asp.net pages running on Windows 2003/IIS 6. The pages are really simple. For example, one of them contains two dropDownLists. The firstdrop...
3
by: indigator | last post by:
I am using ASP.NET 2.0. I have 2 dropdownlists in my page. One holds the list of all the countries and other holds the list of all States. When the user selects the country as United States, I want...
2
by: Tom Edelbrok | last post by:
Question: Why does a button event (ie: Button1_Click) get executed on the first click for a textbox control which has 'autopostback=false', but doesn't get executed until a second click when...
3
by: Brad | last post by:
The first text on my form is a numeric field. I have a javascript that runs on this field for onkeyup (validate the key strokes and modifies fields on the screen) but when I do this and have the...
0
by: andy | last post by:
Hi, I have a form uses several dropdownlists to narrow a set of criteria. ( This is in turn used to control what is shown on a gridview. ) With each, the user selects an entry and then the next...
6
by: Peter | last post by:
ASP.NET 2.0 Visual Studio 2008 I have the following code and when the textbox displays and I press Enter while in the text box I get AutoPostBack, how do I stop AutoPostBack? TextBox txt =...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.