Answered by:
How To Call Javascript Function() to Select Combobox Item

Question
-
i'm beginner ,
this is my script
function SetComboWidth() {
if (document.getElementsByClassName('ajax__combobox_inputcontainer').length > 0) {
for (i = 0; i < document.getElementsByClassName('ajax__combobox_inputcontainer').length; i++) {
var t = document.getElementsByClassName('ajax__combobox_textboxcontainer')[i];
var comboInput = document.getElementsByClassName('ajax__combobox_inputcontainer')[i].parentNode.parentNode;
var comboButton = document.getElementsByClassName('ajax__combobox_buttoncontainer')[i].childNodes[0];
while (t.nodeName != "INPUT") {
t = t.childNodes[0];
}
var w = comboInput.clientWidth - comboButton.parentNode.clientWidth;
t.parentNode.style.width = w.toString() + "px";
}
}
document.onselect = function () { SetComboWidth(); };
}above mentionsioned bold area is my query, i'm using this query in my script . how to fire this function after i select an item on aspx:combobox ? i'm controlling ajax control toolkit combobox
- Moved by Just Karl Tuesday, January 26, 2016 3:21 PM Looking for the correct forum.
Tuesday, January 19, 2016 6:56 AM
Answers
-
Hello,
Microsoft's forums.asp.net has a forum for HTML, CSS and JavaScript
As Microsoft's ASP.Net forums are on a different platform, we cannot move the question for you.Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join('6D73646E5F6B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})- Proposed as answer by Mike Laughlin Tuesday, January 26, 2016 3:44 PM
- Marked as answer by Dave PatrickMVP Sunday, January 31, 2016 3:26 PM
Tuesday, January 26, 2016 3:21 PM
All replies
-
Hello,
The 'Academic Initiatives - Technical Queries' forum is for posts Related to technical / coding / programming related issues as related to Microsoft's Academic Initiatives.
As it's off-topic here, I am moving the question to the Where is the forum for... forum.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join('6D73646E5F6B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})Tuesday, January 26, 2016 3:21 PM -
Hello,
Microsoft's forums.asp.net has a forum for HTML, CSS and JavaScript
As Microsoft's ASP.Net forums are on a different platform, we cannot move the question for you.Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join('6D73646E5F6B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})- Proposed as answer by Mike Laughlin Tuesday, January 26, 2016 3:44 PM
- Marked as answer by Dave PatrickMVP Sunday, January 31, 2016 3:26 PM
Tuesday, January 26, 2016 3:21 PM