User input dynamically generated link

B

Braden.Bowers

I'm trying to create a dynamically generated link on my website that
takes user input from a text field to generate the link.

< HTML FILE >

<input id="tbxStuff" name=\"tbxStuff\" type="text" value="">
<a id="lnkSubmit" target="_blank" href="" onclick="myFunction(this);
return false;"> GO </a>

< JAVASCRIPT FILE >

function myFunction(this)
{
this.location.setAttribute('href') = "MyNewLink" +
frmPrimary.tbxStuff.value;
}

I've tried several other variations of this but nothing I've found is
working yet this was my latest attempt. I apprecate any help with this
problem.


Thanks
Braden Bowers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top