If I understood it correct I have a jQuery snippet where I did a "Same as Shipping" address kind of thing.
<code> <script> $(document).ready(function(){ function same_billing() { var thisCheck = $(this); var owner_address = $("#owner_address").val(); var owner_city = $("#owner_city").val(); var owner_state = $("#owner_state").val(); var owner_zip = $("#owner_zip").val(); if (thisCheck.is (':checked')) { $("#billing_address").val(owner_address); $("#billing_city").val(owner_city); $("#billing_state").val(owner_state); $("#billing_zip").val(owner_zip); } else{ $("#billing_address").val(''); $("#billing_city").val(''); $("#billing_state").val(''); $("#billing_zip").val(''); } } $("#billing_same").click(same_billing); } </script> </code> On Apr 15, 1:50 pm, millitheKidd <[EMAIL PROTECTED]> wrote: > I know I've already asked this before -- and, well, it may not even be > possible, but, here goes again. Is it possible to copy from one > combobox to another one; such as address information. After COMBING > the web, I FINALLY found an example here: > > http://www.plus2net.com/javascript_tutorial/copy-listbox.php > > But, what I would like to do is use telerik's radcombobox or an > asp.net combobox to do mine with. Below, you can see where I got it to > work using just a plain old HTML select box, but I really want to get > it to work using telerik's combo; as they have cool styling and > functionality on theirs. > > Here's my radiobuttonlist control: > <asp:RadioButtonList ID="rblMailingAddress" runat="server" > TabIndex="330"> > <asp:ListItem Value="SameasBusaddr">Same as my business > address.</asp:ListItem> > <asp:ListItem Value="SameasHomeaddr">Same as my home > address.</asp:ListItem> > <asp:ListItem Value="Separateaddr">This is a separate > address.</asp:ListItem> > </asp:RadioButtonList> > > Here's my RadcomboBoxes: > <radC:RadComboBox ID="cmbBusinessState" runat="server" > DataSourceID="StateListXmlDataSource" > SkinsPath="~/RadControls/ComboBox/Skins" > Width="140px" TabIndex="160" DataTextField="Text" > DataValueField="Value" Height="140px" > Skin="WindowsXP" MarkFirstMatch="True"> > </radC:RadComboBox> > > 2 more with an ID of cmbResidentState and cmbMailingState > > And here's my jquery: > > $(document).ready(function(){ > > //For Mailing Address information > $('#rblMailingAddress :radio').click(function() { > var CurVal = $("[EMAIL PROTECTED]'rblMailingAddress']:checked").val() > > if(CurVal == "SameasBusaddr") > { > $("#tbMailingAddress").val($("#tbBusinessAddress").val()); //these 2 > peterblum textboxes are working fine. > $("#tbMailingCity").val($("#tbBusinessCity").val()); //so are these, > they are working too. > $('#Select2').val($('#Select1').val()); //this worked with just plain > old html select boxes. > $("#msdeMailingZip").val($("#msdeBusinessZip").val()); //Peter Blum's > Multi-Segment Data Entry is not working either but I will contact him > for that issue. > } > else if(CurVal == "SameasHomeaddr") > { > $("#tbMailingAddress").val($("#tbResidentAddress").val()); > $("#tbMailingCity").val($("#tbResidentCity").val()); > $("#cmbMailingState").val($("#cmbResidentState").val()); //tried > telerik.com's radcombobox but this didn't work. > $("#msdeMailingZip").val($("#msdeResidentZip").val()); > } > else > { > //If "This is a separate address." was clicked then clear 'em out and > reset the comboboxes to 0 SelectedIndex. > $("#tbMailingAddress").val(""); > $("#tbMailingCity").val(""); > $("#Select1").selectedIndex = 0; //This is not working either but > I'll figure this part out later. > $("#msdeMailingZip").val(""); > } > }); //end click for Mailing Address info > > }); //end main function > > If ANYONE could help me I would appreciate it SOOO MUCH! This is > driving me nuts. :-P > > p.s. Using Visual Studio 2005 with ASP.Net 2 dot 0 > > thanks, milli