On Oct 24, 4:29 pm, Branko Vukelic <[email protected]> wrote:
> Since
> you say the data is already in the table on the page, there's no point
> in trying to hide it, especially since POST isn't really hiding
> anything if someone really wants to get ahold of request data.

The datum in my case is a room rate that a client must pay.
Recalculation is somewhat complicated, and I had hoped to avoid a
recalculation and just pass the already-calculated value to the
"confirmation" page.  I cannot let that be part of the URL for obvious
reasons, and I suspect having it appear in postdata will also be
problematic.  One the first page, the user select one of many rates.
In the following page, I ask for confirmation.   How to get the
previously-calculated rate over to the confirmation page?

Probably the safest is for me to calculate it again, I guess.

FWIW I solved my state problem with a form post, as you suggested:

def testajax2():
    rows=[]
    for i in range(10):
        rows.append(
            TR(
                'A cottage on the river','','','',
                 INPUT(_name='b'+str(i), _value='Book Now!',
_type='submit', _onclick=XML(
                   "$('#choice').val('" + str(i) + "'); $
('#disposition').val('" + str(i*10) + "'); $('#weaponry').val('" +
str(i*100) + "')"))
                 )
            )
    return dict(form=FORM(
                  INPUT(_name='choice', _id='choice', _type='hidden',
value='0'),
                  INPUT(_name='disposition', _id='disposition',
_type='hidden', value='0'),
                  INPUT(_name='weaponry', _id='weaponry',
_type='hidden', value='0'),
                  TABLE(rows),
                  _action=URL(f=showme)
                  )
               )

There are a bunch of submit buttons in one form which contains a table
with many rows.  The onclick event of the submit button sets the
values of three hidden input fields in the form.  My previous
javascript attempts would be no safer anyway, because the setter URL
would still have been visible in the page source.

So as I said, looks like the safest is for me to simply calculate the
rate again.

Reply via email to