Re: ION data reuse [message #28701 is a reply to message #28489] |
Fri, 04 January 2002 11:00  |
Ken Mankoff
Messages: 158 Registered: February 2000
|
Senior Member |
|
|
On Mon, 10 Dec 2001, Rick Towler wrote:
> Although I am not 100% sure, what little I do understand about ION Script
> leads me to believe that it isn't possible to share data between two
> separate calls to <ION_IMAGE>. I can think of two ways to get around this
> limitation and I would guess that you already have thought of them.
>
> You could render both images in the same image, placing a band of color
> between them that matches your page background giving the illusion of two
> images. Another option would be to write the 2 images to a temp directory,
> send a delete command to "at" (spawn, 'echo "rm -f /tmp/'+filename+'" | at
> now + 5 minutes') and use the <ION_DATA_OUT> tag to create your HTML page
> and link to your newly created images. I take the latter approach with VRML
> models and it works quite well.
Hi Rick, ng
Thanks for the suggestion. That is working for me now, but it was
difficult to get it working. The ION/webserver process needs to have the
ability to write to disc *and* spawn processes *and* the location that the
IDL process writes needs to be accessible by the web server for the
regular <IMG> tags... But it does work (thanks to my sysadmin).
I *think* there is a third way to get shared data. Currently, the HTML
page that is on the recieving end of the SUBMIT button has the following:
<VARIABLE_DECL NAME="var" VALUE="$Form.var" TYPE="INT" PERSIST="TRUE />
And I can use $var in multiple <ION_IMAGE> tags.
The third method would involve using an intermediate page with a
<META REFRESH=0 ...> tag, and a hidden form var. This page would fill the
form var based upon the original pages form submission values, and then a
second later refresh to the final destination page. The final destination
page has a persistent variable (filled by the intermediate page) that is
usable across multiple <ION_IMAGE> tags.
The problem with this is that i *hate* websites that use REFRESH=0,
because then my back button doesnt work as expected...
I wont try implementing this anytime soon, but its food for thought...
-k.
p.s. If you want to see the site, you can get to it here:
http://lasp.colorado.edu/marsrobot/
click on "VirtualMars"
--
Ken Mankoff
LASP://303.492.3264
http://lasp.colorado.edu/~mankoff/
|
|
|