Hey well i have this code to get the correct position: $(document).ready(function(){ var relativePosition = getRelativePosition("#Company_Name"); var Test = (relativePosition); } but now i want to pass these values into a hidden field so i can then pass the values to php how would i go about storing the test var value into a field.
What is "Tests". Is a variable with string in it ?! If you are literally want to put string "Tests" into an element with ID x then you should add quotes around "Tests" like this: $("#x").val("Tests"); Code (markup):