Results 1 to 4 of 4

Thread: changing from iFrame to script

  1. #1
    Join Date
    Feb 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default changing from iFrame to script

    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
    Code:
    <p>
    <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.
    </iframe></p>
    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)
    Last edited by mailtosaleh; 02-28-2007 at 09:09 AM.

  2. #2
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Code:
    <div style="width:168px;height:222px;overflow:auto;">
    content
    </div>
    Maybe try this ? (overflow is to make it scrollable)

  3. #3
    Join Date
    Feb 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by mailtosaleh; 02-28-2007 at 09:53 AM.

  4. #4
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Why not just send them the script!?
    Anyways,
    Code:
    <script type="text/javascript">
    var url = 'yourcontentpage';
    var att = 'youriframeattributes';
    var alt = 'alternatetext';
    
    document.write('<iframe src="' + url + '" ' + att + '>' + alt + '</iframe');
    </script>
    should do the trick. It's still an iframe, but in a JavaScript.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •