| View previous topic :: View next topic |
| Author |
Message |
Course Developer Guest
|
Posted: Wed Jul 09, 2008 12:32 am Post subject: getElementsByName - How to collect form field data? |
|
|
Howdy! Hope somebody can help!
Okay; I know how to use AHK and Javascript to send functions to the addressbar in FireFox.
For example: the following will add/replace content in an input field where name=MatchRight1, with the value of %NewContent%:
| Code: |
NewContent= Hello World!
Clipboard = javascript: (function(){ document.getElementsByName('MatchRight1')[0].value="%NewContent%"; })();
Send, ^l^v{ENTER} |
Here's the question: How do I first collect the existing data from the field so I can modify it and send it back?
In the above code, I have tried changing .value="%NewContent%" to .focus() and then Send, ^a^c, but that didn't work.
Thanks in advance for any help you can provide!
Ian |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 616
|
Posted: Wed Jul 09, 2008 6:49 am Post subject: |
|
|
if i could talk you into ie the work is done already for you see my sig
if not i must admit im a little confused why it didnt work actually
try | Code: | javascript:void(document.forms(0).elements('MatchRight1').focus());
|
_________________ Read this
Com
Automate IE7 with Tabs |
|
| Back to top |
|
 |
Course Developer Guest
|
Posted: Tue Jul 15, 2008 10:35 pm Post subject: |
|
|
Thanks Tank!
I'll give it a try.
 |
|
| Back to top |
|
 |
|