Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

puffnstuff

macrumors 65816
Original poster
Jan 2, 2008
1,469
0
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
 
holy crap I figured it out! :eek:

iframes can be done in javascript too! Learn something new every damn day eh!:cool:
 
edit: n/m didn't figure it out

I guess it can be done with javascript though? how?:confused:
 
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.
 
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.

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:
 
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.
 
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:
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.