Thanks Jesse.  I'm not sure why that wont work.

The file that the updater is pointing to contains this script ( i am
passing a hidden variable as well~ that i have control over):

<?php
if ($_GET['type'] == 'white' && $_GET['decide'] == 'yes'){
?>
<script type="text/javascript">
$('type').value = 'green';
</script>
<?php
}
?>

this script works when i just want to replace the placeholder with
html - but it doesn't seem to effect the input field at all when the
script is added.

When I submit the form after the replacement it still uses the value
of "white".

Sheri

On May 23, 2:22 pm, "Jesse Farmer" <[EMAIL PROTECTED]> wrote:
> On 5/23/07, muskokee <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi everyone,
>
> > I have looked through a variety of documentation sources but have come
> > up empty handed.  I can get the value of a input field within a form
> > but I am not sure how to replace it successfully.  It is a hidden
> > variable that I want to change dynamically:
>
> > <input type="hidden" id="type" name="color" value="white" />
>
> > to
>
> > <input type="hidden" id="type" name="color" value="green" />
>
> > I am using the "insertion" function to insert a link that connects to
> > an ajax.updater function from where i would like to initiate the value
> > change of the html input.
>
> > Any help would be appreciated.  I am VERY javascript green, but am
> > learning more every time i mess up ;)
>
> > Sheri
>
> Maybe I'm confused, but why won't this work?
> $('type').value = 'green';
>
> --
> Jesse E.I. Farmer
> e: [EMAIL PROTECTED]
> w:http://20bits.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to