Jump to content


Photo

How do I get java to reload the same bit of code ever few minutes?


  • Please log in to reply
4 replies to this topic

#1 Gutspiller

Gutspiller
  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts

Posted 03 May 2006 - 03:52 AM

I just have code that I want to be refreshed, but I don't want the whole page itself to be refreshed, just a specific section. I am trying not to use an iframe. Can somebody help a noobie on what code I should put in my page to do this for me?

Thanks.

#2 CallmasterIV

CallmasterIV
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 03 May 2006 - 08:14 AM

Hi gutspiller

what kind of content are we looking at? eg Text, DB query etc. and how is it displayed?
(Table, text field, html,..)?



I have no clue about javascripting at all, but
if we'd have a db query or text data to be displayed, a flash movie could do the job?
I am goint to get something up, that parses through a text file and displays the content in a
part of the webpage. Basically telling me what my perl-scripts are doing right now.
Havent found alternate techniques yet, so id probably go for a flash based thing.


Callmaster


#3 Gutspiller

Gutspiller
  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts

Posted 15 May 2006 - 07:40 PM

[!--quoteo(post=370815:date=May 3 2006, 04:14 AM:name=Callmaster)--][div class=\'quotetop\']QUOTE(Callmaster @ May 3 2006, 04:14 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hi gutspiller

what kind of content are we looking at? eg Text, DB query etc. and how is it displayed?
(Table, text field, html,..)?
I have no clue about javascripting at all, but
if we'd have a db query or text data to be displayed, a flash movie could do the job?
I am goint to get something up, that parses through a text file and displays the content in a
part of the webpage. Basically telling me what my perl-scripts are doing right now.
Havent found alternate techniques yet, so id probably go for a flash based thing.
Callmaster
[/quote]

Sorry, I should have been more clear. The code that I want "refreshed" every few minutes is banner code. The code is provided by an ad company and it looks something like this:

<!-- BEGIN: AdSolution-Website-Tag 4.3 : CuttingTheEdge - Gaming Network / 3DNewz_468X60_Top -->
<script type="text/javascript" language="javascript" src="http://as.ad-flow.com/dat/dlv/aslmain.js"></script>
<script language="javascript" type="text/javascript">
Ads_kid=0;Ads_bid=0;Ads_xl=468;Ads_yl=60;Ads_xp='';Ads_yp='';Ads_xp1='';Ads_yp1='';Ads_opt=0;Ads_par='';Ads_cnturl='';
</script>
<script type="text/javascript" language="javascript" src="http://as.ad-flow.com/dat/cjf/00/00/76/93.js"></script>
<!-- END:AdSolution-Tag 4.3 -->

I don't think a flash movie would work in this case since the banner itself could be flash and needs to be clickable. I was told by another person that javascript would be the best way to do this. Can I still get some instructions on how to do this? I know I could actually start making money on my site if I could just get this to work. :(

Thanks for any assistance.

#4 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 26 May 2006 - 05:58 PM

Iframe is the only solution to not reload the whole page.

You'll need to put the banner in an iframe. and set the onload event to set a timeout to reload the page, kinda like this
<html>
<head><title>Title here</title></head>
<body style="margin:0px; padding:0px;" onload="setTimeout('location.href=location.href', 30000);">

<!-- BEGIN: AdSolution-Website-Tag 4.3 : CuttingTheEdge - Gaming Network / 3DNewz_468X60_Top -->
<script type="text/javascript" language="javascript" src="http://as.ad-flow.com/dat/dlv/aslmain.js"></script>
<script language="javascript" type="text/javascript">
Ads_kid=0;Ads_bid=0;Ads_xl=468;Ads_yl=60;Ads_xp='';Ads_yp='';Ads_xp1='';Ads_yp1='';Ads_opt=0;Ads_par='';Ads_cnturl='';
</script>
<script type="text/javascript" language="javascript" src="http://as.ad-flow.com/dat/cjf/00/00/76/93.js"></script>
<!-- END:AdSolution-Tag 4.3 -->

</body>
</html>

The setTimeout uses milli seconds, so 30000 is 30 seconds. finally call that page in an iframe.

NoGray.com


#5 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 26 May 2006 - 07:44 PM

ajax is another solution. but iframe should be good enough.
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users