postback

G

Guest

when will the page create a JS for postback??
I am trying to handle it manually, it wont find the function??
__doPostBack('btnSearch','');

Is that function generated after a postback??
Is there anyway to generate it on load??

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["baseForm"];
}
else {
theform = document.baseForm;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>


--
http://pathidotnet.blogspot.com
=====
vInAypAtHi
o__
---_,>/'_------
(_) \(_)
---------------
 
S

Stefan

To my knowledge you can't generate the postback script yourself.
However, if your intent is to intercept the postback for e.g. a button,
you can register a script for that button prior to execution of
postback (using the controls Attributes member).

In the javascript you can then decide whether you want the postback to
fire or not (setting e.Cancel = true or false)
 

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

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top