javascript formdata.display into a link
So I use aweber for my email lists and I got some javascript code from them to pass the personalized options of the subscriber onto a webpage. The javascript looks like this.
<script type="text/javascript"> var formData = function() { var query_string = (location.search) ? ((location.search.indexOf('#') != -1) ? location.search.substring(1, location.search.indexOf('#')) : location.search.substring(1)) : ''; var elements = []; if(query_string) { var pairs = query_string.split("&"); for(i in pairs) { if (typeof pairs[i] == 'string') { var tmp = pairs[i].split("="); elements[unescape(tmp[0])] = unescape(tmp[1]); } } } return { display: function(key) { if(elements[key]) { document.write(elements[key]); } else { document.write("<!--If desired, replace everything between these quotes with a default in case there is no data in the query string.-->"); } } } }(); </script>
<input type="hidden" name="custom downloadurl" value="http://letsdownloadstuff.com" />
<input type="hidden" name="custom downloadurl" value="http://letsdownloaddogstuff.com" />
Then when they confirm their subscription they are taken to a page were they find their download link. I then ( according to aweber ) put the above javascript code in the <head> and this code were I want the custom field to appear
<script type="text/javascript">formData.display("custom downloadurl")</script>
http://letsdownloadstuff.com
So depending on the signup for they signup on the download url will change. Is this making sense?
The main deal is I want to know how to make the download url into a link that when they click on it, it takes them to the download url specific to whatever sign up form they signed up under. Cause right now it is just plain text in my firefox browser.
I am sure I'm going to have to clarify things but I appreciate any help you can give me.
by the way the urls given are just examples and are not my sites.
-
Mark Crawford -
Thanks
Signature-Create High Authority Websites and Rank for Super Competitive Keywords{{ DiscussionBoard.errors[5254817].message }} -