473,320 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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="__EVENTTARGET" value="LoginCommand" />

<input type="hidden" name="__VIEWSTATE"
value="dDwtODMyMTc4OTc4O3Q8O2w8aTwwPjtpPDE+Oz47bDx 0PHA8bDxUZXh0Oz47bDxMb2dpbjs+Pjs7Pjt0PDtsPGk8MT47a TwzPjs+O2w8dDw7bDxpPDE+Oz47bDx0PHA8bDxUZXh0Oz47bDx cPHNwYW4gY2xhc3M9J2NvcnBvcmF0ZUh5cGVyTGlua1NlcGFyY XRvcidcPiBcPiBcPC9zcGFuXD5cPGJcPlw8Zm9udCBmYWNlPUF yaWFsIHNpemU9MyBjb2xvcj0jMDAwMDAwXD5JTVMgTG9naW5cP C9mb250XD5cPC9iXD47Pj47Oz47Pj47dDw7bDxpPDA+Oz47bDx 0PDtsPGk8MD47PjtsPHQ8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O
k8Mz47aTw1PjtpPDY+O2k8OT47aTwxMD47PjtsPHQ8cDxwPGw8 VGV4dDs+O2w8VXNlciBuYW1lOjs+Pjs+Ozs+O3Q8cDxwPGw8VG V4dDs+O2w8UGFzc3dvcmQ6Oz4+Oz47Oz47dDxwPHA8bDxUZXh0 Oz47bDxMb2dpbjs+Pjs+Ozs+O3Q8cDxsPHZhbHVlOz47bDxSZX NldDs+Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPEZvcmdvdCB5b3Vy IHBhc3N3b3JkPzs+Pjs+Ozs+O3Q8cDxwPGw8TmF2aWdhdGVVcm w7VGV4dDs+O2w8aHR0cDovL2ltcy51a3JvLmFjLnVrL1VLUk8v Rm9yZ290UGFzc3dvcmQuYXNweD9Vc2VyUHJlZj1jdWx0dXJlJT
FZW4tR0I7Y2xpY2sgaGVyZTs+Pjs+Ozs+Oz4+Oz4+Oz4+Oz4+O z4+Oz4+Oz6uA2VLC+u3KZvM2xD7WM8FhSqygw=="
/>

<input name="LoginForm1:UserName" type="hidden" maxlength="50"
id="LoginForm1_UserName" value="username" style="width:150px;" />

<input name="LoginForm1:Password" type="hidden" maxlength="50"
id="LoginForm1_Password" value="password" style="width:150px;" />

<input name="Submit" type="hidden" maxlength="50"
id="LoginForm1_LoginCommand" value="LoginForm1:LoginCommand" />

<input type="Submit" name="LoginForm1: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?
Jul 23 '05 #1
1 2554
Piotr Kurpiel wrote:
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="__EVENTTARGET" value="LoginCommand" />

<input type="hidden" name="__VIEWSTATE"
value="dDwtODMyMTc4OTc4O3Q8O2w8aTwwPjtpPDE+Oz47bDx 0PHA8bDxUZXh0Oz47bDxMb2dpbjs+Pjs7Pjt0PDtsPGk8MT47a TwzPjs+O2w8dDw7bDxpPDE+Oz47bDx0PHA8bDxUZXh0Oz47bDx cPHNwYW4gY2xhc3M9J2NvcnBvcmF0ZUh5cGVyTGlua1NlcGFyY XRvcidcPiBcPiBcPC9zcGFuXD5cPGJcPlw8Zm9udCBmYWNlPUF yaWFsIHNpemU9MyBjb2xvcj0jMDAwMDAwXD5JTVMgTG9naW5cP C9mb250XD5cPC9iXD47Pj47Oz47Pj47dDw7bDxpPDA+Oz47bDx 0PDtsPGk8MD47PjtsPHQ8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O k8Mz47aTw1PjtpPDY+O2k8OT47aTwxMD47PjtsPHQ8cDxwPGw8 VGV4dDs+O2w8VXNlciBuYW1lOjs+Pjs+Ozs+O3Q8cDxwPGw8VG V4dDs+O2w8UGFzc3dvcmQ6Oz4+Oz47Oz47dDxwPHA8bDxUZXh0 Oz47bDxMb2dpbjs+Pjs+Ozs+O3Q8cDxsPHZhbHVlOz47bDxSZX NldDs+Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPEZvcmdvdCB5b3Vy IHBhc3N3b3JkPzs+Pjs+Ozs+O3Q8cDxwPGw8TmF2aWdhdGVVcm w7VGV4dDs+O2w8aHR0cDovL2ltcy51a3JvLmFjLnVrL1VLUk8v Rm9yZ290UGFzc3dvcmQuYXNweD9Vc2VyUHJlZj1jdWx0dXJlJT FZW4tR0I7Y2xpY2sgaGVyZTs+Pjs+Ozs+Oz4+Oz4+Oz4+Oz4+O z4+Oz4+Oz6uA2VLC+u3KZvM2xD7WM8FhSqygw==" />

<input name="LoginForm1:UserName" type="hidden" maxlength="50"
id="LoginForm1_UserName" value="username" style="width:150px;" />

<input name="LoginForm1:Password" type="hidden" maxlength="50"
id="LoginForm1_Password" value="password" style="width:150px;" />

<input name="Submit" type="hidden" maxlength="50"
id="LoginForm1_LoginCommand" value="LoginForm1:LoginCommand" />

<input type="Submit" name="LoginForm1: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?

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
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alex Hunsley | last post by:
I'm using urllib to post data to a web form by issuing a command similar to this: filename, headers = urllib.urlretrieve("http://www.thewebsitenamehere.com/servlet/com.blah.bloo.XmlFeed",...
12
by: Terry | last post by:
I'm trying to automatically submit a form to another ASP page after some <input> fields values are filled by ASP. I know I can do it using javascript, but is there a way to automatically submit...
2
by: Andy Goldstein | last post by:
I have a table where all the TRs have an onClick handler registered. One (and only one) of the rows has 2 text input boxes, where each textbox has an onChange handler registered. Both the onClick...
6
by: havenoclue | last post by:
I have a database application that is submitted to an Access database. What I want is when the form is submitted to automatically send an email to multiple persons with the info from the form. ...
1
by: grpmangr | last post by:
hi Is ther anyway i can automatically fill out forms and submit them thru java? supposing i hav a normal txt file that contains all data that needs to be filed out into the form, is there anyway...
8
by: yawnmoth | last post by:
Say I have the following HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> <form action="">
6
by: Oleg Konovalov | last post by:
Hi, I have a Java/JavaScript GUI application where I perform a lot of long DB operations , which takes 5-60 secs to perform. Sometimes user double-clicks the button or just gets impatient and...
8
Megalog
by: Megalog | last post by:
Hey guys.. my turn to ask a question: I'm having a weird issue with a form I've reworked. This form has a combo box, which when used is changing the recordsource of a subform. This subform has...
6
by: chazzy69 | last post by:
Ok two questions- First is it possible to replicate javascripts automatic submit with a php function, i want to do this due to the fact we i run a cron job it wont run javascript. Second If the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.