IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Zend Framework PHP Discussion :

Intègration jquery zend


Sujet :

Zend Framework PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre très actif
    Homme Profil pro
    developpeur
    Inscrit en
    Janvier 2012
    Messages
    111
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : developpeur
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Janvier 2012
    Messages : 111
    Par défaut Intègration jquery zend
    Bonjour j'aimerai intègrer jquery dans mon application mais à ma grande surprise ca marche pas voici mon code :


    layout:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    <?php
    $this->headMeta()->appendHttpEquiv('Content-Type','text/html;charset=utf-8');
    $this->headTitle()->setSeparator(' - ');
    $this->headTitle('Application de gestion de ventes');
    echo $this->doctype();
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <?php echo $this->headMeta(); ?>
    <?php echo $this->headTitle(); ?>
    <?php //echo $this->headLink()->prependStylesheet($this->baseUrl().'media/css/demo_table.css'); ?>
    <?php echo $this->headScript()->appendFile($this->baseUrl().'media/js/jquery.js')?>
    <?php echo $this->headScript()->appendFile($this->baseUrl().'media/js/jquery.dataTables.js')?>
    <?php //echo $this->headScript()->appendFile($this->baseUrl().'media/js/jquery.dataTables.js');?>
    </head>
    <body>
        <div id="content">
    	    <h1>
    		<?php  echo $this->escape($this->title);  ?>
    		</h1>
    		<?php  echo $this->layout()->content; ?>
    	</div>
    </body>

    vue:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
     
    <html>
    <head>
    <?php echo $this->headMeta() ?>
    <?php echo $this->headScript() ?> 
    <?php echo $this->headStyle() ?>
    <script>
    $(document).ready(function(){
      $("p").click(function(){
        $(this).hide();
      });
    });
     
    </script>
     
    </head>
    <?php
    $this->title = "Les produits";
    $this->headTitle($this->title);
    ?>
    <table id="datatables" class="display">
       <tr>
            <th>Nom produit</th>
    		<th>Detail</th>
    		<th>Prix</th>
       </tr>
       <?php  foreach($this->produits as $produits): ?>
       <tr>
            <td><?php echo $this->escape($produits->nomproduit); ?></td>
    		<td><?php echo $this->escape($produits->detailproduit); ?></td>
    		<td><?php echo $this->escape($produits->prixproduit); ?></td>
       </tr>
       <?php endforeach; ?>
    </table>
    <p>If you click on me, I will disappear.</p>
    <p>Click me away!</p>
    <p>Click me too!</p>
    </html>
    une personne pourrait il m'aider à resoudre celà

  2. #2
    Membre éclairé
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Juillet 2004
    Messages
    51
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique

    Informations forums :
    Inscription : Juillet 2004
    Messages : 51
    Par défaut
    Salut,

    la vue contient trop de code, il y a le layout qui gère dèjà tout ca.

    Vue :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
     
    <?php
    $this->title = "Les produits";
    $this->headTitle($this->title);
    ?>
    <table id="datatables" class="display">
       <tr>
            <th>Nom produit</th>
    		<th>Detail</th>
    		<th>Prix</th>
       </tr>
       <?php  foreach($this->produits as $produits): ?>
       <tr>
            <td><?php echo $this->escape($produits->nomproduit); ?></td>
    		<td><?php echo $this->escape($produits->detailproduit); ?></td>
    		<td><?php echo $this->escape($produits->prixproduit); ?></td>
       </tr>
       <?php endforeach; ?>
    </table>
    <p>If you click on me, I will disappear.</p>
    <p>Click me away!</p>
    <p>Click me too!</p>
    Ensuite affiche le code source de la page, voir si tout est conforme, et débug au niveau du javascript.

Discussions similaires

  1. TinyMCE et intégration jQuery
    Par laloune dans le forum jQuery
    Réponses: 1
    Dernier message: 21/05/2013, 20h35
  2. [1.x] intégration bibliothèque Zend Lucene dans le framework symfony
    Par souraya dans le forum Débuter
    Réponses: 0
    Dernier message: 27/05/2011, 16h28
  3. Réponses: 1
    Dernier message: 04/05/2011, 11h06
  4. Intégration Jquery d'un pop-in
    Par pyx3l dans le forum jQuery
    Réponses: 1
    Dernier message: 10/03/2011, 13h45
  5. creation d'un control avec intégration jquery
    Par infostars dans le forum ASP.NET
    Réponses: 3
    Dernier message: 09/04/2009, 14h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo