Besttoolbars Development network

Back to Besttoolbars main site

 

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
javascript 3

 
Post new topic   Reply to topic    BestToolbars.Net Forum Index -> Mozilla/Firefox conversion
Author Message
spakinz



Joined: 04 Sep 2006
Posts: 15

PostPosted: Tue Sep 05, 2006 11:49 am    Post subject: javascript 3 Reply with quote

It seems that doesn't work tool.domain, I've substituted it for window._content.document.domain.
Back to top
Admin
Site Admin


Joined: 22 Aug 2006
Posts: 1055

PostPosted: Wed Sep 06, 2006 8:32 am    Post subject: Reply with quote

yes, you should use tool.window._content.document.domain
instead of tool.domain

To show alert: tool.alert("Testalert");


Last edited by Admin on Fri Jan 18, 2008 6:00 am; edited 1 time in total
Back to top
Dr.Snergel



Joined: 17 Oct 2007
Posts: 5

PostPosted: Thu Oct 18, 2007 4:22 pm    Post subject: Reply with quote

I've been having a similar issue in trying to identify the body of the current web page. Here is what my DocumentComplete function looks like with the comments indicating what actually happens. Is there a way to retrieve the body HTML from a firefox window like the reference tool.explorer.parentWindow.document.body.innerHTML does in IE?

Code:
               
function DocumentComplete(tool) {
  // Possible window references
  //  window.document also works but that refers to the HTML document containing this function and not the web page currently viewed by the user
  alert("tool.Explorer: "+tool.Explorer); // IE: [object] or null      FF: undefined
  alert("tool.explorer: "+tool.explorer); // IE: [object]            FF: [object Window]
  alert("tool.window: "+tool.window);     // IE: undefined          FF: [object ChromeWindow]
                  
  if( tool.window && tool.explorer ) {  // FF only
   alert("tool.explorer.window: "+tool.explorer.window);         // FF: [object Window]
   alert("tool.explorer.window.document: "+tool.explorer.window.document);  // FF: [object HTMLDocument]
   //alert("tool.explorer.window.document.body: "+tool.explorer.window.document.body); Fails
  }
                  
  if( tool.Explorer && tool.explorer ) { // IE only
   alert("tool.explorer.window: "+tool.explorer.window);
   alert("tool.explorer.title: "+tool.explorer.title);  // IE: Title of webpage currently viewing
                     
   if( tool.explorer.parentWindow ) {
      alert("tool.explorer.parentWindow.document: "+tool.explorer.parentWindow.document);
      if( tool.explorer.parentWindow.document )
        alert("tool.explorer.parentWindow.document.body: "+tool.explorer.parentWindow.document.body.innerHTML);
      }
   }
  }
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BestToolbars.Net Forum Index -> Mozilla/Firefox conversion All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group

Copyright c Softomate, 2010. All Rights Reserved
Terms of Service | Privacy Policy