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

  • Home
  • SEARCH
  • 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 6319317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:47:08+00:00 2026-05-24T15:47:08+00:00

I was trying out the Play! framework tutorial’s post comment portion ,where jquery tools’

  • 0

I was trying out the Play! framework tutorial’s post comment portion ,where jquery tools' expose function is used to bring focus to the textfields .I am using jquery-1.5.2.min.js and jquery.tools-1.2.5.toolbox.expose.min.js

I tried the page in firefox and chrome.But ,the focus effect doesn’t happen.

when I used the chrome’s inspect element / Resources tab and checked the Scripts,I found these errors.

    Uncaught SyntaxError: Unexpected token < jquery.tools.1.2.5.toolbox.min.js:1
    Uncaught TypeError: Object [object Object] has no method 'expose'    postcomment:94
    (anonymous function)    postcomment:94
    d.extend._Deferred.f.resolveWithjquery-1.5.2.min.js:16
    d.d.extend.readyjquery-1.5.2.min.js:16
    d.c.addEventListener.yjquery-1.5.2.min.js:16

In the Scripts tab,only the jquery-1.5.2.min.js is shown, but not the jquery.tools-1.2.5.toolbox.expose.min.js file.

When mozilla firefox was used,the firebug cosole reports 2 errors

syntax error
[Break on this error] <!DOCTYPE html>\n  jquery.t...se.min.js (line 1)

$("form").expose is not a function
anonymous()postcomm...?postId=3 (line 97)

anonymous(Document postcomment?postId=3, [function()])jquery-1....2.min.js (line 16)

anonymous(Object name=a)jquery-1....2.min.js (line 16)

anonymous()jquery-1....2.min.js (line 16)

[Break on this error] $('form').expose({api: true, loadSpeed: 0}).load(); \npostcomm...?postId=3 (line 97

Copy Error gives

$("form").expose is not a function
http://localhost:9000/application/postcomment?postId=3
Line 97

here is the portion of main.html where .js files are added

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title>#{get 'title' /}</title>
        <meta charset="${_response_encoding}">
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/main.css'}">
        #{get 'moreStyles' /}
        <link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}">
        <script src="@{'/public/javascripts/jquery-1.5.2.min.js'}" ></script>
        <script src="@{'/public/javascripts/jquery.tools-1.2.5.toolbox.expose.min.js'}"></script>
        #{get 'moreScripts' /}
    </head>
    <body>
...

and the show.html where the expose function is called

#{extends 'main.html'/}
#{set title:post.title /}
...
<script type="text/javascript" charset="utf-8">
    $(function() {         
        // Expose the form 
        $('form').click(function() { 
            $('form').expose({api: true}).load(); 
        }); 

        // If there is an error, focus to form
        if($('form .error').size()) {
            $('form').expose({api: true, loadSpeed: 0}).load(); 
            $('form input[type=text]').get(0).focus();
        }
    });
</script>

Can someone help me correct this?

  • 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-05-24T15:47:08+00:00Added an answer on May 24, 2026 at 3:47 pm

    okay,finally found it..
    I got the jquery tools javascript file from the link in the tutorial which points to tutorial’s jquery tools link
    It is corrupted and contains a <!DOCTYPE html> element at the beginning..This causes error..It never occurred to me to look inside the javascript file until I read maenu’s reply..Thanks to him..

    The expose effect works when I used the .js file from flowplayer.org site

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

Sidebar

Related Questions

I'm trying to work out exactly what role the attributes play when used on
I'm trying to figure out the best way to play a tutorial video in
I'm tearing my hair out here trying to get a jquery validation to play
I'm trying to figure out the proper tools for managing dependencies between JARs. I
I am new to using the Play! framework and was following the tutorial on
every one. I'm trying to figure out how to play live stream using MPMoviePlayerController.
Hey everyone, I'm currently trying to figure out how to play back a tone
I am trying out Jquery Mobile DateBox. See here: mobile date box In the
I have been trying to figure out how to play a youtube video in
I'm trying to figure out how well ExtJS and Google Maps play together. I'm

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.