frames

How can I get an element from within a frameset frame using JavaScript?

我怕爱的太早我们不能终老 提交于 2019-11-27 01:48:43
问题 I need to access and element from within a frameset frame. For example if I have the following markup: <frameset rows="33%,33%,*"> <frame src="frame1.html"/> <frame src="frame2.html"/> <frame src="frame3.html"/> </frameset> How can I get some element from one of the child frames? I have tried this: window.frames[1].getElementById('someElementId') This results in a type error : getElementById() is not a function. Can someone assist? Thanks! 回答1: You need to get the Document object for the

How to communicate between frames?

让人想犯罪 __ 提交于 2019-11-26 20:26:52
I'm maintaining an application that goes sort of like this: There is a Page A with a Frame that shows Page B. Now page B is part of a completely different product in a separate domain. Now, they want that when an option in B is clicked, the WHOLE page is redirected to another page in A. The problem is that the url of A is something like www.client.A.com/Order/Details/123 , and when we click in be it should redirect to something like www.client.A.com/Order/Edit/123 but B doesn't know anything about A. It doesn't know which order # is currently selected or anything about A. Page A who has the

Run JQuery in the context of another frame

a 夏天 提交于 2019-11-26 20:05:25
The client I am working with has a frameset like so... <frameset rows="100,*, 0"> <frame name="theFrame" id="theFrame" src="blah.html" > <frame name="theSecondFrame" id="theSecondFrame" src="foo.html" > <frame name="importantFrame" id="importantFrame" src="myFrame.html" > </frameset> When a certain action takes place I need my frame (importantframe which is currently hidden) to mostly take over the page and block any interaction with the other frames. I'm planning on blocking interaction using the jquery block UI plugin. The problem is I can't actually change the foo.html or blah.html files.

Is it possible to switch to an element in a frame without using driver.switchTo().frame(“frameName”) in Selenium Webdriver Java?

余生颓废 提交于 2019-11-26 18:01:33
I have a multiple nested frames and I need to access the elements under these. As these frames are dynamic I am not able to access these elements. Is it possible for me to access the elements without using driver.switchTo().frame() ? Like using the xpath directly or jquery, javascript or anything? Any suggestions are welcome In simple words, No , it wouldn't be possible to access the elements without switching into the intended <iframe> i.e. without using driver.switchTo().frame() To switch to the intended frame you have to use either of the following : Switch through Frame Name : driver

Detect failure to load contents of an iframe

佐手、 提交于 2019-11-26 17:42:03
问题 I can detect when the content of an iframe has loaded using the load event. Unfortunately, for my purposes, there are two problems with this: If there is an error loading the page (404/500, etc), the load event is never fired. If some images or other dependencies failed to load, the load event is fired as usual. Is there some way I can reliably determine if either of the above errors occurred? I'm writing a semi-web semi-desktop application based on Mozilla/XULRunner, so solutions that only

How are the facebook chat windows implemented?

时间秒杀一切 提交于 2019-11-26 16:25:59
问题 On Facebook you can browse the site without affecting the floating chat windows. Seems like if the main page was inside an iFrame and the footer and chat windows where floating outside. (source: k-director.com) Is the main content inside an iframe or are the footer and chat windows the ones inside an iframe? The later doesn't seem possible because int this case when you click in a link in the main page everything would have to reload, including the footer iframe. If you refresh the page the

Why are frames deprecated in html?

空扰寡人 提交于 2019-11-26 15:21:27
HTML has had frames from early days, but they are deprecated in the latest version. Many browsers (I have tried with Internet Explorer) don't even display frames properly. Why has this been done? What was the drawback in frames? Jakob Nielsen wrote a 1996 column that criticized frames . Some key points: Frames prevent users from properly bookmarking pages. When a bookmarked frameset page is loaded, users' previous mouse clicks inside the frames do not matter. Only the outer URL is saved, and users have to navigate to where they were manually. Frames present challenges for printing web pages.

contentDocument for an iframe

落花浮王杯 提交于 2019-11-26 12:29:32
问题 What exactly does \"contentDocument\" represent for an iframe (or even the old \"frame\" element)? Is it equivalent to the \"html\" element or the \"body\" element ? What is it\'s use? And is this property supported across all the browsers? 回答1: w3.org contentDocument of type Document, readonly, introduced in DOM Level 2 The document this frame contains, if there is any and it is available, or null otherwise. MDN From the DOM iframe element, scripts can get access to the window object of the

How to communicate between frames?

£可爱£侵袭症+ 提交于 2019-11-26 11:07:03
问题 I\'m maintaining an application that goes sort of like this: There is a Page A with a Frame that shows Page B. Now page B is part of a completely different product in a separate domain. Now, they want that when an option in B is clicked, the WHOLE page is redirected to another page in A. The problem is that the url of A is something like www.client.A.com/Order/Details/123 , and when we click in be it should redirect to something like www.client.A.com/Order/Edit/123 but B doesn\'t know

Any way of using frames in HTML5?

痞子三分冷 提交于 2019-11-26 09:38:50
问题 For school I must make a website and it must use those crappy old damn fml frames . I\'ve already complained about this to my teacher without any success :( I want to use HTML5, but it seems that frames are deprecated. Am I really required to use XHTML or HTML 4? Is there some work-around that makes my pages validate HTML5 with use of frames? 回答1: Now, there are plenty of example of me answering questions with essays on why following validation rules are important. I've also said that