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 6223967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:35:04+00:00 2026-05-24T08:35:04+00:00

I am trying to get CakePHP working with JQuery. Below is the div that

  • 0

I am trying to get CakePHP working with JQuery.
Below is the div that I have in place, and all I am trying to do is simply alert(“CLICKED!”); whenever the below link is clicked.

<?php echo $this->Html->link('Link Click Me', '#', array('onclick'=>'return false;', 'id'=>'divId', 'class'=>'divClass')); ?>

I have the following files ‘jquery-1.5.2.js’ and ‘js_file.js’ in the ‘js’ directory of the ‘webroot’ folder in my project, and JQuery is working, but I cant seem to get this particular functionality working.

Any suggestions??

Code for jquery:

$(document).ready(function(){

    $('.divClass').click( function(){
        alert("TESTING!");
    });

});

And this is the view:

<?php echo $this->Html->link('Link Click Me', '#', array(  'id'=>'divId', 'class'=>'divClass')); ?>

I am still looking for an answer to this question guys….

  • 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-24T08:35:06+00:00Added an answer on May 24, 2026 at 8:35 am

    Post your jQuery code for the alert.

    You may need to use bind() instead of click().

    Remove onclick=”return false;” from the link and add return false; to the end of the jQuery click function.

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

Sidebar

Related Questions

Trying to get comfortable with jQuery and I have encountered some sample code that
I'm trying to get authentication working to my liking in a CakePHP app and
I have a CakePHP application where I am trying to get a count of
I'm trying to get started with Django, and have previously worked with CakePHP, and
I've got a cakephp app that I'm trying to get to serve up the
I'm trying out CakePHP now and I can't get my app working because CakePHP
I'm trying to get a CakePHP application to work. For this, I've set up
Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
I am using cakephp. I am trying get data from facebook using file_get_contents. I
I am using cakephp. I am trying to use httpsocket to get information. <?php

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.