Some changes:
<script type="text/javascript" language="JavaScript">
document.observe("dom:loaded",
function(){
> if ($('adjType').value.length > 0){
> $('submittingTerritory').show();
> }}
>
> );
> </script>
>
<form>
.......
More HTML
.......
<tr id="submittingTerritory" style="display:none" >
<td>
<b>Other Territory</b>
</td>
<td>
<?php echo $this->formSelect('
>
> otherTerritory', $this-
> >shortTerritory, array("onChange"=>"getTerritories()"), array
> (""=>"Select a Territory") + $this->shortTerritories) ?>
>
> </td>
> </tr>
>
>
2009/6/26 anthony <[email protected]>
>
> I am trying to figure out if I have a dynamic form, whether or not it
> is better to make use of many hide & show functions or just Ajax
> Updaters and div elements. Let me give you a example of something I
> cannot get to work:
>
>
> <script type="text/javascript" language="JavaScript">
> Event.observe(window,'load',function(){
> if ($('adjType').value == ""){
> $('submittingTerritory').hide();
> }}
>
> );
> </script>
>
> <form>
> .......
> More HTML
> .......
> <div id="submittingTerritory">
> <tr>
> <td>
> <b>Other Territory</b>
> </td>
> <td>
> <?php echo $this->formSelect('otherTerritory',
> $this-
> >shortTerritory, array("onChange"=>"getTerritories()"), array
> (""=>"Select a Territory") + $this->shortTerritories) ?>
>
> </td>
> </tr>
> </div>
>
> When the page loads, I don't want it to show. But it shows anyway. If
> I put an alert in that function it works, so I know it s not failing
> the if statement.
> >
>
--
Best Regards,
Vladimir Tkach
+972-54-7574166
[email protected]
http://teamco-anthill.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---