Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-08-2008, 11:38 AM   #1
clickhappy
Confirmed User
 
Industry Role:
Join Date: Mar 2004
Posts: 4,027
2 quick programming questions

I have a site with a login form. Its just a user name and password to log in.

1. How do I set the focus of the cursor on the username?
So when the page loads the cursor goes right in the username text box?

2. How do I have the form pre filled with the members username and password from last time?
So when they come to my site the curser is in the box, the username and password are already intered, and all they need to do is hit "enter" and they log in?

Do I need a cookie? I have no idea how to make a cookie.

Last edited by clickhappy; 09-08-2008 at 11:42 AM..
clickhappy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-08-2008, 11:41 AM   #2
mrkris
Confirmed User
 
Join Date: May 2005
Posts: 2,737
1. Javascript: document.formname.fieldname.focus();
2. Leave this to the browser with the "remember username/password" support.
__________________

PHP-MySQL-Rails | ICQ: 342500546
mrkris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-08-2008, 11:42 AM   #3
clickhappy
Confirmed User
 
Industry Role:
Join Date: Mar 2004
Posts: 4,027
Quote:
Originally Posted by mrkris View Post
1. Javascript: document.formname.fieldname.focus();
2. Leave this to the browser with the "remember username/password" support.
Ill try that now, thanks very much
clickhappy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-08-2008, 01:07 PM   #4
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
Quote:
Originally Posted by clickhappy View Post
Do I need a cookie? I have no idea how to make a cookie.
Ingredients

• 3/4 cup sugar
• 3/4 cup packed brown sugar
• 1 cup butter
• 1 large egg
• 2 1/4 cups all-purpose flour
• 1 teaspoon baking soda
• 1/2 teaspoon salt
• 2 cups semisweet chocolate chips
• if desired, 1 cup chopped pecans

Directions

Preheat oven to 375 degrees. Mix sugar, brown sugar, butter and egg in a large bowl by hand. Stir in flour, baking soda, and salt. The dough will be very stiff. Stir in chocolate chips. Drop dough by rounded tablespoonfuls 2 inches apart onto ungreased cookie sheet. Bake 8 to 10 minutes or until light brown. The centers will be soft. Let cool for one minute then remove from cookie sheet and place on wire rack to finish cooling.

---------
OR
---------
http://www.php.net/setcookie
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.