/    Sign up×
Community /Pin to ProfileBookmark

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.

[B]Parent[/B]
<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>

[B]Form code[/B]

<form action=”http://www.centralvalleyclassics.com/cgi/FormMail.pl” method=”post”>
<input type=”hidden” name=”recipient” value=”[email protected]” />
<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

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@CarguyauthorDec 24.2009 — 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!
Copy linkTweet thisAlerts:
@enzhuDec 25.2009 — 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.
Copy linkTweet thisAlerts:
@CarguyauthorDec 26.2009 — 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.[/QUOTE]


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.
×

Success!

Help @Carguy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...