G
Gordon Airporte
I've written a script using ClientForm to automate opening and closing
ports on my Linksys router. It works, but I wonder if there isn't a
better way to do it.
The problem is that the list of arguments in the request generated by
..click()ing the form is incomplete and I have to edit it manually. The
Submit button on the form is created with the following code:
<script>document.write("<input type=button name=save_button" + "
value=\"" + sbutton.save + "\" onClick=to_submit(this.form)>");</script>
Which calls this function in the form source:
function to_submit(F)
{
F.submit_button.value = "Forward";
F.action.value = "Apply";
F.submit();
}
Simply .click()ing on the form does not properly fill in
submit_button=Forward&action=apply, however. The arguments are there but
with no values.
Is this because ClientForm doesn't run javascript, or is there a way to
determine and fix these values without manually editing the .data string
of the Request with values I have to find on my own?
ports on my Linksys router. It works, but I wonder if there isn't a
better way to do it.
The problem is that the list of arguments in the request generated by
..click()ing the form is incomplete and I have to edit it manually. The
Submit button on the form is created with the following code:
<script>document.write("<input type=button name=save_button" + "
value=\"" + sbutton.save + "\" onClick=to_submit(this.form)>");</script>
Which calls this function in the form source:
function to_submit(F)
{
F.submit_button.value = "Forward";
F.action.value = "Apply";
F.submit();
}
Simply .click()ing on the form does not properly fill in
submit_button=Forward&action=apply, however. The arguments are there but
with no values.
Is this because ClientForm doesn't run javascript, or is there a way to
determine and fix these values without manually editing the .data string
of the Request with values I have to find on my own?