Solved

write result of passthru to textarea?

Posted on 2012-03-12
1
286 Views
Last Modified: 2012-06-27
I would like to write the output from "passthru" to a text area.

I would like to call the routine from javascript.

It works correctly when written in the form of:
<textarea name='test'> <?php $out=passthru($prog);  ...

It does not work when called from javascript as:
document.form.test.value="<?php  if ( isset($_FILES)  $out=passthru($prog);  ...

How can I fix this?
0
Comment
Question by:pillmill
1 Comment
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 37713969
passthru is server-side, while javascript is client-side
hence you need to make a request from the client to the server to call passthru on demand

probably I did not understand what you want to archive, can you please explain and post the code your want to have in the browser (client-side)
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now