Results 1 to 3 of 3

Thread: running PHP during onClick

Hybrid View

  1. #1

    Thread Starter
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    running PHP during onClick

    I've made an rss aggregator using PHP, which can tell people when certain feeds they are watching have been updated. I provide a page where they can mark feeds as 'seen', and also provide links to the sites related to each feed.
    Many users however have been asking for the status of their feeds to be updateed whenever they click on the link. Is this possible in php?
    I was thinking there may be some way to intercept the <a href> click, possibly using JavaScript, so that when it was followed the php update function was called...however, I have no idea whether it is possible to mix the two languages like this, as one is client-side and one is server-side.
    Even, would it be possible to send a request when the link is followed, to the server giving it the information required (in this case, two integers) so it can perform a php script while not opening any new windows?
    Thanks
    sql_lall

  2. #2
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Re: running PHP during onClick

    JavaScript and PHP are combinable...

    But it would seem like you would have to do frames or... a popup window...

    At least in my way of thinking....
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

  3. #3
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Re: running PHP during onClick

    Use a hidden iframe and javascript. Pass the numbers to iframe, tell it to goto a certain page via javascript, do whatever it is that your trying to do with your php page, and then return perhaps a javascript function inside the iframe that will update/notify the user (don't really know anything about RSS so...)

    If the user is navigating away from the page when they click the link....creater a wrapper perhaps around urls, give each address a unique id, call a php page that will convert the url to an address and do your 'updating'.

    Sorry, not really sure how RSS works
    Don't Rate my posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width