Groups
Groups
Sign in
Groups
Groups
delphichromiumembedded
Conversations
About
Send feedback
Help
As you click Tchromium element using getelementbyid ('element'). click; ?????
3,241 views
Skip to first unread message
Underground
unread,
Oct 20, 2011, 1:38:59 AM
10/20/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichromiumembedded
As you click Tchromium element using ...
TWebBrowser in Delphi I could click on an element
using the following code:
webbrowser.oleobject.document.getelementbyid ('element'). click;
Can anyone help me how to do this in Chromium??
I await answers!
Christian Sciberras
unread,
Oct 20, 2011, 4:51:59 AM
10/20/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichrom...@googlegroups.com
Simply execute it as javascript. No need to call it natively.
Underground
unread,
Oct 23, 2011, 10:49:52 AM
10/23/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichromiumembedded
I tried using the following code, but without results:
var
code: string;
begin
code: = 'document.getElementById ("button"). click;';
ie.Browser.MainFrame.ExecuteJavaScript (code, 'about: blank', 0);
It could send me some examples??
Christian Sciberras
unread,
Oct 23, 2011, 2:58:34 PM
10/23/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichrom...@googlegroups.com
Uh, the correct javascript would be:
code := 'document.getElementById("button").click();';
Chris.
Underground
unread,
Oct 23, 2011, 5:17:23 PM
10/23/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichromiumembedded
Ta tough guy saw!
Searching on Google found a way Q works in internet explorer
ie.navigate ('javascript: void (document.getElementById ("button").
());'); click
Thus the above works ie, not more chromium in ...
Any idea why?
Christian Sciberras
unread,
Oct 24, 2011, 2:22:30 AM
10/24/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichrom...@googlegroups.com
I don't know how IE got to run that, but, that is not even javascript. The correct one would be:
ie.navigate(
'javascript:document.getElementById("button").click();'
);
Chris.
Underground
unread,
Oct 24, 2011, 11:18:01 PM
10/24/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichromiumembedded
Sorry to ask so much more to have to solve my problem =].
Able to use javascript in other pages with the above, plus the page I
need to use is not working.
Its clicking on the element using the code below?
q: = doc.GetElementById ('button');
if Assigned (q) then
q.SetElementAttribute (?,?)
WHAT SetElementAttribute put in?
Thank you for always answering my questions!
Christian Sciberras
unread,
Oct 25, 2011, 2:29:05 AM
10/25/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichrom...@googlegroups.com
I would
guess
that SetElementAttribute takes a 'name' and a 'value' as parameters.
Chris.
Underground
unread,
Oct 30, 2011, 7:38:20 PM
10/30/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichromiumembedded
Is there any parameter to click the button?
type
q.SetElementAttribute ('click', 'true') or
q.SetElementAttribute ('clicked', 'true')
Already tried, no longer works!
You know how to do using the setelementattribute??
Christian Sciberras
unread,
Oct 31, 2011, 3:21:44 AM
10/31/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delphichrom...@googlegroups.com
You really need to get a clue on how DOM work.
The setElementAttribute method will only SET AN ATTRIBUTE.
Clicking an element is NOT an attribute.
q.setElementAttribute(
'style'
,
'color: red;'
);
// for example
Chris.
Reply all
Reply to author
Forward
0 new messages