Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
help me, how would i..?
Old 03-16-2004, 06:47 PM help me, how would i..?
Junior Talker

Posts: 1
Trades: 0
I have a form-mail script installed on my web site. Everytime someone subscribes to one of my mailing lists or everytime i get an order, I receive an e-mail. In that e-mail I get the values of the text inputs on my site. How would I code it so I can not only get the values but also the url of the page the user was referred from?

OR, How would I do this?
I usually see sites which are like
www.site.com/2984?
Theres usually a number and a question mark. I want somethign like that, but whenever an order or something is placed, I also want that number e-mailed to me.

Thanks in advance
Bobson is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-17-2004, 09:38 AM
Experienced Talker

Posts: 31
Location: Worchester, MA
Trades: 0
There are a few ways to do this, the very simplest of which would be to check the referrer on the form mail script and add it to the email output. However, I am going to assume that you would like to have a fairly easy client side solution - here you go:

In your <FORM> section, add a hidden form field like below:
<INPUT type="hidden" name="pageurl" value="">

Then, add the following script to the <HEAD> section of your page:
<SCRIPT language="javascript">
<!--
function SetVal()
{
document.getElementById("pageurl").value = document.URL;
}
window.onload = SetVal();
//-->
</SCRIPT>

This will set the hidden form field "pageurl" to the value of the current page URL, including the querystring at the end. When this form is sumbitted, the hidden form field is sent with the rest of the values.

Note that this script is compatible with IE AND NN.
__________________

Please login or register to view this content. Registration is FREE

Last edited by JoeGoldberg; 03-17-2004 at 09:40 AM..
JoeGoldberg is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to help me, how would i..?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17358 seconds with 12 queries