filling forms automatically generated using javascript

J

John

Is there an automatic way of filling forms that have been generated
using javascript?
I tried to use python+mechanize but am having trouble with javascript
forms.

This is the way the form is created:

<script
src="/WebResource.axd?d=uz45jgd0NVyzsVJV_sZDrjxBvvX2yHd3hs2IGgfXLN3pPD65PTl8Gec4qFJa35leX_j-S-HQNzQg1sDk82eQYafpf0w9zI7HaoMUnMjb9ihQ96Tf0qvT-Air__85j5db0&amp;t=632972974720000000"
type="text/javascript"></script>



Thanks in advance for your help,
--j
 
D

David Golightly

John said:
Is there an automatic way of filling forms that have been generated
using javascript?
I tried to use python+mechanize but am having trouble with javascript
forms.

Yes, it depends on what you're trying to do of course, but usually you
just set the input element's "value" property. (The exception here is
<input type="file">, where the value property is read-only for security
reasons.) This can be done even without javascript; just set the value
attribute in the HTML code if you want default values. It shouldn't
matter what your backend language is.
This is the way the form is created:

<script
src="/WebResource.axd?d=uz45jgd0NVyzsVJV_sZDrjxBvvX2yHd3hs2IGgfXLN3pPD65PTl8Gec4qFJa35leX_j-S-HQNzQg1sDk82eQYafpf0w9zI7HaoMUnMjb9ihQ96Tf0qvT-Air__85j5db0&amp;t=632972974720000000"
type="text/javascript"></script>

We really can't do anything with that. The url is useless because it's
not absolute, so we can't look at your code. Please post a working
link if you want help.

Thanks,

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top