Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > flunky needs help. Using JS for IFrames

Thread Tools

flunky needs help. Using JS for IFrames

Posts: n/a
I have some HTML ads on server #1 that I want to display on server #2.
I don't have any control over server #2.

I need to display this ads in iframes since they are complete HTML
pages including embedded CSS info.

Since iframes don't autosize, I want to create the IFrame tag using
width and height values that change from ad to ad.

What I have is a JS file on my server containing ad info (adUrl,
adHeight, adWidth arrays). I have a function that builds a complete
IFRAME tag using the properties for a random ad. The function is
called witin a document.write() statement.

When the page initially loads, the iframe displays properly. But when
the page is refreshed and a different ad URL is chosen, the iframe's
height/width changes correctly but the IFrame's src doesn't change
(the previous ad's HTML page is shown).

Same behavior in IE & Firefox.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
using iframes in Safari Javascript 5 03-17-2007 12:20 PM
Using frames / iframes Owen Javascript 1 09-13-2005 05:02 AM
herbertrd: Latest web page flunky gangle2 Computer Support 0 04-22-2005 06:52 AM
Using iFrames on your front page HTML 4 01-26-2005 12:55 AM
Using iframes in java. Gareth Java 1 07-28-2003 02:46 PM