automatic form submission

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Piotr Kurpiel

    #1

    automatic form submission

    Hi,
    I am creating a site where I need to refer to another external file
    (aspx).
    I create the form and works fine. But as soon as I try to submit the
    form automatically (with form.submit()) I get an error from the
    external site. I do not have the code of that site but suppose that my
    automatic submission does not pass all of the variables. This is how
    it looks in plain html:

    <form name="Login" method="post"
    action="http://ims.ukro.ac.uk/UKRO/login.aspx" id="Login">

    <input type="hidden" name="__EVENTTA RGET" value="LoginCom mand" />

    <input type="hidden" name="__VIEWSTA TE"
    value="dDwtODMy MTc4OTc4O3Q8O2w 8aTwwPjtpPDE+Oz 47bDx0PHA8bDxUZ Xh0Oz47bDxMb2dp bjs+Pjs7Pjt0PDt sPGk8MT47aTwzPj s+O2w8dDw7bDxpP DE+Oz47bDx0PHA8 bDxUZXh0Oz47bDx cPHNwYW4gY2xhc3 M9J2NvcnBvcmF0Z Uh5cGVyTGlua1Nl cGFyYXRvcidcPiB cPiBcPC9zcGFuXD 5cPGJcPlw8Zm9ud CBmYWNlPUFyaWFs IHNpemU9MyBjb2x vcj0jMDAwMDAwXD 5JTVMgTG9naW5cP C9mb250XD5cPC9i XD47Pj47Oz47Pj4 7dDw7bDxpPDA+Oz 47bDx0PDtsPGk8M D47PjtsPHQ8O2w8 aTwxPjs+O2w8dDw 7bDxpPDE+O
    k8Mz47aTw1PjtpP DY+O2k8OT47aTwx MD47PjtsPHQ8cDx wPGw8VGV4dDs+O2 w8VXNlciBuYW1lO js+Pjs+Ozs+O3Q8 cDxwPGw8VGV4dDs +O2w8UGFzc3dvcm Q6Oz4+Oz47Oz47d DxwPHA8bDxUZXh0 Oz47bDxMb2dpbjs +Pjs+Ozs+O3Q8cD xsPHZhbHVlOz47b DxSZXNldDs+Pjs7 Pjt0PHA8cDxsPFR leHQ7PjtsPEZvcm dvdCB5b3VyIHBhc 3N3b3JkPzs+Pjs+ Ozs+O3Q8cDxwPGw 8TmF2aWdhdGVVcm w7VGV4dDs+O2w8a HR0cDovL2ltcy51 a3JvLmFjLnVrL1V LUk8vRm9yZ290UG Fzc3dvcmQuYXNwe D9Vc2VyUHJlZj1j dWx0dXJlJT
    FZW4tR0I7Y2xpY2 sgaGVyZTs+Pjs+O zs+Oz4+Oz4+Oz4+ Oz4+Oz4+Oz4+Oz6 uA2VLC+u3KZvM2x D7WM8FhSqygw=="
    />

    <input name="LoginForm 1:UserName" type="hidden" maxlength="50"
    id="LoginForm1_ UserName" value="username " style="width:15 0px;" />

    <input name="LoginForm 1:Password" type="hidden" maxlength="50"
    id="LoginForm1_ Password" value="password " style="width:15 0px;" />

    <input name="Submit" type="hidden" maxlength="50"
    id="LoginForm1_ LoginCommand" value="LoginFor m1:LoginCommand " />

    <input type="Submit" name="LoginForm 1:LoginCommand" value="GO"
    id="LoginForm1_ LoginCommand" />
    </form>


    And now I realised thet sometimes it doesn't even work with manual
    submission but sometimes does.

    Do you have any suggestions?
  • Erwin Moller

    #2
    Re: automatic form submission

    Piotr Kurpiel wrote:
    [color=blue]
    > Hi,
    > I am creating a site where I need to refer to another external file
    > (aspx).
    > I create the form and works fine. But as soon as I try to submit the
    > form automatically (with form.submit()) I get an error from the
    > external site. I do not have the code of that site but suppose that my
    > automatic submission does not pass all of the variables. This is how
    > it looks in plain html:
    >
    > <form name="Login" method="post"
    > action="http://ims.ukro.ac.uk/UKRO/login.aspx" id="Login">
    >
    > <input type="hidden" name="__EVENTTA RGET" value="LoginCom mand" />
    >
    > <input type="hidden" name="__VIEWSTA TE"
    >[/color]
    value="dDwtODMy MTc4OTc4O3Q8O2w 8aTwwPjtpPDE+Oz 47bDx0PHA8bDxUZ Xh0Oz47bDxMb2dp bjs+Pjs7Pjt0PDt sPGk8MT47aTwzPj s+O2w8dDw7bDxpP DE+Oz47bDx0PHA8 bDxUZXh0Oz47bDx cPHNwYW4gY2xhc3 M9J2NvcnBvcmF0Z Uh5cGVyTGlua1Nl cGFyYXRvcidcPiB cPiBcPC9zcGFuXD 5cPGJcPlw8Zm9ud CBmYWNlPUFyaWFs IHNpemU9MyBjb2x vcj0jMDAwMDAwXD 5JTVMgTG9naW5cP C9mb250XD5cPC9i XD47Pj47Oz47Pj4 7dDw7bDxpPDA+Oz 47bDx0PDtsPGk8M D47PjtsPHQ8O2w8 aTwxPjs+O2w8dDw 7bDxpPDE+O[color=blue]
    >[/color]
    k8Mz47aTw1PjtpP DY+O2k8OT47aTwx MD47PjtsPHQ8cDx wPGw8VGV4dDs+O2 w8VXNlciBuYW1lO js+Pjs+Ozs+O3Q8 cDxwPGw8VGV4dDs +O2w8UGFzc3dvcm Q6Oz4+Oz47Oz47d DxwPHA8bDxUZXh0 Oz47bDxMb2dpbjs +Pjs+Ozs+O3Q8cD xsPHZhbHVlOz47b DxSZXNldDs+Pjs7 Pjt0PHA8cDxsPFR leHQ7PjtsPEZvcm dvdCB5b3VyIHBhc 3N3b3JkPzs+Pjs+ Ozs+O3Q8cDxwPGw 8TmF2aWdhdGVVcm w7VGV4dDs+O2w8a HR0cDovL2ltcy51 a3JvLmFjLnVrL1V LUk8vRm9yZ290UG Fzc3dvcmQuYXNwe D9Vc2VyUHJlZj1j dWx0dXJlJT[color=blue]
    >[/color]
    FZW4tR0I7Y2xpY2 sgaGVyZTs+Pjs+O zs+Oz4+Oz4+Oz4+ Oz4+Oz4+Oz4+Oz6 uA2VLC+u3KZvM2x D7WM8FhSqygw=="[color=blue]
    > />
    >
    > <input name="LoginForm 1:UserName" type="hidden" maxlength="50"
    > id="LoginForm1_ UserName" value="username " style="width:15 0px;" />
    >
    > <input name="LoginForm 1:Password" type="hidden" maxlength="50"
    > id="LoginForm1_ Password" value="password " style="width:15 0px;" />
    >
    > <input name="Submit" type="hidden" maxlength="50"
    > id="LoginForm1_ LoginCommand" value="LoginFor m1:LoginCommand " />
    >
    > <input type="Submit" name="LoginForm 1:LoginCommand" value="GO"
    > id="LoginForm1_ LoginCommand" />
    > </form>
    >
    >
    > And now I realised thet sometimes it doesn't even work with manual
    > submission but sometimes does.
    >
    > Do you have any suggestions?[/color]


    Hi,

    I strongly suspect that that other server EXPECTS you to have some state, eg
    in a session, or by passing that monstrous __VIEWSTATE content.
    Go study the setup would be my advise.

    Hard to say how to fix it with the given information.

    Regards,
    Erwin Moller

    Comment

    Working...