Re: send event (click) to an external html page

89 views
Skip to first unread message

K vfdsdfbsdb

unread,
Feb 20, 2013, 6:33:44 PM2/20/13
to google-we...@googlegroups.com

sorry i dont't know what  do you do.
i recommend you reading beginner book that explain for GWT.
because it explain you several base sample.

2013/02/21 5:58 "Laurent Garnier" <lgarn...@gmail.com>:
Hi,

first, excuse me for my poor english, but I'm french.
I load an external page into a frame : final Frame frame = new Frame(url);
The external page is from a public website.
Can I send event to an element on this page, like click on a button, or fill a textfield ?

Thx for help

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Laurent Garnier

unread,
Feb 22, 2013, 3:18:33 AM2/22/13
to google-we...@googlegroups.com
I try to explain better my problem.
I load a frame with an url (like www.google.fr)
How can I fill the text field (id="gbqfq"), and send click to search button (id="gbqfba") ?
Do you understand what I mean now ?

Thx

Le jeudi 21 février 2013 00:33:44 UTC+1, hprc a écrit :

sorry i dont't know what  do you do.
i recommend you reading beginner book that explain for GWT.
because it explain you several base sample.

2013/02/21 5:58 "Laurent Garnier" <lgarn...@gmail.com>:
Hi,

first, excuse me for my poor english, but I'm french.
I load an external page into a frame : final Frame frame = new Frame(url);
The external page is from a public website.
Can I send event to an element on this page, like click on a button, or fill a textfield ?

Thx for help

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

Andy Stevko

unread,
Feb 22, 2013, 3:37:52 AM2/22/13
to google-web-toolkit
You can use the DOM class to access elements by id. I am pretty sure your iframe is accessible in the manner.

If not, check out the JSNI code used by Print-it to access a hidden iframe and use it for printing purposes.



To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M. Andretti




Thomas Broyer

unread,
Feb 27, 2013, 5:35:57 AM2/27/13
to google-we...@googlegroups.com
You can't.
Wouldn't it be great if loading a website (which could just be an ad actually, so something that I didn't even *chose* to see) would load Twitter in an hidden iframe, fill the "compose" input and then programmatically click the "Tweet" button? (or variations along the way of Facebook, G+, GMail, or maybe buying things from Amazon, making bids on eBay, etc.)

Milan Cvejic

unread,
Feb 27, 2013, 9:07:48 AM2/27/13
to google-we...@googlegroups.com
On the other hand, if you are loading iframe from the same domain, and have full control of iframe content you can use window.postMessage api for child - parent communication.

You will need to implement some JSNI methods in order to accomplish this in GWT.

Best,
Milan

Thomas Broyer

unread,
Feb 27, 2013, 9:24:47 AM2/27/13
to google-we...@googlegroups.com


On Wednesday, February 27, 2013 3:07:48 PM UTC+1, Milan Cvejic wrote:
On the other hand, if you are loading iframe from the same domain, and have full control of iframe content you can use window.postMessage api for child - parent communication.

If it's from the same origin, you don't need postMessage. postMessage was specifically made for cross-origin communications.

You will need to implement some JSNI methods in order to accomplish this in GWT.

or use Elemental.

I doubt it'll solve Laurent's use case though: he was talking about loading a third-party site, and never mentioned that site was "friendly" to the "calling GWT app" (he used Google as an example)

Milan Cvejic

unread,
Feb 27, 2013, 11:59:06 AM2/27/13
to google-we...@googlegroups.com
Thanks Thomas for clarification of messaging api. I believed that it is working only on same domain and that it is build just to standardize communication.

Best,
Milan

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/xyIjJvWyRD4/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
LiquidBrain!

Laurent Garnier

unread,
Feb 28, 2013, 7:54:55 AM2/28/13
to google-we...@googlegroups.com
ARRRGGG !

Thank you all for your search and help.
I don't know how to workaround my problem.
So, I'll search (alone, again, ;-)
If I find anything, I'll tell you

Best,
Laurent

Le mercredi 27 février 2013 17:59:06 UTC+1, Milan Cvejic a écrit :
Thanks Thomas for clarification of messaging api. I believed that it is working only on same domain and that it is build just to standardize communication.

Best,
Milan

On Wed, Feb 27, 2013 at 3:24 PM, Thomas Broyer <t.br...@gmail.com> wrote:


On Wednesday, February 27, 2013 3:07:48 PM UTC+1, Milan Cvejic wrote:
On the other hand, if you are loading iframe from the same domain, and have full control of iframe content you can use window.postMessage api for child - parent communication.

If it's from the same origin, you don't need postMessage. postMessage was specifically made for cross-origin communications.

You will need to implement some JSNI methods in order to accomplish this in GWT.

or use Elemental.

I doubt it'll solve Laurent's use case though: he was talking about loading a third-party site, and never mentioned that site was "friendly" to the "calling GWT app" (he used Google as an example)

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/xyIjJvWyRD4/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
LiquidBrain!
Reply all
Reply to author
Forward
0 new messages