Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #16415

Re: javascript to php in the same page

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.php
Subject Re: javascript to php in the same page
Date 2016-02-14 15:31 +0000
Organization A noiseless patient Spider
Message-ID <87r3gf48b7.fsf@bsb.me.uk> (permalink)
References <n9pph5$1qss$1@gioia.aioe.org>

Show all headers | View raw


alex <alex@nomailno.it> writes:

> <html>
> <body>
> Select a file to upload:
> <input type="file" id="myFile" onchange="myFunction()" size="50" >
> <p id="demo"></p>
> <script>
> function myFunction() {
> var vx = document.getElementById("myFile").value;
> document.getElementById("demo").innerHTML = vx;
> }
> </script>
> </body>
> </html>
>
> <?php
> if (isset($value)){echo $value;}
>
> ?>
>
>
> the variable vx I ned to use in the php $value
>
> when I have this value the all page is loaded so is need to recall the
> page php, but so I lose the value already selected;
> I find some solutions: akax, filed hidden, cookie; but not know how
> use in my code

I think you may be gradually going down the wrong path because you are
asking very narrow questions.  This is made worse by the fact that your
questions are not very clear so people are just suggesting thing you
might try rather than guiding you to the best solution.

I suggest you back up a bit.  What are you doing overall?  What is it
you are trying to do that has led you to think that a file control, some
client side script and a bit of PHP is the solution?

-- 
Ben.

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

javascript to php in the same page alex <alex@nomailno.it> - 2016-02-14 12:48 +0100
  Re: javascript to php in the same page Tim Streater <timstreater@greenbee.net> - 2016-02-14 12:12 +0000
  Re: javascript to php in the same page Luuk <luuk@invalid.lan> - 2016-02-14 15:00 +0100
  Re: javascript to php in the same page Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-14 15:31 +0000
    Re: javascript to php in the same page alex <alex@nomailno.it> - 2016-02-14 16:45 +0100
      Re: javascript to php in the same page Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2016-02-14 11:08 -0500
      Re: javascript to php in the same page Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-14 16:43 +0000
        Re: javascript to php in the same page Luuk <luuk@invalid.lan> - 2016-02-14 17:50 +0100
          Re: javascript to php in the same page "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-02-14 18:17 +0100
            Re: javascript to php in the same page Luuk <luuk@invalid.lan> - 2016-02-14 19:42 +0100
        Re: javascript to php in the same page Tim Streater <timstreater@greenbee.net> - 2016-02-14 19:21 +0000
          Re: javascript to php in the same page Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-14 21:40 +0000
            Re: javascript to php in the same page Erwin Moller <erwinmollerusenet@xs4all.nl> - 2016-02-15 14:49 +0100
              Re: javascript to php in the same page Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-15 19:20 +0000
      Re: javascript to php in the same page Arno Welzel <usenet@arnowelzel.de> - 2016-02-15 13:51 +0100
        Re: javascript to php in the same page praider650@gmail.com - 2016-08-17 03:23 -0700

csiph-web