Forum Moderators: coopster

Message Too Old, No Replies

PHP & Javascript together? HOT TO

         

ktsirig

10:35 pm on Feb 25, 2006 (gmt 0)

10+ Year Member



Hello eveybody!

I am relatively new to PHP and I have no knowledge of Javascript, but I think Javascript might be what I need
for a problem I have.
Well, say you have a PHP page with a form and the forms send a query in the Mysql database,
for example "SELECT name FROM employers WHERE salary > 5000";
The user is then presented with a page containing all the names from the query (this I have done).
What I also want to have is to give the user the ability to click on every person's name and see exactly the amount of salary he gets.
I thought of making an extra php script that would take the person's name as input (when the user clicked on the name) and then show the salary.
But I want to use pop-up window for this job, so I think Javascript is best for that...
Any hints on how to start? Basically I need some hints on how to get something fro a page and give it as input to Javasript to do the rest of the job...

Anyango

6:42 am on Feb 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



although i wont say that using javascript would be wrong, i would say theres an easier way to do what you want.

<a href="salaryDetail.php?name=John" target="_blank">

that link will open the salary detail page in a new window.

maybe u wont like this, but just an idea.