KioskeaKioskeaCommentCaMarcheSign up, it's free !
Saturday May 17, 2008 - 5:04:01 pm BST

Can we return to server while ses

Search : in
can we return to server while ses
par anilchand6
 Threaded discussions
Statut : Not resolved
Sunday May 4, 2008 02:26:19 PM
Hello,


Can anybody advice me at what extent we can replace javascript with PHP ?. can we pick value from html form to PHP without form submission ? if we can than how ?
Configuration: Windows XP
Internet Explorer 6.0
Reply to anilchand6  Report this message to moderators Go to last message

1


  • This message seems useful, vote!
  • Report this message to moderators
By god09, on Sunday May 4, 2008 02:38:39 PM Threaded discussions 
Hai


In a sense, yes.

You can use AJAX (combination of JavaScript and server-side pages) to send/receive data from a web page and the server. So, you could use any JavaScript trigger to call a function that will "grab" a value from the form, submit it to a PHP page (transparent to the user) and return back the results to the JavaScript which can act upon it further.

One common use for this would be if you have dependant select lists. For example, if you want the user to select a region and then select an office in that region, you would want the "office" field to dynamically change when the region is selected. For a small list I would do this all in JS, but for large or complex lists you could use AJAX. When the user changes the region, JS is used to send the selected region to a PHP page which returns the list of offices. The JS then uses that list to repopulate the "offices" list.

There are many AJAX turorials available on the web.
Reply to god09
Currently no message on this subject
Reply
Message title :
Your nick:
Your E-mail :
Message: 
  •  
  •  
Options: Get the answers by mail.
 

Help