www.webdeveloper.com
Results 1 to 4 of 4

Thread: How to populate child window form field

  1. #1
    Join Date
    Dec 2009
    Location
    Fresno, CA
    Posts
    3

    Red face How to populate child window form field

    I am quite an amature web disigner by anyones standards here, I just do the one for my business. I'm making the changes to keep the email invisible from the spammers and many web visitors use web based email and I think I'm missing business from individuals that don't want the hassle with my old config. My question is probably simple for some of you but I've not been able to figure it out on my own so far.

    I have a list of parts for sale and I would like to have the user be able to click on the part number, open a form window which then allows them to fill in name, email and questions. I already have the parent page and the form window, I just need to figure out the code to populate the part info automatically for the user. Here is the code I currently have.

    Parent
    <a href="parts_inquiry.html" onclick="window.open(this.href, '_blank', 'width=625,height=450,left=275,top=100,resizable=no,status=no,toolbar=no,menubar=no,location=no'); return false;"><b>1969 fender part CV-1234</b></a>

    Form code

    <form action="http://www.centralvalleyclassics.com/cgi/FormMail.pl" method="post">
    <input type="hidden" name="recipient" value="admin@myemail.com.com" />
    <input type="hidden" name="subject" value="Parts Inquiry" />
    <input type="hidden" name="redirect" value="../thank_you6.html" />
    <input type="hidden" name="required" value="realname, email" />
    <input type="hidden" name="env_report" value="REMOTE_HOST, HTTP_USER_AGENT, REMOTE_USER, REMOTE_ADDR " />

    <div align="center"><table width="90%" border="0">
    <tr><td align="center"><p><font size="4"><b>Parts Inquiry</b></font></p>
    <p align="center"><font size="2" color="#FF0000">&quot;*&quot; Indicates required field.</font></p>
    <p><font>Fill out the form below to find out more about this this part.</font></p>
    </td></tr></table></div>

    <div align="center"><table width="50%" border="2" bgcolor="#99CCFF">
    <tr><td align="right" width="50%"><font color="#FF0000">*</font>Your Name : </td>
    <td align="left" width="50%"><input type="text" size="35" maxlength="256" name="realname" /></td></tr>
    <tr><td align="right" width="50%"><font color="#FF0000">*</font>Email Address : </td>
    <td align="left" width="50%"><input type="text" size="35" maxlength="256" name="email" /></td></tr>
    <tr><td align="right" width="50%">Phone Number : </td>
    <td align="left" width="50%"><input type="text" size="14" maxlength="256" name="Phone" /></td></tr>
    <tr><th colspan="2">Please type your question(s) in the space below:
    <textarea name="Question(s)" rows="5" cols="70"></textarea></th></tr></table></div><br />
    <div align="center"><table width="90%" border="0">
    <tr><td align="center">
    <input type="submit" value="Submit Form" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" value="Clear Form" />
    </td></tr></table></div></form>

    I know I need to somehow reference the part information as a variable on the parent page and it will have to direct it to fill in the subject field in the form page. I don't know if jave is the best way or if browsers block typicalle block it. Any assistance would be appreciated. JB

  2. #2
    Join Date
    Dec 2009
    Location
    Fresno, CA
    Posts
    3
    I hope my spelling isn't keeping anyone away, I was on the phone when I typed it up. I bet your all happy I don't text and drive. LOL

    Any help with this would be greatly appreciated. Happy Holidays!

  3. #3
    Join Date
    May 2008
    Posts
    3
    Carguy, create a file named parts_inquiry.html and copy your form code to the file.
    When you click on the link, a new window with your form will pop out.

  4. #4
    Join Date
    Dec 2009
    Location
    Fresno, CA
    Posts
    3
    Quote Originally Posted by enzhu View Post
    Carguy, create a file named parts_inquiry.html and copy your form code to the file.
    When you click on the link, a new window with your form will pop out.
    enzhu, I already am able to do what you described but I appreciate the input.

    I have quite a few parts on a single page and I currently have an email link on each one, I have noticed that many website visitors have web based email so they are left with copy and past of my email addy. I could just post it but my goal is to reduce my spam and make it simpler for my clients to inquire.

    The majority of the visitors to my site that are not computer saavy so I have focused on simplicity and easy to navigate, I've received many compliments in the past from my website visitors but complaints about the parts inquiries setup. I have put it off for a while but decided to completely overhaul the site for the new year, I wish it was something I was more proficient at because I would have tackled it sooner.

    What I was looking for was a way to have the client click on the part number or description and it send that data to populate the subject line of the current form in the new window. This would eliminate the need to have the client type the part information (or not) so I would know when I recieved the inquiry which part they were interested in.

    I don't know if java, xml or plain old html is the solution but I'm sure it can be done and looking for some guidance. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles