creating a link from an input

liunx

Guest
is it possible?<br />
<br />
let me explain... <br />
<br />
I'm in the process of making a flash christmas card, where you can alter the from bit by adding your name to the url of the swf. eg..<br />
<br />
xmas.sf?t=Jon<br />
<br />
which all works fine.<br />
<br />
I can understand this and easily alter the links in an email i send - but the thing won't be as straight forward for most people.<br />
<br />
so what i was goign to do was have a link to a html page that people copy and paste the link from, generating the url in flash and passign it to the page in the address in the same way...<br />
<br />
send.html?from=Jon<br />
<br />
but i can't work out how to produce the link in the page. i've seen javascript soluntions that can display variables from the address bar on the page - but to generate the link?<br />
<br />
is it possible - or am i barking up the wrong tree?<br />
<br />
thanks for any help you coudl give us<!--content-->You'd be much better off using a server-side language to do this, as 13% of user do not have JavaScript enabled. But, here's one way to do it:<br />
<br />
<script type="text/javascript"><br />
name = window.location.search.substr(6); //get the name off the query string (page.htm?name=foo)<br />
document.write("<a href=http://www.webdeveloper.com/forum/archive/index.php/\"xmas.swf?t="+name+"\">link</a>");<br />
</script><!--content-->thanks for your help. you're right, i'd love to have done it in php (or even cf) - but the host i've got hasn't got any of that... <br />
<br />
and since it's work, it wasn't my choice...<br />
<br />
i'll try it..<!--content-->
 
Back
Top