Results 1 to 3 of 3
Hybrid View
-
September 4th, 2007, 01:38 PM #1148Registered User
postsOpen links sequentially from a list
Hey everyone!!
I have what i think it is a simple question to answer.
I have a button to open a new link in a new browser window. And what i need is that after i press the button, the link opened would come from a list of html. I have, for example, 10 html pages "page1.html", "page2.html", and so on.
I dont want that the html opened would be from a random choice, but i want to be sequential. Example: when someone press the button, it will open page1.html, then someone else press the button again (somewhere else in the world!) the page opened will be page2.html...
I hope that i'm being clear in my line of thought. Is this possible?
thanks people, and cheers!!!
-
September 4th, 2007, 07:33 PM #2197Registered User
postsyeah, it would be possible, but depending on what you are trying to accomplish, there are different ways to do this...
id say have a DB backend and reference each link to an ID a table along with a column that notes whether it has been clicked on or not.
ID PAGE CLICKED (0 = no, 1 = yes)
-- ----- --------
1 page1.html 0
2 page2.html 0
3 page3.html 0
4 page4.html 0
then if a user clicks on page1.html, that opens up and you change the Clicked to 1 for that page...then if another user clicks on the button that you talk about, you just open the next html page in your list that has a 0 in the Clicked column and not a 1.
I have no idea why you would do this, but ohwell, im sure you have a good reason.
hope that helps...but as i said, there are other ways depending on what you are trying to accomplish and for what reason.
cheers."First time it's a mistake, do it again and it's stupidity."
-
September 5th, 2007, 08:03 AM #3148Registered User
postsThanks so much for your reply!!!
I'm developing a website for a small soccer club in a small town, and we have a couple of sponsors that appear in the website with their logos, and a couple of other sponsors that paid less
.
So the directors of the club agreed with them not to put them in the website, but create a "other sponsors" button. Then when you press the button it would open the website of one of them, from a list where all of them would be present. I asked if it could open them randomly, but they prefer in a sequence, because they think this will give them a fair exposure between them.
Can i have this list done in xml? I'm a graphic designer starting to dig into programing, and not only designing...so... xml is my starting point in this area!
cheers and thanks once again!

Reply With Quote

Bookmarks