Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3049 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  javascript et php

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

javascript et php

n°1100251
e2prom
Posté le 28-05-2005 à 11:36:08  profilanswer
 

Salut,
Est ce qu'on peut récupérer une variable php dans un javascript qui est dans la même page?
 

mood
Publicité
Posté le 28-05-2005 à 11:36:08  profilanswer
 

n°1100263
masklinn
í dag viðrar vel til loftárása
Posté le 28-05-2005 à 11:54:54  profilanswer
 

Heuuu...
 
Ils ne se placent pas trop au même niveau hein, es tu sûr d'avoir bien compris comment fonctionnent PHP et Javascript?


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1100268
e2prom
Posté le 28-05-2005 à 12:09:16  profilanswer
 

Effectivement, entre serveur et client !
Le souci que j'ai c'est d'imprimer plusieurs pages (la même)avec juste un champ différent.

n°1100269
masklinn
í dag viðrar vel til loftárása
Posté le 28-05-2005 à 12:10:36  profilanswer
 

et alors?


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1100356
robbyone
Non pas !
Posté le 28-05-2005 à 15:11:20  profilanswer
 

Le php sert à générer la page : tu peux donc très bien générérer ta variable javascript avec la valeur de ton choix :

Code :
  1. var js_var = "<?php print $php_var; ?>";


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  javascript et php

 

Sujets relatifs
appeler une methode javascript d'une page principale depuis un popupEnvoyer un formulaire en javascript en post, c'est possible ?
[javascript]Définir variable[Javascript] Vignette agrandie dans une nouvelle fenêtre - bug
[Javascript]problème avec for[javascript/css] Pb bordures tableau dessinées sous IE
[RESOLU][Javascript] Mise en page compliquée :)Pb javascript, iframe et firefox
[Javascript] Modifier du texte en cliquant une checkbox[Javascript]remplacer document.all par document.getElementbyID
Plus de sujets relatifs à : javascript et php


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)