Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8833133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:42:25+00:00 2026-06-14T08:42:25+00:00

I have some simple javascript code that I have tested in JS Fiddle which

  • 0

I have some simple javascript code that I have tested in JS Fiddle which works fine there, but when using in my dust.js template, i keep getting “unexpected token ILLEGAL” but it doesnt tell me which token is illegal. I’ve checked for extra characters already.

 $(document).ready(function() {
  $('.edit').keydown(function(e) {
      if(e.which == 13) {
        $(this).blur().next().focus();
       return false;
  }

  });
})​

Here is the jsFiddle link: http://jsfiddle.net/sxvX8/1/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:42:27+00:00Added an answer on June 14, 2026 at 8:42 am

    There’s an extra character at the end, see below:

    $(document).ready(function() {
        $('.edit').keydown(function(e) {
            if(e.which == 13) {
                $(this).blur().next().focus();
               return false;
            }    
        });
    })? // <--- EXTRA CHARACTER
    

    Remove it and that error should go away.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some JavaScript, which is generated by PHP code, using a template. The
I have some very simple javascript code that looks like this: var newWindow =
I have some simple javascript code that looks like this: var divLink = $(this).attr(href);
I have some jQuery/JavaScript code that I want to run only when there is
I have simple HTML code with some JavaScript. It looks like: <html> <head> <script
I have some simple javascript that I'd like to run when a button is
I have some simple javascript that as far as i can tell should work
We have some code that must access low level windows XP os calls which
I have written some JavaScript code that will read from the Google Maps API
I have some Javascript code that needs to be dynamically created as a String

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.