Pls write dis simple java script code, n i wil be glad u did.

Started on the old forum in April 2011 · view the original in the archive · old links redirect here

5 replies · 725 views · started 15 years ago · 1 min read

3 participants
iykzy4luv Developer · 83 posts #1

pls write a java script code, dat wil show single links daily daily up to 30 days -i.e 1 link wil show 4 1 day. and anoda link wil show 4 d next day, contineousely up to 30 days. tanks

something else Fellow · 2,296 posts #2
<html>
<head>
<script language="javascript">
function SomethingElse()
{
  var urls = new url
  (
        "http://site.con/1/",
        "http://site.con/2/",
        "http://site.con/3/",
        "http://site.con/4/",
        "http://site.con/5/",
        "http://site.con/6/",
        "http://site.con/7/",
        "http://site.con/8/",
        "http://site.con/9/",
        "http://site.con/10/",
        "http://site.con/11/",
        "http://site.con/12/",
        "http://site.con/13/",
        "http://site.con/14/",
        "http://site.con/15/",
        "http://site.con/16/",
        "http://site.con/17/",
        "http://site.con/18/",
        "http://site.con/19/",
        "http://site.con/20/",
        "http://site.con/21/",
        "http://site.con/22/",
        "http://site.con/23/",
        "http://site.con/24/",
        "http://site.con/25/",
        "http://site.con/26/",
        "http://site.con/27/",
        "http://site.con/28/",
        "http://site.con/29/",
        "http://site.con/30/",
        "http://site.con/31/"
  );
 var today = new Date();
 var day = today.getDate();
 return urls.list[day-1];
}

function url()
{
  var something = url.arguments;
  var ellse = something.length;
  this.list = new Object();
  for (var i = 0; i < ellse; i++)
  this.list[i] = something[i];
  this.count = ellse;
  return this;
}
</script>
</head>

<body>
<script language="javascript">
document.write('<a href="'+SomethingElse()+'">'+SomethingElse()+'</a>');
</script>
</body>
</html>
iykzy4luv Developer · 83 posts #3

gud! i want it to have name of link, just like ramdom link, i.e link 1 i.e link 1 name. tanks@something else

Petar Raznatovic Junior · 25 posts #4

PHP is better solution then javascript. This links will be invisible to search engines and to users which disable javascript in their browsers.

something else Fellow · 2,296 posts #5

iykzy4luv wrote: gud! i want it to have name of link, just like ramdom link, i.e link 1 i.e link 1 name. tanks@something else

change: "http://site.con/1/",

to: '[Site Link 1<\a>',

do same for every link ....

then change:

document.write('<a href="'+SomethingElse()+'">'+SomethingElse()+'](http://site.con/1/)');

to:

document.write(SomethingElse());

iykzy4luv Developer · 83 posts #6

@petar i want to use it, on subdomain site, php wnt work, dat is why i need a java script, thanks

Added after 8 minutes:

@something else can u change that, den insert a sample url n link name, so that i will follow dat process to change odas to my desired links n link name, cos am not getting it right?

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close