Auto fill-in a field on the contact form

Reply

Join Date: Jun 2004
Posts: 247
Reputation: cmills83 is an unknown quantity at this point 
Solved Threads: 1
cmills83 cmills83 is offline Offline
Posting Whiz in Training

Auto fill-in a field on the contact form

 
0
  #1
Apr 15th, 2007
Hello:

I am currently developing DomainPhenom dot com, anyways, when you click the inquire button on the websites for sale page I want it to redirect the user to the contact form but fill in the "domain/website" field automatically on the contact form depending on what site or domain they are inquiring about. How would this be done?

Thanks!
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,038
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Auto fill-in a field on the contact form

 
0
  #2
Apr 15th, 2007
You could fill in the text field with JavaScript only if it was hard-coded somewhere what to fill it in as. If you want to pass external variables into the page, you would need to use a server-side language such as PHP.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 247
Reputation: cmills83 is an unknown quantity at this point 
Solved Threads: 1
cmills83 cmills83 is offline Offline
Posting Whiz in Training

Re: Auto fill-in a field on the contact form

 
0
  #3
Apr 15th, 2007
Yeah for now I am just going to have everything hard coded so I can have a specific variable attached to each domain or website link. How would I set that up? Thanks again.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 247
Reputation: cmills83 is an unknown quantity at this point 
Solved Threads: 1
cmills83 cmills83 is offline Offline
Posting Whiz in Training

Re: Auto fill-in a field on the contact form

 
0
  #4
Apr 16th, 2007
HTML and CSS Syntax (Toggle Plain Text)
  1. <a href="contact-us.html" onclick="var w=window.open(this.href,'domain','chrome'); formfill(w.document.getElementById('domain'), 'domain.com'); return false;">domain.com</a>

Alright I got it but it opens in a new window, I just want it to go to the page, how can I edit this to work? Thanks!
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 2
Reputation: kidslimmer is an unknown quantity at this point 
Solved Threads: 0
kidslimmer kidslimmer is offline Offline
Newbie Poster

Re: Auto fill-in a field on the contact form

 
0
  #5
Apr 16th, 2007
Try using javascript to set a cookie with the domain information on the first page. Then, on the page with the form, you can read it out and use the domain info from it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC