By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,898 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,898 IT Pros & Developers. It's quick & easy.

ClientForm .click() oddity

P: n/a
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?
May 15 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Gordon Airporte <JH*****@fbi.govwrites:
[...]
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,
Yes.

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?
No. (Strictly, it shouldn't be necessary to actually edit the data
string -- you should be able to use the API to do it -- but I'm not
sure that's fully documented and tested, so that may not work
correctly. Either way, you have to do it manually.)
John
May 24 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.