VBA / Excel - " __doPostBack "

Estevam Guilherme

New Member
Joined
Jul 16, 2015
Messages
9
I'm trying to submit a form on a old asp classic page.

Here some script:
[ ******** type="text/javascript">
//<=!=[=C=D=A=T=A=[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]=]=>
*********>

<tbody>
</tbody>
]

Using Fiddler and navegating manually I got this:


And when I navegates using my code:

<dim sformlogin="" as="" string

sFormParameters = Join(Array( _
"__EVENTTARGET=", _
"__EVENTARGUMENT=", _
"__VIEWSTATE=", _
"__EVENTVALIDATION=", _
"ctl00$ContentPlaceHolder1$acc_Calendario1$myCalendario1$ctl22=17", _
"ctl00$ContentPlaceHolder1$acc_Calendario1$HiddenField1=", _
"__VIEWSTATEGENERATOR=C2EE9ABB", _
"__VIEWSTATEENCRYPTED"), "&")

Call IE.document.parentWindow.execScript("javascript: __doPostBack('sFormParameters')", "JavaScript")>

I have this: But it's not working.



How can set the parameters to get this working</dim>
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,215,298
Messages
6,124,116
Members
449,142
Latest member
championbowler

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top