Results 1 to 3 of 3

Thread: [RESOLVED] Changing Link Parameters With ASP

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Resolved [RESOLVED] Changing Link Parameters With ASP

    Hi,

    I have a page in ASP and I need to change a link dynamically when the user enters info into a textbox. In otherwords, I want to have a textbox as used in a form on the page. And I have three links on the screen. Is there any way to add the text from the form to the links when the textbox is typed in? Its like I need to automatically assign the text to a variable to add in the link.

    Any ideas or impossible? I can't make it a form because I need three links with different pages they are pointed to. Otherwise I'll have to do an update first.

    Thanks!

  2. #2
    Hyperactive Member Coool's Avatar
    Join Date
    Feb 2006
    Location
    System.Coool
    Posts
    333

    Re: Changing Link Parameters With ASP

    What Exactly U want?

    onChange event of Textbox add hyperlink to the Page or Change current hyperlink?

    Both the things are easily done through client side scripting..

    If u want to add new links as per ur textbox then..

    Code:
    <div id="divLinks" runat="server">
    <a href="xyz1">Link1</a>
    <a href="xyz1">Link1</a>
    <a href="xyz1">Link1</a>
    </div>
    Code:
    function addNewLink(str)
    {
        document.getElementById("divLinks").innerHTML = document.getElementById("divLinks").innerHTML + "</br>" + str
    }
    if you want to change the link then refer it's id and set href value.
    I am using .NET 2010 with Windows 7

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Re: Changing Link Parameters With ASP

    Thanks for the info. The OnChange event would work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width