Results 1 to 3 of 3

Thread: Disable Links After Click, Display Something Else

  1. #1
    Join Date
    Feb 2008
    Thanked 2 Times in 2 Posts

    Default Disable Links After Click, Display Something Else

    I want to disable a certain link after the user clicks it. Once the page is reloaded i want the link to disappear and display some other text in its place.

    What is the best way to do it?

    I've managed to add the IP address of the user, and a timestamp using NOW() into my mysql database...Now...i cant figure out how to find the difference between the NOW in the database and the NOW generated on the next page load.
    Advice is greatly appreciated, thanks!
    Last edited by SChaput; 06-30-2009 at 11:31 PM.

  2. #2
    Join Date
    Sep 2008
    Midland, Texas
    Thanked 0 Times in 0 Posts


    I think that JavaScript will work better when it comes to disabling HTML tags; however, I think it would be better if you post your code so we can look at it and point you in the right direction.

  3. #3
    Join Date
    Jun 2009
    Thanked 0 Times in 0 Posts


    yeah, i mean what your asking for seems to be a form submission, and if it's just a random thing, you can use the random class which will generate random characters to reappear.

    I actually did this for a website client who wanted to have a different page background appear each time his site vistors clicked on a link. he had something like 230 pictures he had amassed and wanted the background to randomly pick one. When the user clicked on a link / form / whatever and it loaded a new page, the background would change... I added some ajax magic fade and it looked really good then.

    if your just wanting to have the browser click then have the text changed, you can use php's random class to give the appearance of a random selection within an array of choices. in my case it pulled all the pictures out of a folder, put these file names into an array and then randomly picked one.


Posting Permissions

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