Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions How to pass value of a link to a textfield
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


dipanjan goswami
How to pass value of a link to a textfield
2 Answer(s)      4 years and a month ago
Posted in : JavaScript Questions


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.


Advertisement
View Answers

November 27, 2010 at 11:37 AM


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



November 27, 2010 at 11:38 AM


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



Related Tutorials/Questions & Answers:
How to pass value of a link to a textfield
How to pass value of a link to a textfield  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
how to set the value of textfield constant
how to set the value of textfield constant  how to set the value of textfield constant
Advertisements
How do you pass a variable by value?
How do you pass a variable by value?  How do you pass a variable by value
In Struts 2 how to pass the <s: property value=''
In Struts 2 how to pass the s: property value'  In Struts 2 how to pass the s: property value' I have page where i display the list of treasury... this data.jsp from that DB and display the same in a page. How do i send
PASS value
PASS value  javascript to pass value to other html file
How to pass value from dijit.Tree to dijit.MenuItem - Ajax
How to pass value from dijit.Tree to dijit.MenuItem  Hi Friends, I... with the menu. But I want to pass the value of an item to its menu item and when user will clik on that menu, the value should be shown like Delete Instead
How to pass the value from controller to jsp page ?
How to pass the value from controller to jsp page ?  HI I need to pass the value from controller to jsp. I use the way like this Controller request.setAttribute("msg", "Successfully Login"); In jsp ${msg} and then i
How to pass the value of Selected Value of combo box into sql ??
How to pass the value of Selected Value of combo box into sql ??  My SQL Database Name is MHS, user=root, password=admin,table name is sub_comb... submit i want to display other field. how to get it?? plz help me
get textfield value in javascript
get textfield value in javascript  How to get and the set value of text field in JavaScript?   Get the text field value in JavaScript <..."> <input type="button" value="Convert" onclick="convertText()">
how to value of one variable pass in other variable in revetse order
how to value of one variable pass in other variable in revetse order  Like variable a=367 b must have valuev763
you pass a variable by value.
you pass a variable by value.  How do you pass a variable by value... $a = &$b /*--------------Pass By value----------------*/ function add($a) { return ++$a; } add($a); /*---------------Pass by reference
objective c pass by value
objective c pass by value   How to pass value by reference...; //j now == 23, but this hasn't changed the value of i. } If you wanted to be able to modify i, you would have to pass the value of the reference by doing
pass by value /reference - Java Beginners
pass by value /reference  hello sir/mam, i know pass by value is a primitive type in java. what about pass by reference in java ? .. For object type pass by value is used or pass by reference is used ? pls give me a example
how to set size of button,textfield.
how to set size of button,textfield.  how we set size of button textfield etc and reduce problem when click maximize button the text or textfield get large how to set as a preferd size in the panel or frame .when we click
how to move pointer in Textfield to newline
how to move pointer in Textfield to newline  consider my case...; class Table1 extends Frame implements ActionListener{ TextField tf1,tf2,tf3...(100,10,200,30); Label l2=new Label("Enter the value to get its Table
How to Type in japanese in java Textfield?
How to Type in japanese in java Textfield?  Hello Sir/madam; Am... in textfield ..Please help me and tell me how to write in japanese... user.User needs to type in japanese in the textField.but I dont know how to type
please tell anybody how can i set a value in hiperlink for edit n delete link
please tell anybody how can i set a value in hiperlink for edit n delete...; <td><html:link href="viewServlet?user=">Edit</html:link> <html:link onclick="return confirmSubmit()" href="deleteServlet?tid
Java Pass Value Example
Java Pass Value Example       Pass value from JSP to JavaScript We can also pass the value from a JSP page to the java script as we have done in our
i want to pass Javascript value to JSP scriptlet..
i want to pass Javascript value to JSP scriptlet..  i am having... that i am calling the onchange function. In javascript i am getting the value now i want to pass this value to JSP scriptlet
how can u reduce the size of textfield?
how can u reduce the size of textfield?  how can u reduce the size of textfield? thanks in advance   import javax.swing.*; public class ReduceTextField extends JFrame { public static void main(String
how to pass the parameter in callable statement
how to pass the parameter in callable statement  calstat=conn.prepareCall("{call studentrc(?,?,?,?,?)}"); // it show error parameter value is null...=smark1,mark2=smark2,total=stotal where Regno=Regno; end;// how can i pass the parameter
How to pass javascript variable in Scriplet of JSP?
How to pass javascript variable in Scriplet of JSP?  How can I assign the value of a javascript variable to a variable declared in jsp scriplet? Is it possible
how to retrieve link - JSP-Servlet
how to retrieve link  how to retrieve link of a web page and use it as input in the program
how to create password reset link
how to create password reset link  how to create password reset link in jsp also which is expire specific time of period and also access on time that link
write a program to demonstrate call by value and call by reference.(pass objects as parameters)
write a program to demonstrate call by value and call by reference.(pass objects as parameters)  write a program to demonstrate call by value and call by reference.(pass objects as parameters
How to create Link in SWT
How to create Link in SWT       In this section, you will study how to create Link in a text. SWT allows to create link by using the class Link of package
How to pass multiple values from a servlet to JSP?
How to pass multiple values from a servlet to JSP?  hi, I want to pass multiple values form a servlet to JSP. Hw do i do that? I am able to send one value at a time without any prb, but I am unable to carry multiple (from two
How to add nofollow in website link?
How to add nofollow in website link?  Hi, I want to add nofollow in my outgoing links. What is the code? Thanks   Hi, Here is the code: <a rel="nofollow" href="http://">Click Here to visit</a>
Get JTextField value from another class
Get JTextField value from another class       In this section, you will learn how to get the textfield value from other class. For this, we have created two classes ClassA.java
TextField on the Image
TextField on the Image  how we set label or textfield etc. on the Image
how to enable textfield in j2me netbeans when a choice element is selected?
how to enable textfield in j2me netbeans when a choice element is selected?  How to enable a textfield in j2me using netbeans when a choice element is selected and how to keep it disabled when any choice element corresponding
Advertisements
 

 

 

DMCA.com