English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hey all,

I am not very good in html programming, but i am looking for a javascript that would load a différent URL out of 6 predefined link,. and load that URL randomly on the website, on what i heard was call onload event. I know i need to program an array and choose randomly out of that array the link it will load automatically in the webpage. I don't what the user to click on anytime, it loads a différent adress everytime the user reloads or enters the page. Thanks for you help.

2007-05-09 04:56:50 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers



<br /> go somewhere!<br />



ignored!!!

2007-05-09 05:26:29 · answer #1 · answered by jake cigar™ is retired 7 · 3 0

hi, I had the comparable problem yet have downloaded some loose javascript books in PDF. After googling 'javascript tutrorials' I went around the familiar deceptive web pages. Then - stupid me - I googled 'javascript academic pdf' and lo-and-behold! there became into lots. So provide it a try. superb of superb fortune.

2016-10-15 04:52:11 · answer #2 · answered by Anonymous · 0 0

Are you talking about random *relative to that one user*? or *random relative to the computer that serves up the web page*? And note that either way, truly random could result in the same page displayed twice or even thrice in a row...

At any rate, the first answer above should do, and if random *relative to the user* then add steps to track the page by storing a cookie on the user's computer, or otherwise, maybe make your tracker a php routine that keeps track on the server side...

2007-05-09 07:10:33 · answer #3 · answered by fjpoblam 7 · 0 0

i suppose this would not be possible, how would u store the state of the window
there should be a counter starting from 0
it should increment each time a page is loaded

the counter would link to the index number of the array where all the 6 webpage's address would be mentioned.

BUT HOW COULD YOU STORE THE VALUE OF COUNTER ONCE PAGE IS CLOSED

2007-05-09 05:27:13 · answer #4 · answered by hmmmmmmmm! 3 · 0 2

fedest.com, questions and answers