Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,460 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,375 people online right now. Registration is fast and FREE... Join Now!




Iframes With Vars And Auto Refresh

 
Reply to this topicStart new topic

Iframes With Vars And Auto Refresh, Mass confusion in my head!

nanascalala
post 26 Jan, 2005 - 08:06 PM
Post #1


New D.I.C Head

*
Joined: 13 Jan, 2005
Posts: 31



Thanked 1 times
My Contributions


I have fiddled with this for 2 hours, and have gotten nowhere. I have absolutely no idea what im doing... crazy.gif

Maybe someone can help, or get me started.
What i want to do is have an Iframe that loads up a site with a variable in it. THEN i need the iframe to refresh about every 15 seconds. For refreshing all I have seen is <meta...> However the page is external! So, i cant!

The page is:
http://www.mailinator.com/mailinator/CheckMail.do?email=
after the '=' needs to be the variable rom.
Such confused! blink.gif

If anyone has any idea where I could start this... it'd be much appreciated.
User is offlineProfile CardPM

Go to the top of the page

SoLi
post 26 Jan, 2005 - 09:47 PM
Post #2


andrewDust.com

*****
Joined: 27 Jan, 2002
Posts: 1,234


My Contributions


by external i assume you mean not hosted by you, and therefore u cant add a meta refresh to it.

a javascript will be able to do this i should think with some sort of window.location command.

its nearly 5am now so im going to bed, but i'll search around for u tomorrow (since i know little jscript)
User is offlineProfile CardPM

Go to the top of the page

MathewS
post 27 Jan, 2005 - 10:16 AM
Post #3


D.I.C Regular

***
Joined: 14 May, 2002
Posts: 252



Thanked 1 times

Dream Kudos: 1
My Contributions


CODE
<html>
<body>
<script type=text/javascript>
  function refresh()
  {
    document.all.iframe1.src = document.all.iframe1.src;
  }
  window.setInterval("refresh()",4000);
</script>
       
<iframe name='iframe1' src='http://www.dreamincode.net'></iframe>
</body>
</html>


This seems to work for me.

This post has been edited by MathewS: 27 Jan, 2005 - 10:17 AM
User is offlineProfile CardPM

Go to the top of the page

nanascalala
post 27 Jan, 2005 - 02:15 PM
Post #4


New D.I.C Head

*
Joined: 13 Jan, 2005
Posts: 31



Thanked 1 times
My Contributions


Wow, that worked wonders! Thanks a lot for that!

Was wondering how to change the url to add a var, but i figured it out. Stoopid me... Anyway just change the:

document.all.iframe1.src = document.all.iframe1.src;
to
document.all.iframe1.src = "page.html" + rom;


Anyway, thanks a lot for that!

This post has been edited by nanascalala: 27 Jan, 2005 - 02:32 PM
User is offlineProfile CardPM

Go to the top of the page

MathewS
post 27 Jan, 2005 - 05:00 PM
Post #5


D.I.C Regular

***
Joined: 14 May, 2002
Posts: 252



Thanked 1 times

Dream Kudos: 1
My Contributions


any time, i use something similar on a website of mine.
User is offlineProfile CardPM

Go to the top of the page

HabboFM
post 5 Jul, 2008 - 12:50 PM
Post #6


New D.I.C Head

*
Joined: 5 Jul, 2008
Posts: 1

ok, i have a toolbar, where I wanted to put the refreshing Iframe in...
when I did it, i got this code

CODE
<html>
<head>
<style type= "text/css">
<!--
BODY { margin-left:0; margin-right:0; margin-top:0; margin-bottom:0;
width:100%;height:100%;overflow:hidden;background-color:threedface;}
-->
</style>
</head>
<body>

<script type=text/javascript>
  function refresh()
  {
    document.all.iframe1.src = document.all.iframe1.src;
  }
  window.setInterval("refresh()",4000);
</script>
<marquee><iframe name='iframe1' src="http://djj.listen2myradio.com/frame1.php?b=78.129.199.141&a=1518" height="25" width="400" frameborder="0"></iframe>


</body>
</html>

this doesn't refresh the iframe :s, also when I put it on a normal website, please help
p.s.=> http://www.htmleditor.tk, check if it does what you want, with javascript HTML you need to copy the HTML, refresh the pagen, then paste it al in once ;-)

This post has been edited by HabboFM: 5 Jul, 2008 - 12:53 PM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 12:27PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month