I am stuck in a problem.
I need to change email in text box , as soon as the email is changed the href which exist to that email address in the screen should also change.
I have called a java script but it only change the reference but not the text dispalyed along. For example when email entered is changed to
abc@qq.com from
xyz@qq.com then link text should also change .
But in my code although actual reference is getting changed but text dispalying email is not getting changed.
Please provide me solution
Below is the code:
java script
function changeLink()
{
var qwerty ='priyanka.kakkar@ps.net';
document.getElementById("myAnchor").href=qwerty;
}
java script ends
JSP
//form tag
form method="get"
//input tag
input type="text" id="id" name="username" size="25" onblor="changeLink()"
//anchor tag
a id="myAnchor" href="mailto:priyanka.kakkar@gmail.com"
priyanka.kakkar@gmai.com Thankz
Priyanka