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!

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.

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.

<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!

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.