|
Posted by John Hosking on 01/10/07 16:22
Ulrich Glumpf wrote:
> Hi,
> I have a database full of people with addresses but I don't have phone
> numbers for all of them.
> As I have the name and the address she could then look them up in the white
> pages but this is a drag as she has to copy and paste the data from my web
> page into the White Pages web page and then submit the form.
>
> I thought that I could copy (snip) the relevant HTML code from the white
> pages web page and paste it into my web page so she could click on my web
> page which would have the form already filled in. One forme per customer. In
> fact I did this a few years back and it worked quite well. Now it's working
> well bad as the White pages page has become quite fancy and is now full of
> javascript and flash and Vbs and I can't pin down the relevant snippets that
> I need to copy and paste for her to submit as a simple form.
>
> Here is the url of the white pages, "Pages Blanches" as they say here,
> http://www.pagesjaunes.fr/pb.cgi?
>
First of all, I am not sure I am comfortable about what you are trying
to do here. I get a little itchy when I put form code in a page that
submits to *somebody else's* server. You have to decide if this action
is appropriate for you, based on legal and ethical considerations.
But just for the technical challenge, I took a swing at it. I have
virtually no experience with forms, so I thought I'd try it, and maybe
learn something. So the next thing for you to consider before proceeding
is that in my inexperience, I may have left some hole in the code. I may
have omitted something important, or included something unnecessary, or
even harmful. But... it seems to "work". ;-)
Here it is:
<form action="http://www.pagesjaunes.fr/pb.cgi" target="w_content"
method="POST">
<table style="border:2px solid #3333FF; margin-top:1em;">
<tr>
<td><input type="hidden" name="faire" value="decode_input_image">
<input type="hidden" name="DEFAULT_ACTION" value="bf_inscriptions_req">
<input type="hidden" name="SESSION_ID" value="FG-D37DAD0-16F62">
<input type="hidden" name="VID" value="FG-D37DAD0-16F62">
<input type="hidden" name="INFO_VILLE" value="non">
<input type="hidden" name="CODE_LOC_INFO_VILLE" value="00000000">
<input type="hidden" name="IV_ACTIVATION" value="oui">
<input type="hidden" name="lang" value="FR">
<input type="hidden" name="pays" value="FR">
<input type="hidden" name="srv" value="PB">
<input type="hidden" name="TYPE_RECHERCHE" value="ZZZ">
<p Class ='Details'>Nom <input name="FRM_NOM"
size="32" value="Dupont">
Prenom <input name="FRM_PRENOM" size="32"
value="Jean"></p></td></tr>
<tr><td ><p Class ='Details'>Adresse <input name="FRM_ADRESSE"
size="32" value="25 r Broca">
Ville <input name="FRM_LOCALITE"
size="32" value="PARIS"></p></td></tr>
<tr><td ><p Class ='Details'>Dept <input
name="FRM_DEPARTEMENT" size="32" value="75">
<input
type='Submit' name="BF_INSCRIPTIONS_REQ" value='Rechercher'>
</td>
</tr>
</table>
</form>
It doesn't validate because of the target, but it should help you. I
don't know anything about your Details class so I didn't muck with
caption formatting or try to discard unnecessary <p> tags. You might
research the <label> element for yourself, too.
Bon chance !
--
John
Navigation:
[Reply to this message]
|