Hi,

I am trying to login to a site which is a pretty standard process when using the ClientForm library. My problem is that when I login I am redirected to a site that says another user is logged in on the account and to click to continue and kick that user off. I want to continue but the button is not part of a form so I can't use form.click() from ClientForm.

The actual code for the button calls javascript

<icode><input onclick="__doPostBack('btnLogOff','')" name="btnLogOff" type="button" id="btnLogOff" value="Continue" style="margin-left:325px;" /></icode>

and here is the __doPostBack javascript function it references...

<code>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms;
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
</code>

I feel like I have tried a lot...trying to find a URL that the click leads to, creating a query string with the relevant variables and appending that to the url...etc.

Also here is the form that ClientForm parsed out of the page that says click to continue...

<HiddenControl(__VIEWSTATE=/wEPDwUJNDg0NTk4OTQ1ZGSFbL7dcclwfVx722wwFbc3Xdmu0w==) (readonly)>
<IgnoreControl(btnLogOff=<None>)>>

I fooled around with setting the btnLogOff field in the form to what it would be set to with the javascript but as an IgnoreControl I can't edit it, even if I set readonly to False. Any ideas how I can make this work? If you need any more info please let me know and I will post it ASAP.

Thanks,
Rob

Any ideas anybody? If not, do you have any feedback like why people don't know the answer to this? (too specific a problem, not enough information, question is unclear...etc) or another forum/info source I could try?

Thanks,
Rob

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.