Transmit parameter beetwen PHP and JavaScript
Posted by: Ency (---.120.77.82.static.cluj.rdsnet.ro)
Date: January 24, 2014 04:34PM

Now try to get familiar with JavaScript. The examples we have studied, mostly, I understood so I wanted to write my first test script.
Basically I created two fields on the screen to increment them either 1 or 10. If incremented by one is perfect, but the second increment does nothing. To increment by 10, but 11 increments (make the increment by 1 to), and if 11 increments 1 again show me 1. I think it's a question of transmission parameters or should load the page again (but do not know how). Can anyone advise me?
My program looks like this:

<html>
<head>
<script type="text/javascript">
function adstg(x){
var stg = document.getElementById("scstg"winking smiley;
stg.innerHTML=x;}
function addr(x){
var dr = document.getElementById("scdr"winking smiley;
dr.innerHTML=x;}
</script>
</head>
<body>
<?php
$scstg=$scdr=0;
echo '<font size="48"><span id="scstg">'. 0 .'</span> - <span id="scdr">'. 0 .'</span><br></font>';
echo '<input type="button" value="Stinga+1" onclick="adstg('.++$scstg.')" />';
echo '<input type="button" value="Dreapta+1" onclick="addr('.++$scdr.')" /><br>';
echo '<input type="button" value="Stinga1+10" onclick="adstg('.$scstg=$scstg+10 .')" />';
echo '<input type="button" value="Dreapta1+10" onclick="addr('.$scdr=$scdr+10 .')" />'
?>
</body>
</html>

Thank you.

Re: Transmit parameter beetwen PHP and JavaScript
Posted by: RiggsFolly (---.as13285.net)
Date: January 24, 2014 05:27PM

This is not a 'How do I write code' site, its just for questions about WAMPServer install and setup.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Re: Transmit parameter beetwen PHP and JavaScript
Posted by: Ency (---.120.77.82.static.cluj.rdsnet.ro)
Date: January 24, 2014 05:59PM

Ok , bud for my question abaut WAMPServer did not give mi one answer anubody:

I have my site in C:\Site and the songs I put it in D:\Songs.
In php I see the D:\Songs directory, I can read subdirectories, I see the .mp3 and .Wav files, I created the playlist, but the audio player doesn't start.
If I move the songs files in C:\Site or C:\Site\Songs goes perfectly, I can listen my music, but I do not want to be there.
Why I see in D:\Songs, but does not want to go? In httpd.conf I have:

DocumentRoot "C:/Site/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

and

<Directory "C:/Site/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>

I try to put also:

<Directory "D:/Songs/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>

bud does not work.

If I insert in httpd.conf
Alias /muzica "D:/Songs/"
I receive the error
<
Not Found

The requested URL /download/index.php was not found on this server.
>
after

[w] w w.mysite.ro/muzica/index.php

I can see in D:/Songs files and subdirectories, I can create, modify, delete files in D:/Songs and I can download songs from there, bud not to listening music.
What can I do?

Sorry, only registered users may post in this forum.