Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Umm, there's very little information here, but one way would be to render out your html with a hidden field where the value of the field was the filename. Then you could call getElementById or whatever method you use to find selectors to read that in, then use that in your javascript.</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;span id="submittedFilename" style="display: none"&gt;&lt;%php $filename %&gt;&lt;/span&gt; &lt;/body&gt; &lt;/html&gt; &lt;script&gt; var filename = $('submittedFilename").html(); &lt;/script&gt; </code></pre> <p>Another option would be to set a variable into your rendered php (html) page, and then use that in your javascript.</p> <pre><code>&lt;script&gt; var filename = &lt;%php $filename %&gt;; &lt;/script&gt; </code></pre> <p>================ EDIT ==========================</p> <pre><code>&lt;%php // This is your processing script ... Your processing logic ... // After processing, add a variable called filename to session. session_start(); $_SESSION['filename'] = $filename; header('Location: /newPhpScript.php'); %&gt; </code></pre> <p>-- Then your new php script could look something like this:</p> <pre><code>&lt;%php session_start() %&gt; &lt;html&gt; &lt;body&gt; &lt;script&gt; // if using jQuery var filename = $('#filename').text(); // else use this var filename = document.getElementById('filename').innerHTML; &lt;/script&gt; &lt;span id="filename" style="display: none"&gt;&lt;%php echo $_SESSION['filename'] %&gt;&lt;/span&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload