[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!
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.
Re: Changing Link Parameters With ASP
Thanks for the info. The OnChange event would work.