Try doing it in the onload handler. Or inline after all your html has been
defined, i.e:
<html>
<body>
<div id='outputText'></div>
<script>
// do your script here.
</script>
</body>
</html>
> Hi,
>
> I'm very new to this, so please excuse me if I don't explain things
> well (or ask stupid questions). I'm writing a widget which will get
> the latest headlines from a specific remote site and display them in
> a widget. I'm using PHP to do this, and I've written a PHP script
> which does this well.
>
> Right, within the widget itself (in the html file) I've got this:
>
> <script type="text/javascript">
> var commandLine = '/usr/bin/php -f osxaudio3.php';
> document.getElementById("outputText").value = widget.system
> (commandLine, null).outputString;
> </script>
>
> <div id="outputText"></div>
>
> but I see nothing when I launch the widget.
>
> I've tried it with
>
> var commandLine = '/usr/bin/php -f osxaudio3.php > output.txt';
>
> to check that it works, and indeed it writes a file 'output.txt' with
> the right information correctly.
>
> So how do I get it to display the output from this script in the widget?
>
> Regards,
>
> Kevin
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Dashboard-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/dashboard-dev/email@hidden
>
> This email sent to email@hidden
--------------------------------------------------
John Louch Internet #: email@hidden
(805) 541 2965
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden
This email sent to email@hidden