Link to home
Start Free TrialLog in
Avatar of Sheritlw
SheritlwFlag for United States of America

asked on

Pass control to javascript

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

Avatar of xav056
xav056

document.getElementById('<%=txtNewOrderedByPhone.ClientId %>');
ASKER CERTIFIED SOLUTION
Avatar of xav056
xav056

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sheritlw

ASKER

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

Thanks
which procedure?