|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
PHP Event Handling Vs. JavaScript
Ok, is it possible to perform the event handling in PHP that is done in JavaScript. I mean I want things to change without click a submit button or anything like that. For instance, javascript supports the "onChange" event for select menus. Is there anyway to emulate this in PHP without using JS? Thanks!!!
|
|
#2
|
|||
|
|||
|
RE: PHP Event Handling Vs. JavaScript
no, PHP is a server-side language, which means that it is interpreted by the server and therefore a page would have to be refreshed (to talk with the server) in order to execute more code.
client-side code (like javascript) is interpreted by the browser, and therefore doesn't need refreshed. |
|
#3
|
|||
|
|||
|
RE: PHP Event Handling Vs. JavaScript
Hi!... I'm very new to PHP, but I was able to make a solution to interact javascript events with php.
it's a nasty way, but works indeed. put a hidden iframe in your page. in this hidden iframe you put your php script file. when the desired javascript event occured make a function that refreshes only the iframe, and there you are. |
|
#4
|
|||
|
|||
|
RE: RE: PHP Event Handling Vs. JavaScript
[quote] Hi there!. I am interested in learning more about using java event functionality in php. I mean duplicating functionality of onClick and onChange events in java in php pages. Please provide me here some code visibility on the trick you talked about using hidden iFrame. Thanks in advance |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > PHP Event Handling Vs. JavaScript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|