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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    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

    #2
    PHP Code:
    <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 
    0ellsei++)
      
    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

    Comment


      #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

      Comment


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

        Comment


          #5
          Originally posted by iykzy4luv View Post
          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: '<a href="http://site.con/1/">Site Link 1<\a>',

          do same for every link ....

          then change:

          document.write('<a href="'+SomethingElse()+'">'+SomethingElse()+'</a>');

          to:

          document.write(SomethingElse());

          Comment


            #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?
            Last edited by iykzy4luv; 19.04.11, 11:12.

            Comment

            Working...
            X