PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Oct 23, 2017 7:11 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Apr 17, 2017 12:43 pm 
Offline
Forum Contributor
User avatar

Joined: Mon Jul 26, 2010 1:30 pm
Posts: 174
Location: Florida
Hi Celauran,

I'm thinking you'll stumble on this and be able to help. This JS is not working on my localhost and wondering why. I've tried Chrome, Opera, and FF. No, I do not have javascript turned off in browsers.

REFERENCE: https://goo.gl/vELiXk
REFERENCE: http://jsfiddle.net/2VETF/3/

What I have:

Syntax: [ Download ] [ Hide ]
<!DOCTYPE HTML>

<html>

<head>

<title>Untitled</title>

<script>

$(function() {
    $(".inputs").keyup(function () {
        if (this.value.length == this.maxLength) {
          $(this).next('.inputs').focus();
        }
    });
});});

</script>

<style type="text/css">
<!--
input { width: 30px; margin: 5px;  }
-->
</style>

</head>

<body>
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
<input class="inputs" type="text" maxlength="4" />
</body>

</html>
 


Top
 Profile  
 
PostPosted: Mon Apr 17, 2017 1:34 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6391
Location: Montreal, Canada
Looks like it depends on jQuery, which I don't see loaded.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Sat Apr 22, 2017 12:22 pm 
Offline
Forum Contributor
User avatar

Joined: Mon Jul 26, 2010 1:30 pm
Posts: 174
Location: Florida
Hey Celauran,

Sorry for the late reply. I just found your reply in my spam box for some reason.

Ok, thank you for the insight. Gonna go look now and see what's what.

Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: benanamen, Bing [Bot], Google [Bot] and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group