View Full Version : changing from iFrame to script

02-28-2007, 08:49 AM
I know I asking too many Questions, But this form is the best I have ever tried,
I am making a website with web contents to be displayed on other website ( like "today in History" –" picture of the day" and so on, The only way I know to show it on other website is by iFrame, which is not good, Is there any way to change this code

<iframe name="I1" height="222" width="168" src="http://mywebsite.com/webtools/today_in_history.htm" scrolling="no" border="0" frameborder="0" target="_blank">
Your browser does not support inline frames or is currently configured not to display inline frames.

To a java or java script, like googles adsense and other ads websites, so the webmasters just include the script in the desired place, and it will retrieve the content from my site
(content may include pictures, scrollers, slide show)

02-28-2007, 09:06 AM
<div style="width:168px;height:222px;overflow:auto;">

Maybe try this ? (overflow is to make it scrollable)

02-28-2007, 09:44 AM
I can't get the Idea,
I need a script to give to website owners to add it to their website, and it will retrieve data from my server

03-01-2007, 02:51 AM
Why not just send them the script!?

<script type="text/javascript">
var url = 'yourcontentpage';
var att = 'youriframeattributes';
var alt = 'alternatetext';

document.write('<iframe src="' + url + '" ' + att + '>' + alt + '</iframe');
should do the trick. It's still an iframe, but in a JavaScript.