Hello
I need to add onclick evento to the body of a webpage programatically, once its loaded in the webgadget.
Any ideas how to achieve this?
Thanks in advance
Add OnClick to a webgadget page?
Add OnClick to a webgadget page?
Last edited by ricardo on Sat Mar 02, 2013 12:38 am, edited 1 time in total.
ARGENTINA WORLD CHAMPION
-
- Addict
- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
Re: Add OnClick to a webgadget?
I am using specially formatted url's and simply cancel the navigation inside the program when i recognize that url.
This means the navigateto() event..
This means the navigateto() event..
Last edited by Edwin Knoppert on Fri Mar 01, 2013 10:47 pm, edited 1 time in total.
Re: Add OnClick to a webgadget page?
I already can add the funcion like this:
But cant attach the onclick to the <body>
Code: Select all
ExecuteJavaScript(0,"eval","function getid() {ID = event.srcElement.id;alert(ID);}","")
ARGENTINA WORLD CHAMPION
Re: Add OnClick to a webgadget?
I want to add a <body onclick=getid()>Edwin Knoppert wrote:I am using specially formatted url's and simply cancel the navigation inside the program when i recognize that url.
This means the navigateto() event..
ARGENTINA WORLD CHAMPION
-
- Addict
- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
Re: Add OnClick to a webgadget page?
Is it your html?
Then you could use your own javascript code..?
if not you'll need the html document 'api's' to insert code.
Don't know how that must be done in purebasic but once you can get access to the dom (document3 afaik) object you should be able to do that.
Seems like a capture no one wants though..
Then you could use your own javascript code..?
if not you'll need the html document 'api's' to insert code.
Don't know how that must be done in purebasic but once you can get access to the dom (document3 afaik) object you should be able to do that.
Seems like a capture no one wants though..