iframe despair
3 отговора
61 прегледа
iframe despair
hora.. otkacham.. help!.. opitvam se da access-na s javascript=dom=whatever.. you wanna call it.. niakakuv div koito mi se namira v iframe prez negovia parent document..
obshto vzeto.. tova ne e neshto neposilno.. no ne moga da go napravia za opera[latest model]... sled malko shte pratia variantite za ie i ns..
nqkoi ako znae neshto da kaje.. shte pocherpia
obshto vzeto.. tova ne e neshto neposilno.. no ne moga da go napravia za opera[latest model]... sled malko shte pratia variantite za ie i ns..
nqkoi ako znae neshto da kaje.. shte pocherpia
Re: iframe despair
<iframe name="Zoom" id="Zoom" src="Zoom.htm" frameborder="0" width="330" height="248" scrolling="no" id="Zoom"></iframe>
<script>
var iframeDoc = (bw.ns6)?document.getElementById("Zoom").contentDocument:
(bw.ie&&!bw.opera)?parent.frames.Zoom.document:null;
</script>
tova sum otkril za sega.. no ne moga da stigna do tuk.. s opera!!!... help
<script>
var iframeDoc = (bw.ns6)?document.getElementById("Zoom").contentDocument:
(bw.ie&&!bw.opera)?parent.frames.Zoom.document:null;
</script>
tova sum otkril za sega.. no ne moga da stigna do tuk.. s opera!!!... help
Re: iframe despair
<iframe name="Zoom" id="Zoom" src="Zoom.htm" frameborder="0" width="330" height="248" scrolling="no"></iframe>
<script>
var iframeDoc = (bw.ns)?document.getElementById("Zoom").contentDocument:
(bw.ie)?parent.frames.Zoom.document:
(bw.opera)?window.zoomWin.document:null;
</script>
ei tova namerih kato nachin.. za sega.. the opera-way works for ns as well but not for ie.. taka i ne mojah da nameri neshto raboteshto i za trimata... za safari i/ili Konqueror ne mi se misli..
Overall, vsichko e dobre kogato svurshva dobre.. za sega namerih tova koeto mi triabvashe no vse pak vseki koito ima kakvo da dobavi po nabolelia vupros iframe i gudelichkaneto im s javascript.. shte e mnogo dobre ako go napravi tyk..
blagodarq vi..
Didko.
p.s. ako iskate da posegnete ot iframe4eto i da pipnete neshto in its parent..
parent.top.document.getElementById("SomeDivId") [some element]
parent.top.window.someJSvariableOrObject,
parent.top.window["someJSvariableOrObject"] .....[some js variable or obj]
..nali
<script>
var iframeDoc = (bw.ns)?document.getElementById("Zoom").contentDocument:
(bw.ie)?parent.frames.Zoom.document:
(bw.opera)?window.zoomWin.document:null;
</script>
ei tova namerih kato nachin.. za sega.. the opera-way works for ns as well but not for ie.. taka i ne mojah da nameri neshto raboteshto i za trimata... za safari i/ili Konqueror ne mi se misli..
Overall, vsichko e dobre kogato svurshva dobre.. za sega namerih tova koeto mi triabvashe no vse pak vseki koito ima kakvo da dobavi po nabolelia vupros iframe i gudelichkaneto im s javascript.. shte e mnogo dobre ako go napravi tyk..
blagodarq vi..
Didko.
p.s. ako iskate da posegnete ot iframe4eto i da pipnete neshto in its parent..
parent.top.document.getElementById("SomeDivId") [some element]
parent.top.window.someJSvariableOrObject,
parent.top.window["someJSvariableOrObject"] .....[some js variable or obj]
..nali
summing it all up...
= = = = = = = = = = = = = = =
<iframe name="IFrameId" id="IFrameId" src="IFramePage.htm" frameborder="0" width="330" height="248" scrolling="no"></iframe>
= = = = = = = = = = = = = = =
in IFramePage.htm's <head> put...
<script> window.name = "iFrameWin"; </script>
= = = = = = = = = = = = = = =
[parent ---> iframe ]
//// refering to window Object
ie...........parent.frames.IFrameId.window
ns..........document.getElementById("IFrameId").contentWindow
opera.....window.iFrameWin.window
//// refering to document Object
ie...........parent.frames.IFrameId.document
ns..........document.getElementById("IFrameId").contentDocument
opera.....window.iFrameWin.document
[iframe ---> parent ]
//// refering to window Object
ie, ns, opera...........parent.top.window
//// refering to document Object
ie, ns, opera...........parent.top.document
<iframe name="IFrameId" id="IFrameId" src="IFramePage.htm" frameborder="0" width="330" height="248" scrolling="no"></iframe>
= = = = = = = = = = = = = = =
in IFramePage.htm's <head> put...
<script> window.name = "iFrameWin"; </script>
= = = = = = = = = = = = = = =
[parent ---> iframe ]
//// refering to window Object
ie...........parent.frames.IFrameId.window
ns..........document.getElementById("IFrameId").contentWindow
opera.....window.iFrameWin.window
//// refering to document Object
ie...........parent.frames.IFrameId.document
ns..........document.getElementById("IFrameId").contentDocument
opera.....window.iFrameWin.document
[iframe ---> parent ]
//// refering to window Object
ie, ns, opera...........parent.top.window
//// refering to document Object
ie, ns, opera...........parent.top.document