Page 1 of 1

Confused about how to trigger a script- solved

Posted: Wed Nov 12, 2008 2:35 am
by CyborgPrime
Hello-

I have a database that uses an online form to gather info from the user.

The form is rather long - its for a scholarship applcation and there are a lot of fields.

I want to automatically update the database every time the user moves from field to field.

How can I call PHP subroutines from javascript?

Re: Confused about how to trigger a script

Posted: Wed Nov 12, 2008 3:14 am
by novice4eva
you could use AJAX, but it all sounds like a bad idea!! But maybe not :mrgreen:

Re: Confused about how to trigger a script

Posted: Wed Nov 12, 2008 3:34 am
by VladSun
CyborgPrime wrote:I want to automatically update the database every time the user moves from field to field.
Why? It seems to be a bad idea to me too.

Re: Confused about how to trigger a script

Posted: Wed Nov 12, 2008 4:04 am
by aceconcepts
Like the others have said "This seems like a bad idea".

However, an alternative may be to split the fields up into stages so that you can gather data per stage.

Re: Confused about how to trigger a script

Posted: Mon Apr 19, 2010 5:49 pm
by CyborgPrime
Oh - because the users could never remember to hit the save button or because they had a spotty internet connection- and they were complaining that they lost all this work.

I fixed this by using AJAX and it works perfectly.