faure
-
Posts
20 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by faure
-
-
thanks you
problem resolved
-
thanks you
problem resolved
-
In javascript there is an instructionx.add(option);I look for then same in phpdo you know ?In advance thanks
-
DSONSUK WROTE :
Why? php in JavaScript gives impression you want to produce JavaScript code within script tags, why not produce JavaScript code directly. you can only send value of abc to php by using JavaScript to reload the page with ?abc=REF1 querystring if php code is internal, or send to a external php file with same querystring. check out AJAX tutorials.
can you give me an exemple in ajax to send the value of a element html and retrieve it in a variable like $x=
is my question well formuled ?
how reload the page in middle of script ? strange !
-
Hello (bonjour from PARIS)
<script>
I have a function with
var abc="REF1";
I have here a <?php
I need the value of abc here
what is the solution ? (an exemple if possible)
?>
</script>
-
spirit of my code :
<html>
here a button on click for scripthere an element <p with id="demodemo"
<script type="text/javascript">
function myFunction()
{
var abc= "REF1";document.getElementById('demodemo').innerHTML = abc;
?php
here I need abc
how ?
is there 2 methods ?thanks for your help
?>
}</script>
</html>
-
hello (dsoneduk)
the solution (simple) is :
document.getElementById('two01').value=x;
problem resolved
faure
-
thanks you in advance
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<title>bz881</title><style>
</style>
<script type="text/javascript">
</script>
</head>
<body>
<table>
<tr>
<td> <input type= "text" id = 'two01' value= 'xxxxxxx' > </td></table>
<script type="text/javascript">
function mymyFunction()
{
var x = document.getElementById('mymySelect').value;
<!-- here ok-->
document.getElementById('demodemo').innerHTML = x;<!-- here not working -->
document.getElementById('two01').innerHTML = x;
}
</script>
<select id='mymySelect' onchange="mymyFunction()">
<option value="Audi">Audi
<option value="BMW">BMW
<option value="Mercedes">Mercedes
<option value="Volvo">Volvo
</select><p id="demodemo">????</p>
</body></html>
-
<body><script type="text/javascript">
function Lien() {
var x = document.getElementById('liste' );
<!--here !!-->
<!--how put the choice into demo ?????????????-->
}
</script>
<div id="myDIV" style="position absolute; left:10px;top:10px;width:50px;visibility:visible;"><FORM NAME="Choix">
<SELECT id='liste' NAME="aliste" onChange="Lien()">
<!-- liste here ???-->
<OPTION VALUE="">Choisir une option
<OPTION VALUE="../../copains.html">Les copains
<OPTION VALUE="../../plongee/index.html">La plongée
</SELECT>
</FORM></div>
<p id= 'demo'' </p>
-
<?php
session_start();
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<title>bz888</title>
<style></style>
</head>
<body>
<script type="text/javascript">function formv()
{
//alert("1");
// HERE OK
//----------------------------------------
document.getElementById(liste).style.visibility = "visible";
//-----------------------HERE DONT WORKING id listealert("2");
}
function Lien()
{
alert("zz");
i = document.Choix.Liste.selectedIndex;
if (i == 0) return;
url = document.Choix.Liste.options.value;
parent.location.href = url;}
</script>
<p>first</p>
<!-- this form hidden after load -->
<form id="liste" name="nameliste" visibility: hidden>
<!-- here ok -->
<!-------------------------------------------------------->
<fieldset>
<legend>Personalia:</legend>
</fieldset>
</form>
<!-- button with onclick to put visible the form liste by script formv--><form id="bouton2" name="bouton2">
<p><input type="button" name="bouton2" value = "OKOK" onclick="formv()" ></p>
</form>
</body>
</html> -
this function is not working
function getdata()
{
var txtFile = "c:\test.txt";
var file = new File(txtFile);
var str = "My string of text";file.open("w"); // open file with write access
file.writeln("First line of text");
file.writeln("Second line of text " + str);
file.write(str);
file.close();
alert("fin");
}have you a solution ?
thanks
-
by faure
question obsolete
-
Hello
my question is in the title of the topic
I hope a file on the local disk in a repertory to choice
-
Hello gourou !
1
In php.ini I have the extension php_printer.dll
I don't found in php.ini matter of printer _default
2 my problem)
I use a php program with a shell ?.exe (writed in visual basic)
?.exe is not ok because object printer is not détected
alone ?.exe is working well
your opinion ?
thanks you (merci)
-
problem resolved
good luck to w3school : it is a very good product por a beginner
-
<?php
// ///////////////////////
// second file bz92.php
// //////////////////////
session_start();
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>bz92</title>
<style>
</style>
</head><body>
</body><?php
echo "POST ";
echo"<br>";print_r($_POST);
echo"<br>";
if(isset($_POST['valider']))
{echo "<br>";
// boucle
$tableau = array();
// init$n=0;
foreach($_POST as $index=>$valeur)
{
$n= $n+1;
echo "valeur ".$valeur." // ";
echo "<br>";
}
}
echo "<br>";
echo "nombre ".$n;
// header('Location: bz5.php');exit();
?>
</html> -
like original message here 2 files php
post is not working well, only last tr
thank you for your help
<?php
// //////////////////////////////
// first file bz91.php
// /////////////////////////////session_start();
?>
<!DOCTYPE HTML>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<title>bz91</title>
<style>
.zone1{
width : 800px;
height : 400px;
margin: 0 auto;}
</style>
</head><body>
<div class="zone1">
<center>
<div class="w3-display-container w3-lime w3-section w3-round-xlarge" style="height:400px;" style="width:50%" ;><form action="bz92.php" id="ID1" method="POST" accept-charset="utf-8">
<div class="w3-display-position w3-white" style="top:20px;" >
<table id="t01" name="t01" BGCOLOR="#98FB98" align= center >
<?php$_SESSION[ 'lib'."1"]="Npm";
$_SESSION[ 'lib'."2"]="Prénom";
$_SESSION[ 'lib'."3"]="Début";
$_SESSION[ 'lib'."4"]="Fin";
$_SESSION[ "1"]="A";$_SESSION[ "2"]="B";
$_SESSION[ "3"]="C";
$_SESSION[ "4"]="D";
// ////////////////////
// loop
// ///////////////////for ($i = 1; $i <= 4; $i++)
{
?>
<tr height=30><td> <input type= "label" name = 'one'.$i value= <?php echo $_SESSION[ "lib".$i] ?> > </td>
<td> <input type= "text" name = 'two'.$i value= <?php echo $_SESSION[ $i] ?> > </td>
<?php
}
?>
</table>
</div><div class="w3-display-position w3-white" style="top:330px;left:20px">
<input type="submit" name = "valider" value="OK">
</div>
</form></div>
</center>
</div><p> Click on OK for validation</p>
</body>
</html> -
It is my first post ! excuse me
http://faureinfo.dyndns.biz/bz91.php
to see bz91.php and bz92.php in action
thanks you (merci in french)
-
class circle not working
in CSS
Posted
<?php
session_start();
$_SESSION['img']="c:\abc5\cmahj.jpg";
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<html>
<body>
<div class="w3-circle">
<h2>The w3-circle Class</h2>
<img src="<?php echo $_SESSION['img'] ?>' class="w3-circle" alt="Car" style="width:100px">
<!-- NOT WORKING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
</div>
</body>
</html>