...

View Full Version : help with Javascript for style a external Iframe



maryano
11-28-2012, 03:48 AM
Hello,

i need to add style="background:transparent" in the body of an external frame:

<iframe name="frm" src="external link">
#document
{<html>
<head>...</head>
<body class="modelo3" style="background: transparent;">

.....

</body>
}

</iframe>

I tried with javascript, but no way.

Thanks in advance.

sunfighter
11-28-2012, 02:58 PM
In the iframe definition add allowtransparency="true"
See if that helps.

maryano
11-29-2012, 05:39 PM
Thanks for the idea, but it doesn't work.

sunfighter
11-29-2012, 08:52 PM
Maybe you should post the code your using and not a snip it.

maryano
11-30-2012, 04:10 AM
<div class="custom" >
<iframe frameborder="0" height="395" scrolling="no" src="EXTERNAL LINK" width="648">
</iframe>
</CODE>

The code of the external frame is:

<CODE>
#DOCUMENT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="es">
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">

<!-- CSS -->
<link rel=.../>
<link rel=.../>
<link rel=.../>
</head>

<body class='modelo2'>

...
...
more code of body that cames from the external frame...
...

</iframe></div>



AND I NEED TO PUT IN SOMEWAY <body class='modelo2' style="background:transparent">

webdevs
11-30-2012, 11:52 AM
May be you needs to write transparency css on class called "modelo3" I am not sure but may be you can do using CSS3

VIPStephan
11-30-2012, 11:56 AM
The body has no intrinsic background color, so there’s no point in setting it to “transparent”. I suppose you want the iframe to have a transparent background color?
It would help if you showed us a live example and mentioned the browser in which the issue occurs.

maryano
12-05-2012, 12:53 AM
css class "modelo3" has a background defined... and i need to overwrite it using "style='background...'

this is my iframe: http://booking.iberiatrip.com/public/widget/1321/2240371588



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum