Iframe on top

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

Iframe on top

Post by shivam0101 »

Hello,

I have 4 links. When i click on it a window opens in iframe. (which i have downloaded from http://www.codingforums.com/showthread.php?t=77610).

The window is appearing bellow the existing div element. How can i make it to appear on top of all elements.


Thanks
User avatar
Gente
Forum Contributor
Posts: 252
Joined: Wed Jun 13, 2007 9:43 am
Location: Ukraine, Kharkov
Contact:

Post by Gente »

Actually I don't like iframes but if you use it you can try to do following.
Place it in some some <div> and set large z-index value for this container.
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

[Solved] Iframe on top

Post by shivam0101 »

Thanks. Is there any disadvantage of using iframe? any other alternative to iframe?
User avatar
Gente
Forum Contributor
Posts: 252
Joined: Wed Jun 13, 2007 9:43 am
Location: Ukraine, Kharkov
Contact:

Post by Gente »

About alternatives - I haven't seen any.
About disadvantages - some problems with validation, but no really serious if absolutely valid xHTML is unnecessary.
User avatar
miramardesign
Forum Newbie
Posts: 3
Joined: Fri Jun 29, 2007 7:36 pm
Location: Miami and Hollywood FL
Contact:

cons of Iframe

Post by miramardesign »

the cons of iframes are that they are not easily index-able to the search engines mostly, and hard to bookmark. But if you must use them in an app do so sparingly.

I prefer to use document.getElementById('mydivsid').innerHTML = 'html im putting into div'; and then in body put

<div id='mydivsid'> </div> and then call an onload function.
Post Reply