I have a simple input html field. The value of this input field should be used in a jquery function later on. How can I accomplish this? I think I have to either pass it directly to the function or store it - at least - temporary. Is there a way other than have it passed to my mySQL database and retrieve it?
Here's what I tried:
html:
Firstname: <input type="text" id="firstname" name="firstname">
js:
var probe1 = $('#firstname').val();
... and then I thought about using the variable probe1 in my js script - Does not work.
The script I want to use the variable in is in another script tag.