.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Post New Web Links

Enable DropDown on Selection of Item in another DropDown

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net
 

i have two drop down list control in my page

Drop Down List 1(values)

1.Institute

2.Non Institute

DropDownList 2 contains Certain values

i want Enable and Disable DropDownList2 on basis of value in DropDownList1

i.e if value is Institute -DropDownList2-Enable

and value is NON -Inststiute-DropDownList-Disable

i don't want to postback as i did with enable postback i want to perform this kind 

of functionality with the help of javascript any help

thanks





View Complete Post


More Related Resource Links

Attach Workflow to Task List, don't get option to manually start workflow via dropdown on task item

  
Hi,

 

I am running WSS 3.0 with other workflows which are functioning correctly.  I created a new workflow in Visual Studio 2008 and was able to successfully run it in my dev environment.  I attached the workflow to a task list in my dev environment and was able to manually start the workflow by using the drop down workflow option and using the menus to manually start it.  I installed this workflow in our production environment and attached it to the task list (which had a SPD workflow attached to it which stopped working about a month ago).  I made sure that the option to manually start the workflow was checked.  When I tried to manually start the workflow, (hover mouse over title, drop down) there isn’t a workflow option.  The workflow also will not start automatically when a task is changed.

 

I attached this same workflow to a different task list in production and get the option to start it.

 

I have tried creating a small workflow in SPD 2007 and attaching it to the task list.  It shows that it is attached, when I look at the workflows that are attached to the task list, but I still don’t get the option to manually start it.

 

I have checked my security and I have fu

On New Item form, select item on choice dropdown based on query result.

  

I posted this on Experts Exchange awhile back with no answer, so here's hoping someone here has an idea :)

So I've mostly figured this problem out, but I need some help in getting over the hump... note that I'm using JavaScript to do this (SPServices) on SharePoint 07'.

I'm on the New Items page of a list. Based on a user's selection in a "Teacher" dropdown, I'm doing the following:

1.) Get the value of the Teacher field and several other fields (School and Visit Date)
2.) Run a CAML query based on those fields to find the last list item entered for that Teacher

So here's where I'm stuck...

I have 10 choice fields, all with choices 0, 4, 7, and 10. Depending on what they were set to in the last entered item (which I queried), I want to set the selected item on each of those dropdowns to equal that. So "Score 1" was set to "4" on the la

Javascript code to copy selected dropdown item to clipboard

  
Does anyone know how I can do this to get the text onto the clipboard?  <input id="Copy" type="button" value="Copy Url" runat="server" onclick="copy();" style="vertical-align: top;" visible="false"/><script type="text/javascript"> function copy() { var sel = document.getElementById("DropDownList1"); var text = sel.options[sel.selectedIndex].value; ??? } </script> </body>  

Button to copy selected item in dropdown to textbox

  
Hi, I found this bit of code which I tried and it isn't working. I just want to place a button next to a dropdown, and when clicked, the selected item in the dropdown will put into another textbox. <head><title>Untitled</title></head><body><script type="text/javascript">function copy() {var sel = document.getElementById("names");var text = sel.options.value;var out = document.getElementById("output");out.value += text+"\n";}</script> <select id="names"><option>Product One</option><option>Product Two</option><option>Product Three</option><option>Product Four</option></select><input type="button" onclick="copy()" value="Copy"><textarea id="output"></textarea> </body></html>   I saved this as a file and opened it in IE to test and nothing went into the textarea. Also i tried it in Firefox and the textarea said undefined each time I click the button. Can someone help to get this working?

Choose Item from dropdown list and display in a separate URL ASP.NET

  
Hi, I've a dropdown list for departments (engineering, bio, chemistry,physics etc.) when somebody choose the departments from the dropdown list, it displays the opening closing time(hours) in a detailsview controls. I have separate homepage for these departments ( these are the static html pages and no way to send querystring value) and I want to link the hours for each department from the departmental homepage. When I choose the department from the DDL, everytime it's the same URL. How can I solve the problem  So that I can point the respective hours from the respective departments ?   Thanks in advance.    

dropdown tht inserts data vis procedure if the gridview doeant have value for the dropdown selection

  
i have a dropdown with month names if the user has data for the month tht is selected then gridview displays the rows with day nos as per the month but if the gridview has no data for the same the dropdown or gridview via some event should call a insert procedure to insert data into the table for tht month with daynos ad rebind the gridview witht the rows just created Can anyone help very urgent  Michelle

Dynamically (on client side) populating data control (repeater) when dropdown item is selected

  
Hello!I'm currently working on a project and I want to make as much things as possible performing on client side - with as little loading as possible.The project consist of three "main" pages. On one page I use jQuery DataTable plugin which is working great. One page has tabs (using jQuery). I want to put datacontrol (repeater) on this site and when  user selects one item in dropdown, data in repeater loads on client side, without performing the action on server.I wonder if this is possible and if somebody can give me some case to help with?Thanks!I hope I was clear enough. all the best

Need help when selecting an item from one dropdown list it populates the 2nd dropdown on aspx page

  
Does anyone know how to do this so when I select something the 1st dropdown and the 2nd one becomes visible and populates list from a Select statement. I really need help on how to do in an aspx and not on the code behind page.

Need help when selecting an item from a dropdown list it makes the 2nd dropdown visible

  
Does anyone know how to do this so when I select something the 1st dropdown and the 2nd one becomes visible and populates list from a Select statement. How do you code this in Sharepoint Developer on an aspx page?

