Curl on a javascript button?
| From: | LFaR | Date: | Mon, 07 Aug 2006 12:22:23 +0000 |
| Subject: | Curl on a javascript button? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-24842@lists.php.net to get a copy of this message | ||
Hi,
Given a form of this type:
<form id="form_id" name="form_name">
<input type="button" value="Click Here" OnClick="new_window('
http://hostname/site?arg1=val1&arg2=val2');" />
</form>
Where new_window() is a simple Javascript function that pops up a new window
with the given url.
Is it possible to automate the OnClick event? I'm wondering if I can
programmatically cause the 'OnClick' event to occur.
One solution is for me to use curl to extract the URL from the
'new_window()' function and execute it directly. Though, I am left
wondering if there are alternatives I have not yet discovered.
Thanks,
LFaR.