Bob Bedford wrote:
Quote:
Quote:
>Hi,
>>
>Kind of strange question in a JS newsgroup.
>Javascript cannot really help here, because the saving of pictures is a
>serverside (PHP) action.
>You can of course let JS pass the locations of the images to some
>php-script
>in the form of
http://www.example.com/images/myimage.png
>and let PHP open that picture, stream it into memory, and save it in the
>database.
>PHP can open a file on the net simply with fopen(), and it will figure out
>itself it needs a http-wrapper.
>>
Hi Erwin,
>
thanks for replying.
>
Actually my question is how to open a new window passing as param the images
array using javascript, as I can't use Exec or fpassthru or likes
(disallowed by ISP).
>
I'd like to know how to do something
window.open('newscript.php?imagearray'). passing the array of base64 encoded
files is also something I don't know how to do. It's a pure javascript
question, as the PHP part is known.
>
Bob
When you open a child window, the data of the parent is still accessible
.. Lets say you have...
var myimg = new Image()
myimg.src='some.gif';
Now pop a new window and you should be able to access that original
image as parent.myimg . So you don't really need to pass the actual
image, you just need to pass the array location where the image you want
to process happens to reside.
Note that I haven't tested this and it's been a long time since I've
done cross-window/frame communications since ajax and DHTML makes
popups/frames outdated. The syntax may be off but I do know that it's
possible.
--
---------------------------------------------------------------------------
http://www.hunlock.com -- Permanently under construction (And proud of it!)
$FA