browse: forums | FAQ
Connecting Tech Pros Worldwide

Hey there! Do you need JavaScript / Ajax / DHTML help?

Get answers from our community of JavaScript / Ajax / DHTML experts on BYTES! It's free.

change display field to drop down on checking a checkbox

Newbie
 
Join Date: Mar 2008
Posts: 11
#1: Mar 6 '08
i want to change the display field to a drop down when a check box is clicked.



hsriat's Avatar
Expert
 
Join Date: Jan 2008
Location: Bath, UK
Posts: 1,634
#2: Mar 6 '08

re: change display field to drop down on checking a checkbox


Quote:

Originally Posted by sunsom

i want to change the display field to a drop down when a check box is clicked.


Any details please.....
Newbie
 
Join Date: Mar 2008
Posts: 11
#3: Mar 8 '08

re: change display field to drop down on checking a checkbox


when the user checks a check box that row a columns display field should change to dropp down. plz help!!!!!!
hsriat's Avatar
Expert
 
Join Date: Jan 2008
Location: Bath, UK
Posts: 1,634
#4: Mar 8 '08

re: change display field to drop down on checking a checkbox


Quote:

Originally Posted by sunsom

when the user checks a check box that row a columns display field should change to dropp down. plz help!!!!!!

I think you asked this earlier too, but you didn't give any details.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,750
#5: Mar 8 '08

re: change display field to drop down on checking a checkbox


Quote:

Originally Posted by hsriat

I think you asked this earlier too, but you didn't give any details.

Threads merged. Please do not double post your questions!
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,750
#6: Mar 8 '08

re: change display field to drop down on checking a checkbox


Quote:

Originally Posted by sunsom

when the user checks a check box that row a columns display field should change to dropp down. plz help!!!!!!

Post what code you have so far, even if it's just HTML (using [code] tags).
Newbie
 
Join Date: Mar 2008
Posts: 11
#7: Mar 10 '08

re: change display field to drop down on checking a checkbox


the code is give below...

[HTML]<ui:checkbox name="check" id="check" onClick="javascript: clicker()"/>
<ui:display-field displayText="Forwarder" name="Forwarder" sortable="flase" />
<ui:dropdown name="Forwarder" id="Forwarder" displayText="Single selection" selectOne="true">
<ui:data select="$root/AA/*" idSrc="ID" displayTextSrc="Forwarder/@Value" selectionSrc="SELECTED/@Value = 'yes'" defaultValue="111" />
</ui:dropdown>
[/HTML]

when check box is clicked in the place of deiplay-field i want the drop down to be activated
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,750
#8: Mar 10 '08

re: change display field to drop down on checking a checkbox


Show the HTML version (view source in browser) of this code.

Do you want to hide the display field and show a drop-down or replace the field with a drop-down?
Newbie
 
Join Date: Mar 2008
Posts: 11
#9: Mar 10 '08

re: change display field to drop down on checking a checkbox


the code is from a tool which uses a customized form of jsp custom tags... i just want a hint as to how to write the javascript for this scenario...
Newbie
 
Join Date: Mar 2008
Posts: 11
#10: Mar 11 '08

re: change display field to drop down on checking a checkbox


i want to replace the dis[lay filed with the drop down when the checkbox is selected for a particular row....
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,750
#11: Mar 11 '08

re: change display field to drop down on checking a checkbox


Quote:

Originally Posted by sunsom

the code is from a tool which uses a customized form of jsp custom tags... i just want a hint as to how to write the javascript for this scenario...

A hint would be to hide the display field (set style.display to "none") and show the drop-down (set style.display to "block"). The HTML code would give a better idea of how to access those elements using JavaScript.
Reply