Re: Possible to get an element's propertys from a container iframe?

2008-11-01 Thread Ian Bambury
Sorry, my mistake. firefox uses textContent
Can you get away with innerHTML which is available in both?


Ian

http://examples.roughian.com


2008/11/1 darkflame [EMAIL PROTECTED]

 innerText

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-11-01 Thread Thomas Wrobel

Bingo! that worked fine!

Sometimes I feel like I'll never get the hang of these browser differences...

2008/11/1 Ian Bambury [EMAIL PROTECTED]:
 Sorry, my mistake. firefox uses textContent
 Can you get away with innerHTML which is available in both?

 Ian

 http://examples.roughian.com


 2008/11/1 darkflame [EMAIL PROTECTED]

 innerText

 




-- 
~~
Reviews of anything, by anyone;
www.rateoholic.co.uk
Please try out my new site and give feedback :)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-11-01 Thread Ian Bambury
Ha! Easy to tell that you weren't around in the days of Netscape 2.
Today it's like UK/US English, back then it was more like
Polish/Klingon/WhaleSong

:-)

Ian

http://examples.roughian.com


2008/11/1 Thomas Wrobel [EMAIL PROTECTED]


 Bingo! that worked fine!

 Sometimes I feel like I'll never get the hang of these browser
 differences...

 2008/11/1 Ian Bambury [EMAIL PROTECTED]:
  Sorry, my mistake. firefox uses textContent
  Can you get away with innerHTML which is available in both?
 
  Ian
 
  http://examples.roughian.com
 
 
  2008/11/1 darkflame [EMAIL PROTECTED]
 
  innerText
 
  
 



 --
 ~~
 Reviews of anything, by anyone;
 www.rateoholic.co.uk
 Please try out my new site and give feedback :)

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-10-29 Thread darkflame

Sorry, still cant work this out, I tried

RootPanel.get().getParent()...

and also native javascript ;


public static native void testWindow()
/*-{
  $wnd.alert(test);
 var a;

a = parent.$doc.getElementsByTagName(link);

$wnd.alert(a.getAttribute(title));

}-*/;

Neither worked.

Is there any way at all to access stuff outside an iframe if the gwt
code is running in one?


On Oct 23, 3:47 pm, darkflame [EMAIL PROTECTED] wrote:
 If my GWT app is in a containeriframe, is it possible to get
 propertys of elements from outside that frame?

 I tried a simple;

  DOM.getElementById(testid).getInnerText())

 But the app couldnt find it.

 Is there any way for the GWT app to look outside its container? Or
 to even tell if it has one?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-10-29 Thread John

On 10/23/08, darkflame [EMAIL PROTECTED] wrote:

  If my GWT app is in a container iframe, is it possible to get
  propertys of elements from outside that frame?

  I tried a simple;

   DOM.getElementById(testid).getInnerText())

  But the app couldnt find it.

  Is there any way for the GWT app to look outside its container? Or
  to even tell if it has one?

I use EXACTLY the code you use, and it works for me.

Specifically, I put a div directly above the div which contains the
gwt project, thus:

div id=testid style= visibility: hidden; stuff goes here/div

I use this so that I can plunk my gwt app on different sites without
any modification whatsoever, and pass in the variables it needs for
the particular site.

John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-10-29 Thread Ian Bambury
John,
Your code will get elements in the GWT page, darkflame is trying to get
elements in the parent page- i.e. the parent page has an iframe in it
containing the GWT page, and darkflame wants stuff from the parent page...

...if I understand correctly.

Ian

http://examples.roughian.com


2008/10/29 John [EMAIL PROTECTED]


 On 10/23/08, darkflame [EMAIL PROTECTED] wrote:
 
   If my GWT app is in a container iframe, is it possible to get
   propertys of elements from outside that frame?
 
   I tried a simple;
 
DOM.getElementById(testid).getInnerText())
 
   But the app couldnt find it.
 
   Is there any way for the GWT app to look outside its container? Or
   to even tell if it has one?

 I use EXACTLY the code you use, and it works for me.

 Specifically, I put a div directly above the div which contains the
 gwt project, thus:

 div id=testid style= visibility: hidden; stuff goes here/div

 I use this so that I can plunk my gwt app on different sites without
 any modification whatsoever, and pass in the variables it needs for
 the particular site.

 John

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-10-29 Thread darkflame

dosnt seem to work.

My testing HTML is just;

Body
h1 test test test /h1
iframe src=(link to gwt page here) width=100% height=500px/
iframe
/Body

And my code is;


public static native void testWindow()
/*-{
  $wnd.alert(test);
  
$wnd.alert(text=+$wnd.parent.document.getElementsByTagName(H1)
[0].innerText);

}-*/;



When activating that function, the first alert test appears, but the
following one does not.
I put it in a try/catch loop and it gave me a

Security error: attempted to read protected variable

exception.




