iFrame question...

Discussion in 'Web Design and Development' started by puffnstuff, Oct 11, 2009.

  1. puffnstuff macrumors 65816

    Joined:
    Jan 2, 2008
    #1
    Is there anyway to implement a javascript link in an iFrame?

    I tried it

    HTML:
    <iframe src ="http://xxxxxx.com/js" width="100%" height="300">
      <p>Your browser does not support iframes.</p>
    </iframe>
    and all I got was \x0a all over the page
     
  2. puffnstuff thread starter macrumors 65816

    Joined:
    Jan 2, 2008
    #2
    holy crap I figured it out! :eek:

    iframes can be done in javascript too! Learn something new every damn day eh!:cool:
     
  3. puffnstuff thread starter macrumors 65816

    Joined:
    Jan 2, 2008
    #3
    edit: n/m didn't figure it out

    I guess it can be done with javascript though? how?:confused:
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    Why are you trying to do it in an iframe? Just put it in a div and style as need be. I think you're trying to make something harder than it needs to be.
     
  5. puffnstuff thread starter macrumors 65816

    Joined:
    Jan 2, 2008
    #5
    I was trying to open up another page in my site using the iframe

    I wave the white flag I searched and nothing so I guess it's impossible :shrugs:
     
  6. NathanCH macrumors 65816

    NathanCH

    Joined:
    Oct 5, 2007
    Location:
    Stockholm, Sweden
  7. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #7
    If you're wanting to link a JavaScript file from another site, you would use the script tag, not a iframe. Also, the site you're linking to would likely be upset about it as it costs them bandwidth for you to steal their script. If you describe what your desired outcome is a little more we may be able to offer better solutions.
     
  8. puffnstuff thread starter macrumors 65816

    Joined:
    Jan 2, 2008
    #8
    I am trying to embed my tumblelog onto my website

    it gives me this code to do embed on my site
    <script type="text/javascript" src="mylink.com/js"></script>

    it says I can customize it using CSS but I cannot figure out how to go about doing that. Anybody can clue me in on how to start is it just like designing a tumblr theme?:confused:
     
  9. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #9
  10. puffnstuff thread starter macrumors 65816

    Joined:
    Jan 2, 2008
    #10
    that doesn't work with the external script they give to embed on my personal site though.

    :sighs: i'll just use wordpress thought this would be easier but it's not
     
  11. star-fish macrumors regular

    Joined:
    Aug 24, 2009
    #11
    From the sounds of it the only way round it is to make a tumblr theme which matches the look of your website and then just link to it as normal.
     

Share This Page