|
-
Aug 7th, 2005, 08:35 AM
#1
Thread Starter
Fanatic Member
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 
-
Aug 7th, 2005, 07:02 PM
#2
Hyperactive Member
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.
-
Aug 7th, 2005, 10:38 PM
#3
PowerPoster
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|