IIS - Iframe problem - Asked By Deepak Sonawane on 09-Sep-09 02:28 AM

hi all,

i have used iframe in that i have called login.aspx page using that i am logging in asp.net applicaiton.I want to come out of iframe once i logged in properly (After logged in i want that page without iframe).

Thanks & Regards,

Deepak

re - Web Star replied to Deepak Sonawane on 09-Sep-09 02:56 AM


Better for this situation u can use two page one with iFrame and other with out iFrame, when u open login page then refer with iFrame main page and after successfully logged in u redirect other without iframe main page

Iframe problem - Sagar P replied to Deepak Sonawane on 09-Sep-09 03:13 AM

Response.Write("<script>window.open('http://www.google.com.hk/','_blank');</script>");

Or you can try something like this;

Response.write("<scri" & "pt language=""javascript"">" & " redirect();" & " function redirect()" & " {document.form.action=""productPRV.aspx"" document.form.method=""post""; document.form.target=""_blank""; document.form.submit();}" & " </scr" & "ipt>")

Also go thr this link;

http://www.sourcecodeonline.com/list?q=how_to_open_iframe_in_new_page

Try this - Sagar P replied to Deepak Sonawane on 09-Sep-09 03:16 AM

For example you have an IFrame as,
    <iframe id="iFrame_body" style="MARGIN-LEFT: 0px; MARGIN-RIGHT: 10px; Z-INDEX: 1;" frameborder="0" width="100%" height="100%" src="" onreadystatechange="frame_Change()"></iframe>

and you have some source page set for the Iframe (but i have left it blank above).  have the javascript function in the page as
<script type="text/javascript" language="javascript">
function frame_Change(){
if(document.all.iFrame_body.src != "" && document.all.iFrame_body.readyState == "complete")
    document.location.href='./Somepage.aspx'
}
</script>
break a page out of a frame - mv ark replied to Deepak Sonawane on 09-Sep-09 04:11 AM
To break a page out of a frame, place this line of JavaScript in pages that shouldn't be within frames -
if (self.parent.frames.length != 0) self.parent.location=document.location

You can also try some of the other options listed (at the bottom) here -
http://evolt.org/node/249