hagaizenberg Posted September 20, 2009 Posted September 20, 2009 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) Nextbut can't get the onclick like this:$oInputs = _IETagNameGetCollection ($oIE, "input") traceLog($oInput.onclick) Nextany idea how to get the onclick? or even the whole code inside the <input .... > ??10x.
hagaizenberg Posted September 20, 2009 Author Posted September 20, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now