473,587 Members | 2,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

__doPostBack at OnLoad Page

I am attempting to use the ASP.NET generated __doPostBack JavaScript function
in my custom JavaScript and I can use it successfully but only after the web
page is loaded and idle.

I prefer to invoke __doPostBack immediately after web page load. I have
been attempting to use the HTML Body OnLoad event to trigger invoking
__doPostBack without success.

Any idea why __doPostBack can not be invoked at the HTML Body OnLoad event ?
Do you have an alternative suggestion ?

--
Philip
Sep 12 '06 #1
1 3075
the __doPostBack code calls routines in an included javascript file. these
routines will not be available until pageload fires. but i don't belive the
bowser will allow allow a postback during the onload event, so you need to
schedule it right after.

<body onload="window. setTimeout('myP ostback()')" >

-- bruce (sqlwork.com)

"Philip" <ph****@softwar eforever.comwro te in message
news:14******** *************** ***********@mic rosoft.com...
>I am attempting to use the ASP.NET generated __doPostBack JavaScript
function
in my custom JavaScript and I can use it successfully but only after the
web
page is loaded and idle.

I prefer to invoke __doPostBack immediately after web page load. I have
been attempting to use the HTML Body OnLoad event to trigger invoking
__doPostBack without success.

Any idea why __doPostBack can not be invoked at the HTML Body OnLoad event
?
Do you have an alternative suggestion ?

--
Philip

Sep 12 '06 #2

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

Similar topics

1
6800
by: paul reed | last post by:
Hello, I am having some weird behavior between two machines...one which is running the 1.1 framework and one which is running 1.0. After opening a child form from a parent...I update the database then call the __doPostBack function of the window.opener. This has been working like a charm for the last several months. Our ISP where we run...
2
13015
by: Mike Dunn | last post by:
I would like to change the name of the _doPostBack function emmitted by the ASP.NET framework to prefix it with an ordinal number i.e. the page should show <script language="javascript"> <!-- function _369__doPostBack(eventTarget, eventArgument) { var theform = document.frmRetailTenantGadget; theform.__EVENTTARGET.value = eventTarget;
3
10865
by: E | last post by:
I have 2 aspx pages... neither of which do anything out of the ordinary. One of the pages automatically generates this block of code when viewed at the client: ------------------------------------------------------------ <form name="webfrmForm" method="post" action="pokedex.aspx" id="webfrmForm"> <input type="hidden" name="__EVENTTARGET"...
1
2482
by: Adrian | last post by:
I appear to be losing ViewState information when calling the __doPostBack function. I am attempting to use the showModalDialog to load a new web page which confirms that a user wishes to save a query. The showModalDailog returns a value to the original page which is used as a parameter in __doPostback, in turn trapped by the Page_Load...
0
1245
by: Granger Godbold | last post by:
This is in regards to the long-standing bug with the colons in the form-id. I'm not satisfied with the main workaround that's been circulating: http://www.asp.net/Forums/ShowPost.aspx?PostID=191953 And I'm rather annoyed that Microsoft won't put the fix out for anonymous download (However, one can get to it from links in the above forum)....
3
2981
by: Marcelo | last post by:
Hello, I am trying to create a postback event, and it is working, just not calling the sub. I have a datagrid which has <asp:DataGrid id="Mensajes" ... <Columns> <asp:HyperLinkColumn ....
0
1907
by: Steve Richter | last post by:
ok, I admit I dont know what I am doing ... When a user clicks on a <tr> in a <table> I want the page to be posted back to the server with info as to what row was clicked. <tr style="background-color:ffecd8" onmouseover="this.style.backgroundColor='#ffdcff';" onmouseout="this.style.backgroundColor='#ffecd8';"...
2
3915
by: SteveSu | last post by:
Hi! I want to make a postback when the user hits the escape-button on the keyboard and redirect the user to another page. But the response.redirect does not work for me in this "context". I´m trying to do like this: <body onkeydown="MyRedirect()">
3
2687
by: Steve Wonderful | last post by:
I checked the rendered html and found __doPostBack() function was not found in the html source. Is there a reason? How do I force it to be generated. The page seems to function properly for post back but I DO need the __doPostBack() function to post back by a child popup window.
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7849
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8347
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.