Jump to content

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


Gutspiller

Recommended Posts

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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 weeks later...
[!--quoteo(post=370815:date=May 3 2006, 04:14 AM:name=Callmaster)--][div class=\'quotetop\']QUOTE(Callmaster @ May 3 2006, 04:14 AM) [snapback]370815[/snapback][/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:

[code]
<!-- 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 -->
[/code]

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.
Link to comment
Share on other sites

  • 2 weeks later...
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
[code]
<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>
[/code]

The setTimeout uses milli seconds, so 30000 is 30 seconds. finally call that page in an iframe.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.