Search

You searched for the word(s): userid:273351

Matching Posts

  • Re: Need JavaScript array from a .NET dictionary list

    You could write a method to convert a Dictionary<int,int> to a JS array: private string DictionaryToJSArray(Dictionary<int, int> d) { StringBuilder array = new StringBuilder(); array.Append("["); if (d != null) { bool prependComma = false; foreach (int x in d.Keys) { if (prependComma) array.Append(","); else prependComma = true; array.AppendFormat("[{0},{1}]", x, d[x]); } } array.Append("]"); return array.ToString(); } And then register the array
    Posted to Client Side Web Development (Forum) by jamezw on 8/26/2009
  • Re: Javascript re-asign onchange event

    If there is a postback anytime after you set the event to the secondFunction this change will be lost after the postback returns.
    Posted to Client Side Web Development (Forum) by jamezw on 8/26/2009
  • Re: Javascript re-asign onchange event

    It looks like you are using the Microsoft AJAX API. If so, you could try: $removeHandler('ddPeriod', 'change', firstFunction); $addHandler('ddPeriod', 'change', secondFunction);
    Posted to Client Side Web Development (Forum) by jamezw on 8/26/2009
  • Re: In the dropdown the onchange event fired before the blur (in IE only)

    Maybe you could try something like this... First define a variable on the page which indicates whether the onchange code should fire and set it to true by default: var fireOnChange = true; Then add an onkeydown and onkeyup event to your drop down list. The onkeydown will turn this flag off and the onkeyup will turn the flag back on: onkeydown="fireOnChange=false;" onkeyup="fireOnChange=true;" Then check this flag before running your onchange event function. For instance, if you
    Posted to Client Side Web Development (Forum) by jamezw on 8/26/2009
  • Re: In the dropdown the onchange event fired before the blur (in IE only)

    Unfortunately, that is an inconsistency amongst browsers. When only using the keyboard up and down arrows , IE and Opera will fire the onchange event as soon as the drop down list item changes; Firefox and Safari do not fire the onchange event until you tab away.
    Posted to Client Side Web Development (Forum) by jamezw on 8/24/2009
  • Re: checkboxlist validation

    This example uses server-side and client-side code. First, the server control in this example is CheckBoxList1: <asp:CheckBoxList ID="CheckBoxList1" runat="server"> <asp:ListItem Value="ALL">ALL</asp:ListItem> <asp:ListItem Value="Item 1">Item 1</asp:ListItem> <asp:ListItem Value="Item 2">Item 2</asp:ListItem> <asp:ListItem Value="Item 3">Item 3</asp:ListItem> </asp:CheckBoxList>
    Posted to Client Side Web Development (Forum) by jamezw on 8/18/2009
  • Re: re-enable mouseover event

    Here is a simple example: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript"> function doSomething() { alert('moused over!'); } function doNothing() { } </script> </head> <body> <p> <input id="button1" type="button" value="hover over me then leave" onmouseout="doSomething();" /> </p> <p>
    Posted to Client Side Web Development (Forum) by jamezw on 8/14/2009
  • Re: Missing parameter value

    Plus symbol (+) is a special character in URLs and indicates a space. Try using %2b instead. Refer to this link .
    Posted to Client Side Web Development (Forum) by jamezw on 8/12/2009
  • Re: css without postback?

    Here is a simple example that changes the background color for a DIV using a simple javascript function and dropdownlist with an onchange event: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript"> function setBGColor(id, color) { document
    Posted to Client Side Web Development (Forum) by jamezw on 8/6/2009
  • Re: 404 Redirect in JavaScript

    If you place the IFrame pages into another folder you can add a second web.config to that folder and define different 404 redirects specifically for that folder. For example, if your root web.config redirects 404 errors to FileNotFound.htm then if someone tries to access an invalid page a user will get redirected to there e.g. http://somesite.com/FileNotFound.htm. But, if someone tries to access an invalid page from another folder you can change the 404 redirect. For instance, say someone tries to
    Posted to Client Side Web Development (Forum) by jamezw on 8/5/2009
Page 1 of 18 (179 items) 1 2 3 4 5 Next > ... Last »