Link to home
Start Free TrialLog in
Avatar of Kristao
Kristao

asked on

help with input area

Ok hi :)

i just wana know is it posible an exsample would not be harm :).

ok i have this input box and i need something like this, when this box change "onchange" its calls out php function wich will do something for exsample:

function world() {
       print("hellow world");
      }

.....

input type="text" name="world" onchange="world()"

.....
my exsample doesn't work :)


thx.
Avatar of php_user
php_user

Sorry, you are out of luck.
JavaScript is on the client side, PHP is on the server side. You will need to write a JavaScript function to emulate whatever the php function does.

If you absolutely need to get Javascript to trigger something in PHP, you have a few options, none of which are pretty:

- open a popup window (could be blocked, you could make it visible, or make it very very small)
- open a pop-under window (virtually invisible but could be blocked)
- use a hidden frame

any of these sound good?  if not, just make a new request to the server, do whatever you need to do, and bring the user back to the page she was on.   if you need to maintain some variables you can just pass them along in PHP...

hope that helps.
ASKER CERTIFIED SOLUTION
Avatar of red010knight
red010knight
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kristao

ASKER

sorry about this long time no answer :) but i dindn't get notice to my e-mail