Add item to dropdown

  
HiI have a dropdown and link button like this <asp:DropDownList ID="cboPacking" runat="server" Width="110px">                                                                                     </asp:DropDownList> <asp:DropDownList ID="cboPacking" runat="server" Width="110px"></asp:DropDownList><asp:Button ID="btnAddPacking" runat="server" Text="Add New" />So if i click on "Add New" a new dailog box will open showing this<asp:TextBox ID="txtPackType" runat="server" ></asp:TextBox><asp:Button ID="btnSave1" runat="server" Text="Save" />If i save a PackType here in dialog box it should save in DB and the same PackeType should get selected in my previous page DropDown.How should i get the value saved in dialog box into the dropdown(selected item)

dropdown list box with datasource assigned in code but need to also manually add an item?

  
helloI have some dropdown list boxes that I need to fill with data from a database but I also need the first option to be "Show All"... So I need to combine using a datasource and manually adding an item to the top of the list. I have tried two different ways with no luck:1. with the appendDataboundItems = true, on aspx page, and below code in codebehind://lstClass.Items.Clear();                 //lstClass.Items.Add("Show All");                 lstClass.DataSource = finalQuery.Select(i => i.CategoryClass).Distinct().ToList();lstClass.Items.Clear();lstClass.Items.Add("Show All");lstClass.DataSource = finalQuery.Select(i => i.CategoryClass).Distinct().ToList();2. with appendDataboundItems = false, on aspx page, and below code in codebehind:lstClass.DataSource = finalQuery.Select(i => i.CategoryClass).Distinct().ToList();lstClass.Databind(); lstClass.Insert(0, "Show All"); so what method *should* work when you need to combine a datasource with manually added items?

jQuery instead of UpdatePanel (repeater loads when item in dropdown is selected)

  
Hello!I want to develop web page on which most of the things happens on clientside. The page contains several tabs (jQuery). One tabbed section have repeater which load when item in dropdown is selected.I've placed this 2 controls in UpdatePanel. Does somebody have any example how to achieve this without UpdatePanel, with jQuery?  I've heard that UpdatePanels are bad for page performance. I'm very new to jQ and Ajax.Thanks!all the bestBlaz

Populating a dropdown box with contents based on the selection of another dropdown box

  
Hi All   I am a complete newcomer to ASP.NET.  However in the few weeks I have been playing with it I have got pretty far and  have mastered things like stored procedures, gridviews, formviews and templates.  I have come across a problem which I am struggling with and could do with some help!  The scenario is this:   I have a dropdown box which is populated from SQLDataSource1   I have a second dropdown box which is populated from SQLDataSource2, but i need the query feeding this to be dependent on what was selected in the first dropdown box.    I assumed it would simply be a case of modifying the select statement on SQLDataSource2 using the SelectedIndexChanged event on the first DropDownList to update the second SQL source, but I cannot work out for the life of me how to do it.  Pretty much all of the code I have is ASP.   Is there a way I can do this purely in ASP rather than using VB behind the scenes or do I need to use VB?  I am pretty comfortable with vb.net but one of the other issues I have is referencing an ASP object from VB... so for instance if I had a text box in ASP, how can I read or change the properties of this object from VB?   FYI I am using Visual Studio 2010 and SQL/Server   Any help much appreciated!!!   Sean   

Dropdown select message in item template gridview dropdwon list ???

  
Hi ....I have used gridview item template , which has two dropdown list .The first dropdown list is binded from database to the dropdown list I have using the below code , to show the select message in dropdown list before selecting any item from dropdown list.In first row its show me --Select-- message and my vaues.. if i select some value form dropdownlist and click add new button it will create a new row dynamic then in previous row again it come back --Select-- message... on going to second row....I need to remain first row user selected value on going to next row.The New row will show --select-- message..Please go to my code and let me know what to do<asp:DropDownList id="DropDonList2" tabIndex=11 runat="server"          OnSelectedIndexChanged="DropDonList2_SelectedIndexChanged" AutoPostBack="True"          DataTextField="SizeRange" DataValueField="SizeRange"          OnDataBound="DropDonList2_DataBound" __designer:wfdid="w10"          AppendDataBoundItems="True">  <asp:ListItem Value="-1">Select</asp:ListItem> </asp:DropDownList><asp:DropDownList id="DropDonList2" tabIndex=11 runat="server" 

How to bind two different list to dropdown base on radiobutton selection

  
Hi, 
  I have radio button and dropdown column types in sharepoint list, and apart from this i have two list. I want to bind the data to data from the two list base on the selection of radio button. If i select 'Yes' i want to bind from the one of two list, and when i select i want to bind it to another list. Is it possible in sharepoint ?. If yes can you help me out in this

Append an Item to a SP List and NewForm dropdown menu

  

When Lookup Column on a NewForm.aspx, that was populated from another SP List, does not contain a value in the DropDown menu can it be added/inserted into the source SP List from the NewForm without leaving the NewForm? 

Is there code or example how to insert the Item in the SP List, then refresh/repopulate the Lookup Column's DropDown menu (in the NewForm)?

Or is there a better way to do this add an item both the List and the dropdown without resetting the values already entered in the NewForm?

 


Item dropdown edit menu

  

I created a costum list and I would like the dropdown edit menu to come up in a different column than item. I don't even want my clients to have to fill out a client column. How do I do that?

Thanks


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend