flunky needs help. Using JS for IFrames

C

Clyde

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top