Sign in to follow this  
Followers 0
hagaizenberg

iexplorer input onclick code

2 posts in this topic

Hi all,

I have this piece of HTML in a page i'm working on:

<input type="button" value="Confirm" name="" id="" onclick='handle_request_click("friend_connect", "1617780623", "accept");' class="inputbutton"/>

and i wanna get the text inside the onclick section - meaning - i wanna get handle_request_click("friend_connect", "1617780623", "accept");

I can easily get the value parameter (which is confirm) like this:

$oInputs = _IETagNameGetCollection ($oIE, "input")
   traceLog($oInput.value)
Next

but can't get the onclick like this:

$oInputs = _IETagNameGetCollection ($oIE, "input")
   traceLog($oInput.onclick)
Next

any idea how to get the onclick? or even the whole code inside the <input .... > ??

10x.

Share this post


Link to post
Share on other sites



Well, found the answer myself and wanted to share it...

Seems that every object has an outerHTML property i didn't know of, and it gives you the whole definition.

So using:

$oInputs = _IETagNameGetCollection ($oIE, "input")
   traceLog($oInput.outerHTML)
Next

I get the whole input:

<input type="button" value="Confirm" name="" id="" onclick='handle_request_click("friend_connect", "1617780623", "accept");' class="inputbutton"/>

and can just parse the onclick.

Have fun.

Hi all,

I have this piece of HTML in a page i'm working on:

<input type="button" value="Confirm" name="" id="" onclick='handle_request_click("friend_connect", "1617780623", "accept");' class="inputbutton"/>

and i wanna get the text inside the onclick section - meaning - i wanna get handle_request_click("friend_connect", "1617780623", "accept");

I can easily get the value parameter (which is confirm) like this:

$oInputs = _IETagNameGetCollection ($oIE, "input")
   traceLog($oInput.value)
Next

but can't get the onclick like this:

$oInputs = _IETagNameGetCollection ($oIE, "input")
   traceLog($oInput.onclick)
Next

any idea how to get the onclick? or even the whole code inside the <input .... > ??

10x.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0