xj6u4ru6 Absent Member.
Absent Member.
682 views

Form Fill auto-submit problem


hi

i am having problem auto-submitting a form.
it is a page (login.aspx) with a form that looks as follows:

<form name="form1" method="post" action="login.aspx" id="form1">
<div>
<input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value=""
type="hidden">
<input name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwULLTEzMweDA5MjY3NTerMPFHwMb6zHtH66CQblrO6SawerwaerGw=="
type="hidden">
</div>
<input name="Id" id="Id" type="text">
<input name="Pwd" id="Pwd" type="password">

<input name="btnLogin" id="btnLogin"
onmouseover="javascript:this.src='images/ovdw.jpg';"
onmouseout="javascript:this.src='images/Enter.jpg';"
src="Enter.jpg" type="image">
</form>


the original page is actually more complicated, but i've simplified it
(removing all the unnecessary elements, including javascripts) to the
point that,
after AM fills in the credentials, and when i manually click the image
button, it will login. (this is with auto-submit disabled).

but if i turn on auto-submit, the browser enters into an endless loop
(i guess it is because the page post back to the same page).
this has been tested with javascript enabled and disabled, neither
worked (there's actually no javascript left, but i gave it a try
anyway).

in the policy, i set up two input fills, one for the id and the other
for the password. both were filled in properly.
i did not set up policy for the hidden inputs. two of their values are
empty, and the value of viewstat is too long to fit into the constant
string field.
but i think all three were submitted. (saw them in the debug mode).

i know that Form Fill does not preserve the input for type="image".
but it is submitted nevertheless (i think "document.form1.submit();"
added by auto-submit is doing the job).
what i don't understand is why the programmatic submit doesn't work the
same as the manual mouse click submit, and
enters into an endless loop instead.

thanks,
Jim


--
xj6u4ru6
------------------------------------------------------------------------
xj6u4ru6's Profile: http://forums.novell.com/member.php?userid=50569
View this thread: http://forums.novell.com/showthread.php?t=449448

0 Likes
3 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Form Fill auto-submit problem

xj6u4ru6 wrote:

>
> hi
>
> i am having problem auto-submitting a form.
> it is a page (login.aspx) with a form that looks as follows:
>
> <form name="form1" method="post" action="login.aspx" id="form1">
> <div>
> <input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
> <input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value=""
> type="hidden">
> <input name="__VIEWSTATE" id="__VIEWSTATE"
> value="/wEPDwULLTEzMweDA5MjY3NTerMPFHwMb6zHtH66CQblrO6SawerwaerGw=="
> type="hidden">
> </div>
> <input name="Id" id="Id" type="text">
> <input name="Pwd" id="Pwd" type="password">
>
> <input name="btnLogin" id="btnLogin"
> onmouseover="javascript:this.src='images/ovdw.jpg';"
> onmouseout="javascript:this.src='images/Enter.jpg';"
> src="Enter.jpg" type="image">
> </form>
>
>
> the original page is actually more complicated, but i've simplified it
> (removing all the unnecessary elements, including javascripts) to the
> point that,
> after AM fills in the credentials, and when i manually click the image
> button, it will login. (this is with auto-submit disabled).
>
> but if i turn on auto-submit, the browser enters into an endless loop
> (i guess it is because the page post back to the same page).
> this has been tested with javascript enabled and disabled, neither
> worked (there's actually no javascript left, but i gave it a try
> anyway).
>
> in the policy, i set up two input fills, one for the id and the other
> for the password. both were filled in properly.
> i did not set up policy for the hidden inputs. two of their values are
> empty, and the value of viewstat is too long to fit into the constant
> string field.
> but i think all three were submitted. (saw them in the debug mode).
>
> i know that Form Fill does not preserve the input for type="image".
> but it is submitted nevertheless (i think "document.form1.submit();"
> added by auto-submit is doing the job).
> what i don't understand is why the programmatic submit doesn't work
> the same as the manual mouse click submit, and
> enters into an endless loop instead.
>
> thanks,
> Jim


can you use something that logs browser activity (ieHTTPheaders,
firebug) and see where the login page redirects you to?

--
Cheers,
Edward
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Form Fill auto-submit problem


Hi,

I had the same issue with our ASP.NET application login page.
The access manager removes the input type="image" from the form.
I found a ugly work around for this issue.
I added the following JS to the form fill policy:

VAR B = DOCUMENT.CREATEELEMENT('INPUT');
B.SETATTRIBUTE(\"TYPE\",\"IMAGE\")
B.SETATTRIBUTE(\"NAME\",\"LOGINBUTTON\")
B.SETATTRIBUTE(\"ID\",\"LOGINBUTTON\")
B.SETATTRIBUTE(\"CLASS\",\"SUBMIT_BTN\")
B.SETATTRIBUTE(\"SRC\",\"IMAGES/BTN_TP_LOGIN.PNG\")
B.SETATTRIBUTE(\"STYLE\",\"BORDER-WIDTH:0PX;\");
DOCUMENT.FORMS[0].APPENDCHILD(B);

What it basically does is to add the removed button to the form, and
then click it.


--
tomerazran
------------------------------------------------------------------------
tomerazran's Profile: https://forums.netiq.com/member.php?userid=3182
View this thread: https://forums.netiq.com/showthread.php?t=62

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Form Fill auto-submit problem


tomerazran;232445 Wrote:
> Hi,
>
> I had the same issue with our ASP.NET application login page.
> The access manager removes the input type="image" from the form.
> I found a ugly work around for this issue.
> I added the following JS to the form fill policy:
>
> VAR B = DOCUMENT.CREATEELEMENT('INPUT');
> B.SETATTRIBUTE(\"TYPE\",\"IMAGE\")
> B.SETATTRIBUTE(\"NAME\",\"LOGINBUTTON\")
> B.SETATTRIBUTE(\"ID\",\"LOGINBUTTON\")
> B.SETATTRIBUTE(\"CLASS\",\"SUBMIT_BTN\")
> B.SETATTRIBUTE(\"SRC\",\"IMAGES/BTN_TP_LOGIN.PNG\")
> B.SETATTRIBUTE(\"STYLE\",\"BORDER-WIDTH:0PX;\");
> DOCUMENT.FORMS[0].APPENDCHILD(B);
>
> What it basically does is to add the removed button to the form, and
> then click it.


Thanks for the information. Did you add this in the javascript functions
to keep? Or the functions to submit section?


--
kjhurni
------------------------------------------------------------------------
kjhurni's Profile: https://forums.netiq.com/member.php?userid=322
View this thread: https://forums.netiq.com/showthread.php?t=62

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.