?
Solved

Toggle visibility javascript in <netui:select> tag

Posted on 2007-08-07
4
Medium Priority
?
784 Views
Last Modified: 2008-01-09
I would like to toggle the visibility of a textbox. I am using <netui> tags.
document[getNetuiTagName("myForm")][getNetuiTagName("dropdown")].style is always returning null.

I have set the tagid for the <netui:select> tad like this

<netui:select multiple="true" tagId="dropdown" optionsDataSource="{pageFlow.mapscoOptions}" dataSource="{actionForm.mapsco}"></netui:select>
When I try with the regular html tags it works fine but not with the <netui> tags.
Please help.
0
Comment
Question by:Wtritepo
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:raj3060
ID: 19647916
try:

document.getElementById("dropdown").style

and place styleId = "dropdown" inside tag
0
 
LVL 11

Accepted Solution

by:
raj3060 earned 2000 total points
ID: 19647989
I tried this and it worked:

<P><netui:select multiple="true" id ='drop' styleId="dropdown" tagId="dropdown" optionsDataSource="{pageFlow.mapscoOptions}" dataSource="{actionForm.mapsco}"></netui:select></P>
<SCRIPT>
alert(document.getElementById('drop').styleId)
</SCRIPT>
0
 

Author Comment

by:Wtritepo
ID: 19648877
I will try that and let you know.
I am using javascript at another location.
I want to display the calendar and when the user clicks on a date it automatically enters that date in the textbox. I got this code for the calendar from the web.

This is my code.
 <netui:textBox size="10" tagId='text1'  dataSource="{actionForm.cmpDate}" />                            
<a href="javascript:NewCal('text1','ddmmmyyyy',true,24)">

When I use the regular html tag
<input type="Text" id="demo1" maxlength="25" size="25">, it works fine but when I use the tadId it does not pass the value properly and I get the javascript error.

Please help.
0
 

Author Comment

by:Wtritepo
ID: 19671044
The second issue I had is also resolved.

thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question