Click here to Skip to main content
16,010,297 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Web Site Optimization and Verification Pin
Chris Maunder26-Nov-06 18:27
cofounderChris Maunder26-Nov-06 18:27 
AnswerRe: Web Site Optimization and Verification Pin
Pete O'Hanlon27-Nov-06 9:28
mvePete O'Hanlon27-Nov-06 9:28 
Questiondeploy web service on remote computer Pin
steve_rm24-Nov-06 21:51
steve_rm24-Nov-06 21:51 
Questiondelete cookie manuel and javascript error Pin
karanba24-Nov-06 5:07
karanba24-Nov-06 5:07 
AnswerRe: delete cookie manuel and javascript error Pin
MatrixCoder24-Nov-06 8:49
MatrixCoder24-Nov-06 8:49 
GeneralRe: delete cookie manuel and javascript error Pin
karanba24-Nov-06 9:15
karanba24-Nov-06 9:15 
AnswerRe: delete cookie manuel and javascript error Pin
Nisha_D19-Dec-06 1:26
Nisha_D19-Dec-06 1:26 
QuestionWhy would uncommenting an alert statement cause my code to work? Pin
howardjr24-Nov-06 2:43
howardjr24-Nov-06 2:43 
While writing a custom combobox component I found that if a developer using the component wanted to "talk" to the component using their own client-side javascript, that they would need to know the actual names/ids for the client-side components that get rendered for my custom component by asp.net. To address this issue, I created a helper object that gets the original id that the developer associated with the custom combobox component, and has properties for the important ones provided by the custom component.

Then I created a list object to keep track of all of the combobox helper objects, so the developer could use: comboboxlist[ name ] to get the combobox helper object of that name, or enumer enumerate the properties like a collection to get to all of the combobox helper objects.

Unfortunately, after adding the combobox helper objects to the comboboxlist, I'm finding that I can't reliably get them back out, as the list appears to be empty.

I'm adding the combobox helper objects using this code:
comboboxlist[ combobox.Name ] = combobox;

Then later in my page, I call my IsComboBoxInList( Name ) function to tell me if the combobox helper object was added. her is the function's code:
function IsComboBoxInList( Name ) {
    return ( comboboxlist[ Name ] != comboboxlist.UNDEFINED );
}

The problem is after adding several comboboxes to the list, the function incorrectly returns false, when the alert statement a few lines above this function call is commented out.

If I uncomment the alert statement, it incorrectly prints out a message indicating that the list is empty, but now the IsComboBoxInList function correctly returns true!

Here is the code for the problem area:
var msg = '';

for( var Name in comboboxlist )
    msg += '\n   ' + Name;
if( msg == '' )
    msg = 'none';
// alert( 'comboboxes in comboboxlist: ' + msg );

if( IsInComboBoxInList( 'ComboBox2' ) ) {
    comboboxlist[ 'ComboBox2' ].TextBoxTag.focus();
    alert( 'focus using comboboxlist worked.' );
}

Very strange.

The code is over 400 lines, so I don't want to post it all, most of which is used to build the comboboxlist and combobox objects.

Thank you in advance.
AnswerRe: Why would uncommenting an alert statement cause my code to work? Pin
Shog924-Nov-06 10:05
sitebuilderShog924-Nov-06 10:05 
GeneralRe: Why would uncommenting an alert statement cause my code to work? Pin
howardjr24-Nov-06 15:05
howardjr24-Nov-06 15:05 
GeneralRe: Why would uncommenting an alert statement cause my code to work? Pin
Guffa24-Nov-06 23:42
Guffa24-Nov-06 23:42 
GeneralRe: Why would uncommenting an alert statement cause my code to work? Pin
howardjr25-Nov-06 17:29
howardjr25-Nov-06 17:29 
Generalundefined Pin
Shog926-Nov-06 9:49
sitebuilderShog926-Nov-06 9:49 
QuestionBest video encoder Pin
Steven J Jowett24-Nov-06 1:45
Steven J Jowett24-Nov-06 1:45 
AnswerRe: Best video encoder Pin
Bradml24-Nov-06 2:19
Bradml24-Nov-06 2:19 
AnswerRe: Best video encoder Pin
l a u r e n24-Nov-06 17:24
l a u r e n24-Nov-06 17:24 
Questionpdf file is not opening in windows 2003 Pin
sanju1423-Nov-06 22:06
sanju1423-Nov-06 22:06 
GeneralControlling Firefox Pin
Brady Kelly23-Nov-06 19:09
Brady Kelly23-Nov-06 19:09 
GeneralRe: Controlling Firefox Pin
Bradml23-Nov-06 19:16
Bradml23-Nov-06 19:16 
GeneralRe: Controlling Firefox Pin
Brady Kelly23-Nov-06 19:30
Brady Kelly23-Nov-06 19:30 
GeneralRe: Controlling Firefox Pin
Bradml23-Nov-06 19:42
Bradml23-Nov-06 19:42 
GeneralRe: Controlling Firefox Pin
Brady Kelly23-Nov-06 21:16
Brady Kelly23-Nov-06 21:16 
GeneralRe: Controlling Firefox Pin
Bradml23-Nov-06 21:46
Bradml23-Nov-06 21:46 
GeneralRe: Controlling Firefox Pin
Brady Kelly23-Nov-06 22:10
Brady Kelly23-Nov-06 22:10 
GeneralRe: Controlling Firefox Pin
Bradml24-Nov-06 2:15
Bradml24-Nov-06 2:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.