window.parent not working in firefox
-
I am using following function to print iframe . but it doent work with Firefox and works in IE..why dont work in mozilla fireox 3.0..pls gv alternate.. function Print() { var iframeE3 =parent.document.frames['pageframe1'].document.frames[2]; var iframeE4 =iframeE3.document.frames.length; if (iframeE4>0) { iframeE3.focus(); iframeE3.print(); } else { alert('no selection'); } }
-
I am using following function to print iframe . but it doent work with Firefox and works in IE..why dont work in mozilla fireox 3.0..pls gv alternate.. function Print() { var iframeE3 =parent.document.frames['pageframe1'].document.frames[2]; var iframeE4 =iframeE3.document.frames.length; if (iframeE4>0) { iframeE3.focus(); iframeE3.print(); } else { alert('no selection'); } }
-
Anshumas wrote:
try directly with help of document.getElementById('iframe12') etc..
What does it mean ? Did you read the complete requirment ?
cheers, Abhijit CodeProject MVP
My Blog : Abhijit's World of .Net
-
I am using following function to print iframe . but it doent work with Firefox and works in IE..why dont work in mozilla fireox 3.0..pls gv alternate.. function Print() { var iframeE3 =parent.document.frames['pageframe1'].document.frames[2]; var iframeE4 =iframeE3.document.frames.length; if (iframeE4>0) { iframeE3.focus(); iframeE3.print(); } else { alert('no selection'); } }
This code is really messy, I assume it blows up in FF, given that you never check if your assumptions are correct ( that there are 3 frames, that iframeE3 is not null, etc )
Christian Graus Driven to the arms of OSX by Vista.
-
I am using following function to print iframe . but it doent work with Firefox and works in IE..why dont work in mozilla fireox 3.0..pls gv alternate.. function Print() { var iframeE3 =parent.document.frames['pageframe1'].document.frames[2]; var iframeE4 =iframeE3.document.frames.length; if (iframeE4>0) { iframeE3.focus(); iframeE3.print(); } else { alert('no selection'); } }
Adding to what others said, Install FireBug and check what's wrong with the script. Or there is an Error Console available with firefox which will show the errors in the current page. Try that.
Navaneeth How to use google | Ask smart questions