On Oct 29, 3:40 pm, Ian Bambury [EMAIL PROTECTED] wrote:
 Hi Thomas,
 Put an H1 in the parent document and try this:

 alert($wnd.parent.document.getElementsByTagName(H1)[0].innerText);

 Ian

 http://examples.roughian.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-10-29 Thread darkflame

yes, thats exactly what I want to do.

On Oct 29, 5:07 pm, Ian Bambury [EMAIL PROTECTED] wrote:
 John,
 Your code will get elements in the GWT page, darkflame is trying to get
 elements in the parent page- i.e. the parent page has an iframe in it
 containing the GWT page, and darkflame wants stuff from the parent page...

 ...if I understand correctly.

 Ian

 http://examples.roughian.com

 2008/10/29 John [EMAIL PROTECTED]





  On 10/23/08, darkflame [EMAIL PROTECTED] wrote:

    If my GWT app is in a container iframe, is it possible to get
    propertys of elements from outside that frame?

    I tried a simple;

     DOM.getElementById(testid).getInnerText())

    But the app couldnt find it.

    Is there any way for the GWT app to look outside its container? Or
    to even tell if it has one?

  I use EXACTLY the code you use, and it works for me.

  Specifically, I put a div directly above the div which contains the
  gwt project, thus:

  div id=testid style= visibility: hidden; stuff goes here/div

  I use this so that I can plunk my gwt app on different sites without
  any modification whatsoever, and pass in the variables it needs for
  the particular site.

  John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-10-29 Thread John

On 10/29/08, Ian Bambury [EMAIL PROTECTED] wrote:
 John,

 Your code will get elements in the GWT page, darkflame is trying to get
 elements in the parent page- i.e. the parent page has an iframe in it
 containing the GWT page, and darkflame wants stuff from the parent page...

 ...if I understand correctly.

 Ian

 http://examples.roughian.com

A, I get it now.  Sorry.

John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-10-29 Thread Ian Bambury
I only tried it in IE and it worked in that for me.
Alternatively, (I haven't tried this) create a JS method in the parent and
call it from JSNI - maybe that will be allowed - what are you using?

Ian

http://examples.roughian.com


2008/10/29 darkflame [EMAIL PROTECTED]


 dosnt seem to work.

 My testing HTML is just;

 Body
 h1 test test test /h1
 iframe src=(link to gwt page here) width=100% height=500px/
 iframe
 /Body

 And my code is;


 public static native void testWindow()
/*-{
  $wnd.alert(test);

  $wnd.alert(text=+$wnd.parent.document.getElementsByTagName(H1)
 [0].innerText);

}-*/;



 When activating that function, the first alert test appears, but the
 following one does not.
 I put it in a try/catch loop and it gave me a

 Security error: attempted to read protected variable

 exception.




 On Oct 29, 3:40 pm, Ian Bambury [EMAIL PROTECTED] wrote:
  Hi Thomas,
  Put an H1 in the parent document and try this:
 
  alert($wnd.parent.document.getElementsByTagName(H1)[0].innerText);
 
  Ian
 
  http://examples.roughian.com
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Possible to get an element's propertys from a container iframe?

2008-10-29 Thread darkflame

I stand corrected!

It did work fine.
I was testing it in Opera, using its ability to edit webpages live and
see the changes in realtime.
It seems however, that despite the changes being visible on screen,
javascript still referances the original page outside of an iframe,
thus it wasnt working.

Cheers again!

On Oct 29, 6:07 pm, Ian Bambury [EMAIL PROTECTED] wrote:
 I only tried it in IE and it worked in that for me.
 Alternatively, (I haven't tried this) create a JS method in the parent and
 call it from JSNI - maybe that will be allowed - what are you using?

 Ian

 http://examples.roughian.com

 2008/10/29 darkflame [EMAIL PROTECTED]





  dosnt seem to work.

  My testing HTML is just;

  Body
  h1 test test test /h1
  iframe src=(link to gwt page here) width=100% height=500px/
  iframe
  /Body

  And my code is;

  public static native void testWindow()
                 /*-{
                   $wnd.alert(test);

   $wnd.alert(text=+$wnd.parent.document.getElementsByTagName(H1)
  [0].innerText);

                 }-*/;

  When activating that function, the first alert test appears, but the
  following one does not.
  I put it in a try/catch loop and it gave me a

  Security error: attempted to read protected variable

  exception.

  On Oct 29, 3:40 pm, Ian Bambury [EMAIL PROTECTED] wrote:
   Hi Thomas,
   Put an H1 in the parent document and try this:

   alert($wnd.parent.document.getElementsByTagName(H1)[0].innerText);

   Ian

  http://examples.roughian.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Possible to get an element's propertys from a container iframe?

2008-10-23 Thread darkflame

If my GWT app is in a container iframe, is it possible to get
propertys of elements from outside that frame?

I tried a simple;

 DOM.getElementById(testid).getInnerText())

But the app couldnt find it.

Is there any way for the GWT app to look outside its container? Or
to even tell if it has one?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---