Hi,
I have to create a web phonebook in ajax and perl. When i enter the name Paul or Celine in a text field on my web page and click on a button to submit it, a perl script return an adress, a phone number and the email address that match the entered name.
I've got 2 problems:
1) The perl script also has to return an image that match with the name entered in the text field.
example: If i enter celine in the text field and click on submit, the info about celine will be displayed and her image has well.
I don't know how to do that...
2)
If the name entered does not exist in the perl file, an error message has to be displayed on the webpage.
Here's a part of my perl code:
$searchname = $query{"firstname"};
%addressdb = ('Alex' => '105 rue mentanna, vancouver, BC, Canada',
'Celine' => '95 rue clark toronto, ontario, Canada');
If you wrote the above code then the perl side of your question should be easy. Continuing in the same vane just add another hash that points to the URI of an image file. The javascript code I can't help with.
Bookmarks