PDA

View Full Version : text-field problem !


jero
10-10-2011, 01:02 PM
Hi i am facing a problem regarding the username and password text-field you can see the problem in the following youtube video i made.

problem is when i click the password text-field the username text gets selected instead of the password text.
plus how can i achieve 1 click text selection like when i click in username field the whole username gets selected so there is no need to select the text manually holding the left mouse button and hover on the USERNAME text .

here is the video link
http://www.youtube.com/watch?v=4z9w6a5DpaE

and here is the code

<form id="form1" name="form1" method="post" action="">
<label>
<span> <input name="q" type="text" class="keywords" id="textfield" value="Username" maxlength="50" autocomplete="off"/>
</span>
<span> <input name="q" type="password" class="keywords" id="textfield" maxlength="50" value="Password" autocomplete="off"/></span>
<input name="b" type="image" class="button" src="images/loginbutton.png"/>
</label>
</form>
</div>


lookin forward for a solution thank you for your time :)

peace

Rob_Che
10-10-2011, 01:16 PM
Your inputs both have the same name - try changing the name of one so it's unique.

Other than that it could be javascript, is this within your own site or software? (Wordpress / Drupal etc)

jero
10-10-2011, 01:21 PM
i have tired changing the names but that does not solve the problem i have changed the theme earlier there was one text field with only search text field i have removed that and put in these two fields !

Rob_Che
10-10-2011, 01:25 PM
So it is in software. What software?

It will be something in the theme you're modifying. Have you you copied this code from another form? it seems odd that the inputs have the same name and class. "keywords" is an odd class for a username and password isn't it?

jero
10-10-2011, 01:28 PM
its was developed by some other guy i am just modifying it for my needs and i am new to dreamweaver so if you have some spare time plz let me know how can i fix that .

jero
10-10-2011, 01:30 PM
here is the css for keywords

/* search */
.search {
padding:8px 5px 0 0;

margin:0;
width:500px;
float:right;
}
.search form {
padding-left: 120px; /* change it to move */
position: relative;
display:block;


}
.search span {
display:block;
float:left;
background: url(images/search_bg.gif) left top no-repeat;
width:132px;
padding:0 5px;
height:27px;
}
.search form .keywords {
font:normal 12px Arial, Helvetica, sans-serif;
color:#58949e;
line-height:15px;
height:15px;
float:left;
background:none;
border:0;
width:130px;
padding:6px 0;
margin:0;
}
.search form .keywords:hover{
color: white;
}