Is reading from input hidden cached somehow?

Hi,

I found a problem with dynamic reading from input hidden.
To better explain my problem I will describe the process:

  1. user clicks a “select employer” link which opens dialog
  2. dialog is to select proper employer, which id is send back to rjs
    via Ajax
  3. rjs sets a with the proper value
  4. user clicks other link, which sends the employer_id taken from
    $F(‘employer_id’)

So, for the first time the step 4 gives a proper value od employer_id.
But if I do the procedure once again (I select different emplyer_id)
the step 4 is giving me the same employer value, as at the beginning
(in first iteration).

Using FireBug I can check, that the input hidden is having good values
any time I’m doing the procedure. Only reading from $F(‘employer_id’)
is still the same (not changed).

Any suggestions?
Tomasz

On 23 Mar, 23:08, “Tomasz Tomczyk” [email protected] wrote:

$F(‘employer_id’)
Any suggestions?
Tomasz

No suggestions at all?
Maybe just an assumption from somebody?

BR,
Tomasz

Tomasz Tomczyk wrote:

name=‘employer_id’> with the proper value
is still the same (not changed).
Tomas
Hey

Do you find the same behaviour when using $(‘employer_id’).value, or
even document.getElementById(‘employer_id’).value() instead of
$F(‘employer_id’) ?
It looks like prototype defines $F as Form.Element.getValue, maybe this
rings a bell for someone else out there?

Gustav P.

On 26 Mar, 21:46, Gustav P. [email protected] wrote:

  1. rjs sets a <input type=‘hidden’ id=‘employer_id’
    any time I’m doing the procedure. Only reading from $F(‘employer_id’)

Hey

Do you find the same behaviour when using $(‘employer_id’).value, or
even document.getElementById(‘employer_id’).value() instead of
$F(‘employer_id’) ?
It looks like prototype defines $F as Form.Element.getValue, maybe this
rings a bell for someone else out there?

Gustav P.

Bingo !!!

Working fine for document.getElementById(‘employer_id’).value and even
for $(‘employer_id’).value
I was pretty sure, that have checked it before, but it seems I
haven’t.
Thanks a lot !

By the way - why $F(‘employer_id’) works only once? The form should
be reset, or what?

Tomasz