Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
How to Javascript daily link/content change?
Old 08-16-2010, 03:20 PM How to Javascript daily link/content change?
Junior Talker

Posts: 3
Trades: 0
Is there a Javascript code to change multiple affilate link/content daily?
roypage71 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-16-2010, 03:28 PM Re: How to Javascript daily link/content change?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Such a function would be better done serverside.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-16-2010, 03:37 PM Re: How to Javascript daily link/content change?
Junior Talker

Posts: 3
Trades: 0
What if there is external files with content you would like to change automatically on daily basis through div tags?

Last edited by roypage71; 08-16-2010 at 03:39 PM..
roypage71 is offline
Reply With Quote
View Public Profile
 
Old 08-16-2010, 03:40 PM Re: How to Javascript daily link/content change?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Same, include the output into the page.

You couldn't reference external files with javascript anyway.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-16-2010, 03:48 PM Re: How to Javascript daily link/content change?
Junior Talker

Posts: 3
Trades: 0
This was a code I got from someone. it worked alone with .js files but when i put in my site it conflicts with something. The sales201006.. files have stuff like this in them

Code:
"var str = "";
str += "<h1>Sales of the day</h1><h2for June 8, 2010</h2>";
str += '<p>Product description and images';
document.write
Code:
<html>
<head>
<title>Sales of the Day</title>
<style type="text/css">
.SaleOfDay {
  height:50px;
  width:500px;
  border:1px solid blue;
  background-Color:#ffddbb;
  display:none;
}
</style>
<script type="text/javascript">


onload = function() {
  var DayArray = ['SunSales','MonSales','TueSales','WedSales','ThuSales','FriSales','SatSales'];
  var today = new Date();
  var DOW = today.getDay();
  document.getElementById(DayArray[DOW]).style.display = 'block';
}

</script>
</head>
<body>
<h1>Sales of the Day</h1>
<div id="SunSales" class='SaleOfDay'><h2>Sunday</h2>
<script type="text/javascript" src="Sales20100608.js"></script>
</div>

<div id="MonSales" class='SaleOfDay'><h2>Monday</h2>
<script type="text/javascript" src="Sales20100609.js"></script>
</div>

<div id="TueSales" class='SaleOfDay'><h2>Tuesday</h2>
<script type="text/javascript" src="Sales20100610.js"></script>
</div>

<div id="WedSales" class='SaleOfDay'><h2>Wednesday</h2>
<script type="text/javascript" src="Sales20100611.js"></script>
</div>

<div id="ThuSales" class='SaleOfDay'><h2>Thursday</h2>
<script type="text/javascript" src="Sales20100612.js"></script>
</div>

<div id="FriSales" class='SaleOfDay'><h2>Friday</h2>
<script type="text/javascript" src="Sales20100613.js"></script>
</div>

<div id="SatSales" class='SaleOfDay'><h2>Saturday</h2>
<script type="text/javascript" src="Sales20100614.js"></script>
</div>

</body>
</html>
my site
http://needablemerchandise.webs.com/...main/html.html

Last edited by roypage71; 08-16-2010 at 03:52 PM..
roypage71 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to Javascript daily link/content change?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31736 seconds with 12 queries