I am writing a script where I need the location of an image (absolute) to be stored in a PHP variable. I am doing this in conjunction with some other script I am using to allow users to drag objects around on a page and then have the PHP script generate an HTML document that uses the locations of the objects that the user moved. I will be doing the drag and move code in either VBScript or Javascript.
VBScript/Javascript Variables to PHP Variable?
Einklappen
Dieses Thema ist geschlossen.
X
X
-
VBScript/Javascript Variables to PHP Variable?
php-Entwicklung | ebiz-consult.de
PHP-Webhosting für PHP Entwickler | ebiz-webhosting.de
die PHP Marktplatz-Software | ebiz-trader.de
Stichworte: -
-
PS!
Please e-mail me with your response if you can
php-Entwicklung | ebiz-consult.de
PHP-Webhosting für PHP Entwickler | ebiz-webhosting.de
die PHP Marktplatz-Software | ebiz-trader.de
-
the php code is parsed and interpreted before any client side script will run, therefor you cannot use the JS variable in php on the same page BUT:
- define a form (name="myform" e.g.) with a hidden field "filename" and action="php_script_where_you_need_the_variable.php3"
- as soon as the Java Script knows the filename, set the value of the hidden field: myform.filename.value=filename;
and submit the form when you need the value: form.submit();
- voila: in the php script called on submit you have the needed value in $filename
-=* Titus *=-
| php pro |
|nerd for life|
"""""""""""""""
the PHP resource
Kommentar
-
Bidde noch mochmal in Deutsch ...
Also könnte man auch eine Js-Variable die z.B. navigator.Appname beinhaltet an PHP übergeben und damit arbeiten?
php-Entwicklung | ebiz-consult.de
PHP-Webhosting für PHP Entwickler | ebiz-webhosting.de
die PHP Marktplatz-Software | ebiz-trader.de
Kommentar
-
Im Prinzip ja, ...
aber es ist zu bedenken, dass Punkte in Variablennamen von php durch underscores ersetzt werden. (afaik)
-=* Titus *=-
| php pro |
|nerd for life|
"""""""""""""""
the PHP resource
Kommentar
Kommentar