Author | Post | |||
Erik |
Hi, Quote from moose: <a class="button" href="javascript:LoginClick()" title="Click here to log in after entering your username and password."><span>Login</span></a> You cold also make (usual): <input type="button" onClick="javascript:LoginClick()" title="Click here to log in after entering your username and password." value="Login" class="button"> And, the forum Tags (tbs): <div class="button1_up" onClick="FormAbort()" onMouseover="this.className='button1_hover';" onMouseout="this.className='button1_up';" title="Abort and return to the topic.">Abort</div> Could be (usual): input type="image" or <input type="button" class="button" onClick="FormAbort()" title="Abort and return to the topic." value="Abort"> Anyway, just yesterday I finished a new model you already mentioned: Quote: <a class="button" href="javascript:LoginClick()" title="Click here to log in after entering your username and password."><span>Login</span></a> From my point of view this is about one of the best ways possible (you could only argue about the additional span but I don't mind it). I decided to use these new buttons now like on home.php, forum_showforum.php and forum_showtopic.php.If you think I should not please tell me why. Quote from alt3rn4tiv3: lol. actually, there are loads of other design bugs. It's true that the buttons in the top right corner of some forum pages are above the topic/forum name. I'll think about let them float and this way make the name break to a new line when it is to long.for example, the buttons in the forum seem to be in divs which have a higher z-index than the text below it. another example is that the textarea in the forum posting page is a little too wide. third example is that the "unread forum posts" extends out of the page width with this topic there. I agree with the textarea in firefox, I will have a look at it. At the moment I'm still trying to get to long usernames in the active users list fixed. Cu, Erik |
|||
29.09.2007 15:46:13 |
|
|||
quangntenemy |
Erik, the bad thing about using an anchor for button is that you have to click on the thing instead of just pressing Enter. Maybe it can be fixed with javascript but still it isn't as good. |
|||
30.09.2007 03:24:10 |
|
|||
moose |
@quangntenemy: pressing enter works fine for me @erik: I don't think your method has any disadvantages. I just wanted to say that its exceptional. |
|||
Edited by moose on 30.09.2007 08:12:15 | ||||
30.09.2007 08:11:52 |
|
|||
quangntenemy |
Maybe in opera, but not ff. In ff you need an input type="submit" for it to work. |
|||
30.09.2007 08:29:52 |
|
|||
moose |
I have Windows, Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 and it definitly works |
|||
30.09.2007 08:42:13 |
|
|||
Erik |
Hi, I think the issue was to press the button with return while still having the text fields focused (for convenience). Of course this is possible with Javascript. Anyway, I found it works with a submit button. These get triggered with return even if another element is focused. Try it now on /home.php. Cu, Erik |
|||
30.09.2007 10:45:21 |
|
|||
quangntenemy |
OK works now But it's still submitting when the username or password is empty. Because it's the default action. Solution: function LoginClick() { if ((document.form_login.edit_username.value.length==0) || (document.form_login.edit_password.value.length==0)) { alert("Please enter your username and password."); return false; } else { document.form_login.action="login.php"; return true; } } . . . <input class="button" type="submit" onclick="return LoginClick()" title="Click here to log in after entering your username and password." value="Login" /> You might want to update the buttons for login.php too. |
|||
30.09.2007 13:05:46 |
|
|||
alt3rn4tiv3 |
Since you're making a number of updates, perhaps I should add in a suggestion - I'm sure you hash the passwords, presumably md5. It would be good to hash the password on the client before submitting the form. |
|||
30.09.2007 13:13:58 |
|
|||
moose |
@alternative: I just wanted to say that +: the user can be sure that his pw will not be submited in pt (so no evil bs admin can view our pw's) -: I think you have to check the input |
|||
30.09.2007 13:27:47 |
|
|||
alt3rn4tiv3 |
it's not just about the tbs admins. i'm sure they all have integrity anyway. prevents network sniffing (although given that there are only 6363 users as of now, the chance of them living in the same area and connecting to the exact same unencrypted network is pretty slim - having said that, i'm not sure how tor works actually) apart from that, i don't understand what you mean by your negative statement. |
|||
Edited by alt3rn4tiv3 on 30.09.2007 13:56:41 | ||||
30.09.2007 13:55:49 |
|