
Dear Sir, in my project I'm initially making a value of the textfield as a link. Now, I want to pass the value of the link in the textfield after clicking the link and dont want to open a new page. Please reply ASAP.

hi Friend,
Try the following code:
<html>
<script>
function fun(s) {
document.getElementById("msg").value=s;
}
</script>
<a href="#" class="leftlinks" onclick="fun('Hello')" id="ide" >CLICK HERE</a>
<input type="text" id="msg" >
</html>
Thanks

hi Friend,
Try the following code:
<html>
<script>
function fun(s) {
document.getElementById("msg").value=s;
}
</script>
<a href="#" class="leftlinks" onclick="fun('Hello')" id="ide" >CLICK HERE</a>
<input type="text" id="msg" >
</html>
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.