jquery - copying session values to input fields -
I do not understand why the following code is not working I save some input values in sessions Next page In, I want users to copy these values into the input field. (Function:) {$ ("Input # CopyShipping"). Click (function () {(> "Input # CopyShopping"). (': Check') ) {// checked, copy values $ ("input # billingfastname"). Val ("& lt;% = $ (" input # billing: address 1 ") $ (" input # billing name "). Val ("& Lt;% = session (" shipping slang ")% $ (" input # billing address 1 ") Val (" & amp; lt;% = session ("shipment ADDRESS1")% & gt; ; "$" ("Input # Billing Address 2"). Val ("& lt;% = Session (" shipping ADDRESS2 ")%>"); $ ("(" ("& quot;% =" Session Val ("& lt;% = session (" shipping ")%> & gt;" $ ("Input # Billing County") Val (Valid.) Val ("GCTI")% ("Input # BillingState") "$ {" Input # BillingPostal Code "). Val (" & lt;% = Session ("Shipping" COUNTRY ")% & gt; Session (" shipping "COUNTRY") );} Other {// clear on uncheck $ ("Input # BillingFastname"). VaL (""); $ ("Input # BillingLlastName") Val (""). $ ("Input # BillingAddress1") Val (""). $ ("Input # BillingAddress2") Val (""). $ ("Input # BillingCity") Val (""). $ ("Input # BillingState") Val (""). $ ("Input # BillingCountry") Val (""). $ ("Input # BillingPostalCode") Val (""). }}); });
By looking at the source code it appears that the text box id attributes For example, $ ("input # billingfirstname")
, "#" indicates an ID, and there is not even one
$ ("input [name = 'billingfirstName'])
. I recommend adding an ID, it is a fast selector. < / Div>
Comments
Post a Comment