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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:43:32+00:00 2026-05-13T16:43:32+00:00

I’m struggling to build a simple zend framework application that can call jQuery. So,

  • 0

I’m struggling to build a simple zend framework application that can call jQuery.
So, what I’m working under Zend Studio 7.1.1 where I added, in the library folder, the “ZendX” folder.
And, I also downloaded the jQuery lightness theme that was added to the “js” public folder.

You’ll find the whole structure is like that:
http://www.freeimagehosting.net/image.php?b95bca6dab.png
So what I did is:
1- Added the following lines into the Bootstrap.php file so that I obtained the following content:

<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{


}
Zend_Loader::registerAutoload();
$view= new Zend_View();
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
$view->jQuery()->addStylesheet('/js/jquery/css/ui-lightness/jquery-ui-1.7.2.custom.css')
        ->setLocalPath('/js/jquery/js/jquery-1.3.2.min.js')
        ->setUiLocalPath('/js/jquery/js/jquery-ui-1.7.2.custom.min.js');

Then, as I don’t use the layouts, I directly added the datepicker in the index.phtml file with the $view->jQuery() and $view->jQuery() even if when I type $view-> the Zend Studio intellisense system doesn’t propose the jQuery() function.
Anyway, the index.phtml file is:

<style>
    a:link,
    a:visited
    {
        color: #0398CA;
    }

    span#zf-name
    {
        color: #91BE3F;
    }

    div#welcome
    {
        color: #FFFFFF;
        background-image: url(http://framework.zend.com/images/bkg_header.jpg);
        width:  600px;
        height: 400px;
        border: 2px solid #444444;
        overflow: hidden;
        text-align: center;
    }

    div#more-information
    {
        background-image: url(http://framework.zend.com/images/bkg_body-bottom.gif);
        height: 100%;
    }
</style>
<div id="welcome">
    <h1>Welcome to the <span id="zf-name">Zend Framework!</span></h1>

    <h3>This is your project's main page</h3>

<?php echo $this->headScript(); ?>
<?php echo $this->jQuery()->uiEnable();?>
<?php echo $this->jQuery(); ?>
<form id='ok'>
Pick your Date: <?php echo $this->datePicker('dp1', '', array('defaultDate' => date('Y/m/d', time()))); ?>
</form>
    <div id="more-information">
        <p><img src="http://framework.zend.com/images/PoweredBy_ZF_4LightBG.png" /></p>
        <p>
            Helpful Links: <br />
            <a href="http://framework.zend.com/">Zend Framework Website</a> |
            <a href="http://framework.zend.com/manual/en/">Zend Framework Manual</a>
        </p>
    </div>
</div>

But nothing works!

I get the following output:

ttp://www.freeimagehosting.net/uploads/7ed0166140.png

As you can see, the datepicker input text is here, but on click, it shows nothing.

And for the source page (index.phtml):

<style> 
    a:link,
    a:visited
    {
        color: #0398CA;
    }

    span#zf-name
    {
        color: #91BE3F;
    }

    div#welcome
    {
        color: #FFFFFF;
        background-image: url(http://framework.zend.com/images/bkg_header.jpg);
        width:  600px;
        height: 400px;
        border: 2px solid #444444;
        overflow: hidden;
        text-align: center;
    }

    div#more-information
    {
        background-image: url(http://framework.zend.com/images/bkg_body-bottom.gif);
        height: 100%;
    }
</style> 
<div id="welcome"> 
    <h1>Welcome to the <span id="zf-name">Zend Framework!</span></h1> 

    <h3>This is your project's main page</h3> 


<link rel="stylesheet" href="../public/js/jquery/css/ui-lightness/jquery-ui-1.7.2.custom.css" type="text/css" media="screen"> 

<script type="text/javascript" src="../public/js/jquery/js/jquery-1.3.2.min.js"></script> 
<script type="text/javascript" src="../public/js/jquery/js/jquery-ui-1.7.2.custom.min.js"></script> 

<form id='ok'> 
Pick your Date: <input type="text" name="dp1" id="dp1" value=""></form> 
    <div id="more-information"> 
        <p><img src="http://framework.zend.com/images/PoweredBy_ZF_4LightBG.png" /></p> 
        <p> 
            Helpful Links: <br /> 
            <a href="http://framework.zend.com/">Zend Framework Website</a> |
            <a href="http://framework.zend.com/manual/en/">Zend Framework Manual</a> 
        </p> 
    </div> 
</div>

I really tried many combinaisons, but no way to figure out it!
If also tried to find a video showing exactly, step by step, how to integrate jQuery in Zend.

What’s wrong in the code?

If you can help me, I would really appreciate that!

Thanks very much,

regards.

  • 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-13T16:43:32+00:00Added an answer on May 13, 2026 at 4:43 pm

    <?php $this->jQuery->enable;?> should be enable() and reside in the controller/bootstrap.


    If you’d like to add jQuery to all pages, I would change

    $view->jQuery()->addStylesheet('/js/jquery/css/ui-lightness/jquery-ui-1.7.2.custom.css')
        ->setLocalPath('/js/jquery/js/jquery-1.3.2.min.js')
        ->setUiLocalPath('/js/jquery/js/jquery-ui-1.7.2.custom.min.js');
    

    to

    $view->jQuery()->addStylesheet('/js/jquery/css/ui-lightness/jquery-ui-1.7.2.custom.css')
        ->setLocalPath('/js/jquery/js/jquery-1.3.2.min.js')
        ->setUiLocalPath('/js/jquery/js/jquery-ui-1.7.2.custom.min.js')
        ->enable()
        ->enableUi();
    

    , otherwise you don’t need to enable it at all, since calling a helper like datePicker() automatically inclues jQuery and jQuery UI on your page.

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

Sidebar

Ask A Question

Stats

  • Questions 357k
  • Answers 357k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The other answers are correct. Here is some code you… May 14, 2026 at 9:40 am
  • Editorial Team
    Editorial Team added an answer you ruin the noConflict concept by reassigning the jquery to… May 14, 2026 at 9:40 am
  • Editorial Team
    Editorial Team added an answer If you get that particular error, you don't actually have… May 14, 2026 at 9:40 am

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.