C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

JavaScript


Posted Date: 22 Sep 2008      Posted By: Rajesh Bathala      Member Level: Silver     Points: 1   Responses: 3



Hi,

I have a dropdown and text box as

<asp:DropDownList ID="DropDownList1" runat="server" Width="151px">
<asp:ListItem Value="00">HI</asp:ListItem>
<asp:ListItem>01</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txtSample" runat="server"></asp:TextBox>

Now whenver selecting the 'HI' item from the dropdown i have to visible the TextBox.rest of times i have to disable the TextBox without page post backing






Responses

Author: Vijaya saradhi    22 Sep 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

you can write a method like

if(Combobox1.selectedItem.Tostring()=="Hi")
{
Textbox1.visible=true;
}
else
{
Textbox1.visible=false;
}



Author: Rajesh Bathala    22 Sep 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 1

Hi,

I want javascript function only. Not Ajax also.I dont want Page Post back



Author: sathish    23 Sep 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 3

Hi try this

in JS Code

var a=document.getElementbyID("DropDownList1");

if(a.options[a.selectedIndex].value=="HAI")
document.form1.txtName.stylee.visibile="Hidden"

Sathish.s
Pothanur



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Excel Very urgent help me...
Previous : how to set up windows project
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use