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

  FORUM HardWare.fr
  Programmation
  PHP

  php et javascript

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

php et javascript

n°1597109
raoul11
Posté le 08-08-2007 à 11:54:57  profilanswer
 

salut j ai un pro avec PHP et Javascript
lorsque j´ecris ceci  [echo '<script type="text/javascript">alert("donner un nom!" );</script>';] rien ne s´affiche.
merci d´avance

mood
Publicité
Posté le 08-08-2007 à 11:54:57  profilanswer
 

n°1597115
flo850
moi je
Posté le 08-08-2007 à 12:06:44  profilanswer
 

il n'y a arien dans le code source de ta page ou ca n'affiche pas l'alert ?

n°1597118
raoul11
Posté le 08-08-2007 à 12:16:45  profilanswer
 

cela n´affiche pas le contenu de alert

n°1597120
FlorentG
Unité de Masse
Posté le 08-08-2007 à 12:17:40  profilanswer
 

Comme dit, est-ce que le <script> est bien affiché dans le code source de la page HTML ? Donne plus de code, ou un lien vers la page

n°1597125
raoul11
Posté le 08-08-2007 à 12:26:24  profilanswer
 

ceci est ma fonction ou il ya mon script
function prufen($user,$betreff,$aufgabe,$empfanger){
      if(empty($user)){
       //echo "sender fehlt"'
       //echo '<script type="text/javascript">alert("donner un nom!" );</script>';
        echo "<script language=\"javascript\"> alert(\"incorrect password\" );</script>";
       }elseif (empty($betreff)){
       echo "Betreff fehlt";
       }elseif(empty($aufgabe)){
       echo "Aufgabe fehlt";
       }elseif(empty($empfanger)){
       echo"Empfänger fehlt";
       }else{
       $res=mysql_query("select name, aufgabe,empfanger,Priorität from zutun" );
      return  sort($res);
      }
      }

n°1597206
rufo
Pas me confondre avec Lycos!
Posté le 08-08-2007 à 14:47:05  profilanswer
 

ce qui nous intéresse, c'est le code source de la page html générée par php.

n°1597216
raoul11
Posté le 08-08-2007 à 15:00:03  profilanswer
 

<?php
//echo"<!DOCTYPE HTML PUBLIC '//W3C//DTD HTML 4.0 Transitional//EN'>";
 
echo"<html>";
echo"<head>";
echo"<title>Meinung</title>";
echo"</head>";
echo"<body bgcolor ='#FFFEE0' text ='#00001'>";
echo"<form method='POST' action= 'meinung.php' >";
echo"<table border=0><tr>";
echo"<td>Sender:</td>";
echo"<td><input  name='sender'size='60' ></td><td>";
echo"Empfanger";
echo":<input type='text' name='empfanger' size='60'></td>";
echo"<td>Priorität:<select name='Priorität' class='Auswahl' size='1'>
        <option value='Drigend'>Dringend</option>
        <option value='N.Drigend'>N.Drigend</option>
        <option value='zumachen'>zumachen</option>
      </select></td>
</tr>
<tr>
<td>Betreff:</td>
<td><input type='text' name='betreff' size='60' ></td>
</tr>
</table>  
 
<table border=0>
<td>Aufgabe:</td><td><textarea cols='100' rows='8' name='aufgabe'</textarea>
</td>
<input type=submit  value='senden'>
<input type=reset value='Löschen'></td>
</table>
</form>";
echo"</body>";
echo"</html>";
c´est ca mon code source

n°1597217
flo850
moi je
Posté le 08-08-2007 à 15:02:04  profilanswer
 

je pense pas que tu ai compris ce que'on te demandais
 
tu affiche ta page, tu fais clic droit -> afficher la source, et tu nous montre ce que tu obtiens
 

n°1597241
raoul11
Posté le 08-08-2007 à 15:21:02  profilanswer
 

<html><head><title>Meinung</title></head><body bgcolor ='#FFFEE0' text ='#00001'><form method='POST' action= 'meinung.php' ><table border=0><tr><td>Sender:</td><td><input  name='sender'size='60' ></td><td>Empfanger:<input type='text' name='empfanger' size='60'></td><td>Priorität:<select name='Priorität' class='Auswahl' size='1'>
        <option value='Drigend'>Dringend</option>
        <option value='N.Drigend'>N.Drigend</option>
        <option value='zumachen'>zumachen</option>
      </select></td>
</tr>
 
<tr>
<td>Betreff:</td>
<td><input type='text' name='betreff' size='60' ></td>
</tr>
</table>  
 
<table border=0>
<td>Aufgabe:</td><td><textarea cols='100' rows='8' name='aufgabe'</textarea>
</td>
<input type=submit  value='senden'>
<input type=reset value='Löschen'></td>
</table>
</form>vorn:      <br>nach:      <br><table width=100% border=0 cellpadding='2'cellspacing='2'><tr Bgcolor='FF9900'><th width='15 %' > <font size='3'>name</font> </th><th width='60 %' > <font size='3'>aufgabe</font> </th><th width='15 %' > <font size='3'>empfanger</font> </th><th width='15 %' > <font size='3'>Priorität</font> </th></tr></table><tr><table width=100% border=0 cellpadding='2'cellspacing='2'><tr bgcolor=#CCFFF>  <td width='60 %'> <font size='2'></font> </td> <th width= '15 %' > <font size='3'></font> </th> <th width= '15 %' > <font size='3'></font> </th></tr></table><table width=100% border=0 cellpadding='2'cellspacing='2'><tr bgcolor=#CCFFF>  <table width=100% border=0 cellpadding='2'cellspacing='2'><tr bgcolor=#CCFFF><th width= '15 %' > <font size='3'>rene</th> <td width='60 %'> <font size='2'>das ist die zweite aufgabe</font> </td> <th width= '15 %' > <font size='3'>Paul</font> </th> <th width= '15 %' > <font size='3'>Drigend</font> </th></tr></table></body></html>

n°1597244
flo850
moi je
Posté le 08-08-2007 à 15:23:10  profilanswer
 

tu es sur que $user est bien vide ?

mood
Publicité
Posté le 08-08-2007 à 15:23:10  profilanswer
 

n°1597251
rufo
Pas me confondre avec Lycos!
Posté le 08-08-2007 à 15:28:26  profilanswer
 

question bête : comment est obtenu le contenu de $user?


Message édité par rufo le 08-08-2007 à 15:28:34
n°1597255
raoul11
Posté le 08-08-2007 à 15:33:06  profilanswer
 

$user=$_POST["sender"] oui je dois encore changer certaines variables.la page n´affiche aucune erreur puisse que je l´ai fais avec echo et cela a fonctionner

n°1597295
raoul11
Posté le 08-08-2007 à 16:20:07  profilanswer
 

j´ai resolu le probleme  j´avais donner une autre variable á $user. je m´excuse et je vous remercie de votre aide car cela m´a aider á comprendre

n°1597314
flo850
moi je
Posté le 08-08-2007 à 16:41:28  profilanswer
 

tant mieux que tu ai trouvé la solution  :d


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  php et javascript

 

Sujets relatifs
phpund javascriptappel javascript impossible dans page appelée en ajax
[JSF] Manipulation du javascript d'une jsp depuis le bean managéjavascript et importation de variable
bug javascript sous IE mais pas sous Firefox et pas sous OPERA !variable en javascript
Utiliser un Framework Javascript ?Récupérer des couleurs d'une feuille de style CSS avec javascript
Intercation javascript et flash pour chargement d'image[Javascript] Boucle for [résolu]
Plus de sujets relatifs à : php et javascript


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR