IFrame size

Javascript coding ..

Moderators: egami, macek, gesf

Post Reply
kiwi
New php-forum User
New php-forum User
Posts: 124
Joined: Sun Feb 29, 2004 6:26 am
Contact:

Thu Jul 01, 2004 1:03 pm

any way to set the size of IFrame with if else statement?

if the resolution is 1024 then set the iframe size to 'this' else set the iframe size to 'this'

can do like that? any one can help me to solve those resolution problem for a interface?

thanks a lot

User avatar
swirlee
Moderator
Moderator
Posts: 2257
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Thu Jul 01, 2004 2:28 pm

Your best bet is going to be to use JavaScript, so I've moved it to the JavaScript forum. Unfortunately, it's not my area of expertise, so I hope someone else can help you.
Image

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Thu Jul 01, 2004 8:04 pm

try modify...

Code: Select all

w =screen.width;
h = screen.height;

objiframe = document.getElementById('idname');
if (w > ...)
{
   objiframe.style.width = ..
}
else
{
   objiframe.style.width = ..
}

Post Reply