Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referring site redirection

Status
Not open for further replies.
Jan 21, 2005
46
US
Hi, our company has an official website with contact us page which has a form to inquire about the product (we don't have online transaction available for other specific reasons.) Our company has 50 dealers to sell our prouducts, and they have their own websites designated to our products. They conduct their own marketing efforts for their website.

What we want to implement is this:
When users visit "their" website and press a link to "Product" page, they will be directed to our main site's product page. They could surf our website for more detailed information about the product. This is easy, I know. The question is the following. After they surf our main site and decided to contact us by sending an inquiry form, their information should be sent to the original dealer. This is basically what we want, but adding to this, it would be better if we can track the information they send using a database, but this might not be needed immediately.

What I can think of now is that I could use a javascript and send information to a specific dealer's site. But could you please suggest me a better way to handle this requirement? Thanks in advance.
 
You'll need to use server side script if you want to put data into database.

You'll need to use server side script if you want to really process anything submitted on a form.

You could design it in such a way as to only use client-side script but you would need to be able to demand that all of your dealers use server-side technologies when you yourself are not using them.

It would be bass ackwards but you could make a form in plain HTML with an OnSubmit event written in JavaScript that changes the form action property based on some value in your form... most likely a dropdown list for closest dealer. In effect you would end up with
<form method="post" action="
 
Thanks for your reply. At the moment, we don't need to put data into database though we might need to do so in the future. If I can successfully redirect the visitor to the original site/or send the information to a designated email address when they submit a form, that could be it. In the mean time, if the visitor hasn't come from one of our dealers' sites, I want the information sent to our internal sales staff. I can modify javascript and have fair knowledge about HTML. Would this be possible?
 
You could use a mailto link which will cause user's mail program to open a new message addressed to your sales department. Unfortunately the mailto will not actually allow you to put anything into the body of the message and it doesn't guarantee that the user will actually bother to write you a letter and send it. When I accidently click on one of these I always feel a little put-off and just close the mail window.

Since this is an internet site rather than an internal network intranet, you have no idea what email client your visitors will be using. Because of this you can't really automate the email process in such a way to force them to send a message.

The way that this is typically done is that your HTML form will submit to a server page and server-side script will use the submitted form data to create an email. The server side script could be ASP, PHP, perl/cgi, or whatever.

In order to redirect to the original site you'll need some way of knowing WHERE they came from. One way to accomplish this would be if every one of your dealers uses a slightly different link to reach your page... that way you could examine the URL with JavaScript and know where they came from and, therefore, where you will be sending them on the return trip.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top