postback

  • Thread starter Thread starter Guest
  • Start date Start date
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__
---_,>/'_------
(_) \(_)
---------------
 
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)
 
Back
Top