Karam Singh Badesha wrote:
> Hi,
> Here is the scenario:
> In my page, I get the values for my dropdowns using the beforeCreate:
>
> <!beforeCreate
> getReleases(lavaReleases=>$attribute{lavaReleasesList});
> getBuilds(lavaBuilds=>$attribute{lavaBuildsList});
> getProjects(lavaProjects=>$attribute{lavaProjectsList});
> />
>
> Now at some where on the page I show these dropdowns and I have the
> following to fill the dropDowns:
>
> <sun:dropDown id="lavaReleaseMenu"
> toolTip="#{msgs.chooseLavaRelease}"
> labels="$attribute{lavaReleasesList}"
> />
>
> Now I would like to show the selected items in those dropDowns at
> another part of the page. How would I get the selected value at render
> time so that I can also show it at the later point on the same page? I
> vaguely remember that in javascript you could get it by doing
> something like form1.lavaReleaseMenu. How can I take care of this
> situation?
>
Rendering takes place on the server. So if you know the selected value
at "render time", then you can use that value directly in other places
on the page.
If you mean after the page is rendered, then you can use JavaScript.
You get the HTML DOM element, get it's value and then do what you need
with it (which may include updating another DOM elements text or
value). You can also do similar things with an Ajax request... the key
difference being that data is submitted to the server to generate some
HTML which is then placed somewhere on the page. If you don't need the
server to be involved, it'd probably be best to do it all on the client.
Does this answer your question?
Ken
> thanks
> Karam