Jump to content

displaying text using javascript & innerHTML


jdauthre

Recommended Posts

I am pretty new to javascript and node.js. I am wanting to display  some text using

document.getElementById('txt').innerHTML= "some text"

followed by a node module :     

var spawn = require('child_process').spawnSync;
      child = spawn('ffmpeg',['-y  -i ',some_file , result_file ], { shell: true });  (which takes some time)

and then  

document.getElementById('txt').innerHTML= "some other text";

However it only disp[ays the second lot of text after the external program has finished. I had assumed that as I am using the synchronous version of spawn that the first line would get displayed first, how can I do this?

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...