in reply to Re: compress data to pass in url?
in thread compress data to pass in url?

yes, I want to pass this data to a separate script from the display page so it generates the images on the fly, this saves me having to have temporary image files lying around.

I other words, my script outputs an html page that has links to these "images" which the browser gets - the user doesn't do anything so there is no opportunity for a post.

Replies are listed 'Best First'.
Re: compress data to pass in url?
by Reverend Phil (Pilgrim) on Jan 17, 2003 at 20:14 UTC
    On the contrary, there are ways you can finagle this into POST. One thing I've learned in my tiny dabble into more-interesting-than-html webpages, is that you can use Javascript to do un-formy forms. Here's a concept snippet of what your html could look like:

    <form name="image1" id="image1" method="post" action="image_gen.pl"> <input name="button1" type="button" style="HEIGHT: 28px; WIDTH: 120px" + value="View Image 1" LANGUAGE="javascript" onclick="return button1 +_onclick()"> <input type="hidden" name="image_info" value=" $perl "> </form>
    ..where '$perl' is your info for that first image, retrieved from your post'ed form via whatever method you love best. The trick to making it work without real data to enter and turning that generic button into a submit button is in your headers javascript section:
    function button1_onclick(){ window.document.image1.submit(); }
    Now I'm completely lacking any real javascript knowledge, and I've done scant amounts of web programming, but that's the $3.50 I have to offer your Loch Ness Monster, as unperl as it is.
    Hope that helps,
    -=rev=-
      Except it will break down for people who mistrust Javascript and don't generally turn it on.

      Makeshifts last the longest.