M
Marcelo
Hello,
I am trying to create a postback event, and it is working, just not calling
the sub.
I have a datagrid which has
<aspataGrid id="Mensajes"
...
<Columns>
<asp:HyperLinkColumn
....
DataNavigateUrlFormatString="javascript:__doPostBack('loadMessage','{0}')"
I also placed the following javascript function:
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape")
}
else {
theform = document._ctl0;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
In the Sub Page_Load
I have
response.write ("__EVENTTARGET " & request("__EVENTTARGET") & "<br>")
response.write ("__EVENTARGUMENT " & request("__EVENTARGUMENT") & "<br>")
and I do receive both parameters, but the sub 'loadMessage' never gets
called.
Right now I patched it using a switch/case __EVENTTARGET then calling the
sub "manually".
What did I miss?
Thanks
I am trying to create a postback event, and it is working, just not calling
the sub.
I have a datagrid which has
<aspataGrid id="Mensajes"
...
<Columns>
<asp:HyperLinkColumn
....
DataNavigateUrlFormatString="javascript:__doPostBack('loadMessage','{0}')"
I also placed the following javascript function:
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape")
theform = document.forms["_ctl0"];-1) {
}
else {
theform = document._ctl0;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
In the Sub Page_Load
I have
response.write ("__EVENTTARGET " & request("__EVENTTARGET") & "<br>")
response.write ("__EVENTARGUMENT " & request("__EVENTARGUMENT") & "<br>")
and I do receive both parameters, but the sub 'loadMessage' never gets
called.
Right now I patched it using a switch/case __EVENTTARGET then calling the
sub "manually".
What did I miss?
Thanks