Click here to Skip to main content
15,908,264 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all

i am using javascript in two pages .The first for user login and save his data in cookie.
the second page i retrieve that data from the cookie but now i need to display that data.

Now i want to know how to display that data from the seperate javascript file and what the kind of html control should i use.

Any help


Thanks
Posted

1 solution

You can use just about any html element you'd like, span, div, input, whatever works for your design.

http://api.jquery.com/val/[^]
 
Share this answer
 
Comments
moon2011 11-Jan-12 14:58pm    
i tried
var x = $get("txt_username")
txt_username.value += "\n" + "test";

and not working
[no name] 11-Jan-12 15:44pm    
What is not working? You are not getting anything in x? The value is not being assigned? What? "not working" is completely useless.

Also, \n has no meaning in a web page, you need to use the proper element, br, for a line break.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900