/    Sign up×
Community /Pin to ProfileBookmark

mlm linking

I’m looking for a java script that will allow me to send a link in a e-mail that when the link is clicked on, the link can get say the users id number out of the link.

I need help!!!

Danny

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Jan 18.2003 — The code sgment below should take care of that for you
<i>
</i>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;

&lt;head&gt;
&lt;title&gt;Untitled&lt;/title&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;title&gt;MAIL TO FORM!&lt;/title&gt;
&lt;script&gt;
function emailVariableValue(){
var frm = document.forms;
var subject = "This email is being sent using a function by variables"
var body = document.getElementsByTagName('a')[0].href;
frm[0].action = "MAILTO:[email protected]?subject="+subject+"&amp;body="+body+";";
return true;
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body bgcolor="a1c3a1"&gt;

&lt;form name="comments" method="POST" onsubmit="return emailVariableValue();" enctype="text/plain"&gt;
Thanks for taking some time to send me your views
&lt;a href="www.cnn.com"&gt;CNN&lt;/a&gt;
&lt;input type="Submit" value="Submit"&gt; &lt;input type="RESET"&gt;&lt;/p&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@DannyauthorJan 18.2003 — Tried the code but doesn't get the results that I need.

There has to be a way that when a person is sent an e-mail with a link in the e-mail say

http://www.ltw.net/free.html?id=777


When you click on the link how can I get the page free.html to get the id number 777?

Thanks

Danny
Copy linkTweet thisAlerts:
@DannyauthorJan 18.2003 — Tried the code but doesn't get the results that I need.

There has to be a way that when a person is sent an e-mail with a link in the e-mail say

http://www.ltw.net/free.html?id=777


When you click on the link how can I get the page free.html to get the id number 777?

Thanks

Danny
Copy linkTweet thisAlerts:
@pyroJan 18.2003 — If I'm understanding you correctly, you want to parse the link to get the 777, correct? If so you can use split to split the location at the ? and then, resplit to split at the =. End result, 777. If this is what you are looking for, I can explain how to do this.
Copy linkTweet thisAlerts:
@DannyauthorJan 18.2003 — This is exactly what I'm looking for.
Copy linkTweet thisAlerts:
@pyroJan 18.2003 — This will return 777 (or anything after the =) into the finallocation variable. Right now, I just alert it, so you can see that it works. If you have any questions, let me know.

&lt;script type="text/javascript"&gt;
var location = document.location.href;
var sublocation = location.split("?");
var newsublocation = sublocation[1].split("=");
var finallocation = newsublocation[1];
alert (finallocation);
&lt;/script&gt;
Copy linkTweet thisAlerts:
@DannyauthorJan 18.2003 — This is great. Thanks? ?
Copy linkTweet thisAlerts:
@pyroJan 18.2003 — Certainly ?
×

Success!

Help @Danny 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.21,
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,
)...