Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-19 Thread Susan Shemin
s workable. Thanks for all your replies! Susan - Original Message From: Austin Smith <[EMAIL PROTECTED]> To: NYPHP Talk Sent: Monday, February 18, 2008 10:34:13 PM Subject: Re: [nyphp-talk] javascript calling php function -- now question on Ajax Not to discourage you from using x

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-19 Thread csnyder
On Feb 18, 2008 11:58 PM, Susan Shemin <[EMAIL PROTECTED]> wrote: > > thanks, Mike and Ken > > first off, I'm not using a form (so no POST); the link is in an anchor tag. > I could put a form around it, but that seems to me making a simple link > complex. > The conceptual bit that you may be missi

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-19 Thread Steve Manes
Ken Robinson wrote: But, Austin, is correct, you don't need AJAX here. That's true. There are probably a dozen ways to handle this without Ajax. One lightweight solution would be to have that onclick handler make a 1x1 image request (with query args) to a hidden DIV. __

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-19 Thread Ken Robinson
At 11:58 PM 2/18/2008, Susan Shemin wrote: thanks, Mike and Ken first off, I'm not using a form (so no POST); the link is in an anchor tag. I could put a form around it, but that seems to me making a simple link complex. You don't understand. The POST method is defined in the AJAX code you

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-18 Thread Susan Shemin
thanks, Steve I'll have to work through your example. And thanks so much for pointing me to xAjax -- I'll look it over. - Original Message From: Steve Manes <[EMAIL PROTECTED]> To: NYPHP Talk Sent: Monday, February 18, 2008 8:36:28 PM Subject: Re: [nyphp-talk] javasc

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-18 Thread Austin Smith
Not to discourage you from using xAjax, which I've seen put to fine use, it seems to me like you're adding Javascript where PHP would do the job just fine, all by itself. Assuming that your anchor element is really going to direct the user off the page, you might do well to implement something like

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-18 Thread Susan Shemin
thanks, Mike and Ken first off, I'm not using a form (so no POST); the link is in an anchor tag. I could put a form around it, but that seems to me making a simple link complex. I want to run this php code when the link is clicked $webpage=""; $link_clicked=""; Function capture_click($webp

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-18 Thread Steve Manes
Susan Shemin wrote: Anyway, Ajax is usually used to open an external file into a div, and it uses a form to send the request. What I want to do is trigger a php script to run when someone clicks a certain anchor URL. I guess you would call it my own stats attempt. So I have no form, and noth

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-18 Thread Ken Robinson
At 11:20 PM 2/18/2008, Susan Shemin wrote: My quick fix didn't work because it put entries into the database as the page loaded -- but they were there... Anyway, Ajax is usually used to open an external file into a div, and it uses a form to send the request. What I want to do is trigger a p

Re: [nyphp-talk] javascript calling php function -- now question on Ajax

2008-02-18 Thread Susan Shemin
My quick fix didn't work because it put entries into the database as the page loaded -- but they were there... Anyway, Ajax is usually used to open an external file into a div, and it uses a form to send the request. What I want to do is trigger a php script to run when someone clicks a certai