Pass control to javascript

Sheritlw
Sheritlw used Ask the Experts™
on
I have a javascript function to resize a dropdown list within a grid.
I do not want to hardcode the dropdown list in the Javascript.

How do I pass the dropdown list and grid  to the javascript?

Thanks

function resizedropdown(column, dropdown)
{
   
   var colWidth = column.getWidth();
    var dropDown = document.getElementById(dropdown);
    dropDown.style.width = colWidth.toString() + "px";
}


                                          <eo:CustomColumn  HeaderText="Select Work Day"  MinWidth="50" Width="250" ClientSideEndEdit="on_end_edit" ClientSideGetText="on_column_gettext"
			                                    ClientSideBeginEdit="on_begin_edit" >
                                              <EditorTemplate >
                                                
                                                <select id="cboWeekDay" style="width:250; min-width:50; max-width:250; font-size:8pt; font:Verdana">
					                                <option>-Please Select-</option>
					                                <option>Sunday</option>
					                                <option>Monday</option>
					                                <option>Tuesday</option>
					                                <option>Wednesday</option>
                                                    <option>Thursday</option>
                                                    <option>Friday</option>
                                                    <option>Saturday</option>     
                                                                                              
                                                </select>
                                           </EditorTemplate>
                                              <CellStyle CssText="font-family:Verdana;font-size:8pt;" />
                                          </eo:CustomColumn>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
document.getElementById('<%=txtNewOrderedByPhone.ClientId %>');
Commented:
document.getElementById('<%=DropDown.ClientId %>');

Author

Commented:
How do I call the procedure from the dropdown in aspx?

Thanks

Commented:
which procedure?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial