Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-04-2014, 08:34 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 23,565
IntoRain is on a distinguished road
Default

Thank you! When you get to it it will be lovely if you can share the results ^^ I will share mine if I can put it to work and fix these annoyances. Or maybe I can post what I already have and maybe we can fix it somehow when you have time?

I tried the onblur() thing, but it didn't seem to do anything xD I will investigate on how to use it. Makes sense to only avaliate the full word after clicking away or tabbing

(and thank you, I agree on that xD I will keep echo'ing then, I don't know how much javascript I will need - I will probably only have that stuff in the register page plus in another page, so there's really no need to include it everywhere I guess)

---------------------------------------------------------

So with tabbing, it seems to work perfectly. With anything else like clicking outside it keeps spazzing out: Without me doing anything it will keep reading the full word, then half the word, then just one letter lol xD
The current code is like this:

PHP Code:
$(document).ready(function(){
                var 
ready 0;                
                $(
'input#username').keydown(function(e){
                $(
'.div07').html('<i>Loading...</i>');    
                var 
key e.which;
                var 
username = $(this).val();
                if(
key == 9)
                {
                    $.
post('/register/checkusername', {username:username},function(result) {
                        if(
ready == 0){ if(result[0] != '0'){
                            $(
'.div07').html('<i>Username is empty or is already being used:</i>' username)}
                        else{
                        $(
'.div07').html('<i>Username can be used:</i>' username)}
                        }});                    
                }
                else{
                    $(
'input#username').focus(function(){
                    
//var username = $(this).val();
                    
});
                    $(
'input#username').focusout(function(){
                        
username = $(this).val();
                        $.
post('/register/checkusername', {username:username},function(result) {
                            if(
ready == 0){ if(result[0] != '0'){
                                $(
'.div07').html('<i>Username is empty or is already being used:</i>' username)}
                            else{
                            $(
'.div07').html('<i>Username can be used:</i>' username)}
                            }});    
                    });
                }
                });}) 
This seems to somewhat work (with the focus and tabbing you recommended!) Thank you!
__________________


asp.net stole my soul.

Last edited by IntoRain; 02-04-2014 at 02:32 PM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
jQuery - Spiffing up your page where you can't edit the HTML! Kyttias Tutorials and Tips 3 01-29-2014 07:09 PM
Jquery one weekend? Tony Other Chat 0 07-30-2011 07:34 PM
Javascript/Jquery not being run. [Answered] exactly33 Questions and Supports 5 12-23-2009 12:39 PM


All times are GMT -5. The time now is 01:28 PM.

Currently Active Users: 4981 (0 members and 4981 guests)
Threads: 4,082, Posts: 32,047, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636