The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 3 of 3

Thread: Open links sequentially from a list

Hybrid View

  1. #1
    Registered User

    Open 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!!!

  2. #2
    yeah, 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.

    "First time it's a mistake, do it again and it's stupidity."

  3. #3
    Registered User
    Thanks 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 xml is my starting point in this area!

    cheers and thanks once again!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012