User input dynamically generated link

Discussion in 'Javascript' started by Braden.Bowers@gmail.com, Dec 12, 2006.

  1. Guest

    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
    , Dec 12, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gopal Krish
    Replies:
    2
    Views:
    3,048
    Gopal Krish
    Oct 8, 2004
  2. =?Utf-8?B?UmV6YSBOYWJp?=

    Load User Control Dynamically, Cast object dynamically

    =?Utf-8?B?UmV6YSBOYWJp?=, Mar 4, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    6,697
    Matt Berther
    Mar 5, 2005
  3. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    795
    Kevin Spencer
    May 17, 2005
  4. Graham Thomson
    Replies:
    3
    Views:
    442
    Eki Y. Baskoro
    Dec 18, 2003
  5. KathyB
    Replies:
    3
    Views:
    154
    KathyB
    Sep 12, 2003
Loading...

Share This Page