Search Results

Search found 7706 results on 309 pages for 'checked'.

Page 11/309 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • SQL-How to retrieve the correct data using php

    - by Programatt
    I am new to SQL so please excuse my question if it is simple. I have a database with a few tables. 1 is a users table, the others are application tables that contain the users preferences for receiving notifications about that application based on the country they are interested in. What I want to do, is retrieve the e-mail address of all users that have an interest in that country. I am struggling to think about how to do this. I currently have the following query constructed, and the code to populate the values function check($string) { if (isset($_POST[$string])) { $print = implode(', ', $_POST[$string]); //Converts an array into a single string $imanageSQLArr = Array(); if (substr_count($print,'Benelux') > 0) { $imanageSQLArr[0] = "checked"; } else { $imanageSQLArr[0] = "off"; } if (substr_count($print, 'France') > 0) { $imanageSQLArr[1] = "checked"; } else { $imanageSQLArr[1] = "off"; } if (substr_count($print, 'Germany') > 0) { $imanageSQLArr[2] = "checked"; } else { $imanageSQLArr[2] = "off"; } if (substr_count($print, 'Italy') > 0) { $imanageSQLArr[3] = "checked"; } else { $imanageSQLArr[3] = "off"; } if (substr_count($print, 'Netherlands') > 0) { $imanageSQLArr[4] = "checked"; } else { $imanageSQLArr[4] = "off"; } if (substr_count($print, 'Portugal') > 0) { $imanageSQLArr[5] = "checked"; } else { $imanageSQLArr[5] = "off"; } if (substr_count($print, 'Spain') > 0) { $imanageSQLArr[6] = "checked"; } else { $imanageSQLArr[6] = "off"; } if (substr_count($print, 'Sweden') > 0) { $imanageSQLArr[7] = "checked"; } else { $imanageSQLArr[7] = "off"; } if (substr_count($print, 'Switzerland') > 0) { $imanageSQLArr[8] = "checked"; } else { $imanageSQLArr[8] = "off"; } if (substr_count($print, 'UK') > 0) { $imanageSQLArr[9] = "checked"; } else { $imanageSQLArr[9] = "off"; } and the query $tocheck = $db->prepare( "SELECT users.email FROM users,app WHERE users.id=app.userid AND BENELUX=:BENELUX AND FRANCE=:FRANCE AND GERMANY=:GERMANY AND ITALY=:ITALY AND NETHERLANDS=:NETHERLANDS AND PORTUGAL=:PORTUGAL AND SPAIN=:SPAIN AND SWEDEN=:SWEDEN AND SWITZERLAND=:SWITZERLAND AND UK=:UK"); $tocheck->execute($country); $row = $tocheck->fetchAll(); This does retrieve data, but only people who's preferences match EXACTLY what is put (so what they haven't selected is taken into account as much as what they have). Any help would be greatly appreciated.

    Read the article

  • Splash screen moves up before closing

    - by rturney
    In C# I am having a problem with the splash screen. When it is time to close and the main Form1 appears, it moves over to the upper right corner of Form1. It then disappears. I have never had this occur before and have just about run out of ideas to fix it. I want the splash screen to disappear in the center screen and not move over to the upper corner of the opening Form1. Here is the code: public Form1() { Splash mySplash = new Splash(); mySplash.TotalValue = 7; //or however many steps you must complete mySplash.Show(); mySplash.Update(); InitializeComponent(); //--<begin>-------------- this.Hide(); this.WindowState = FormWindowState.Normal; mySplash.Progress++; printDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage); printBOM.PrintPage += new PrintPageEventHandler(printBOM_PrintPage); printList.PrintPage += new PrintPageEventHandler(printList_PrintPage); mySplash.Progress++; // using old Kodak Imaging OCX ! axImgEdit1.Image = "\\\\Netstore\\eng_share\\EView\\BOB-eView9.tif"; axImgEdit1.DisplayScaleAlgorithm = ImgeditLibCtl.DisplayScaleConstants.wiScaleOptimize; axImgEdit1.FitTo(0); axImgEdit1.Display(); mySplash.Progress++; //~~~~~~~~~~~~~~~~~~~~Getting printer info~~~~~~~~~~~~~~~~~~~~~~~~~ List<Win32_Printer> printerList = Win32_Printer.GetList(); int i = 0; foreach (Win32_Printer printer in printerList) { prnName = printer.Name; prnPort = printer.PortName; prnDriver = printer.DriverName; if (i == 0) { prnNameString = prnName; prnDriverString = prnDriver; prnPortString = prnPort; } else { prnNameString += "," + prnName; prnDriverString += "," + prnDriver; prnPortString += "," + prnPort; } i++; } mySplash.Progress++; EViewMethods.defaultPrn[0] = Settings.Default.DefaultPrinter; //defaultPrn[] is string array holding the default printer name, driver and port EViewMethods.defaultPrn[1] = Settings.Default.DefaultPrinterDriver; EViewMethods.defaultPrn[2] = Settings.Default.DefaultPrinterPort; //making this printer the system default printer object printerName = Settings.Default.DefaultPrinter; ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Printer"); ManagementObjectCollection collection = searcher.Get(); foreach (ManagementObject currentObject in collection) { if (currentObject["name"].ToString() == printerName.ToString()) { currentObject.InvokeMethod("SetDefaultPrinter", new object[] { printerName }); } } mySplash.Progress++; EViewMethods.reCenterEVafterDwgClose = Settings.Default.ReCenterEVafterDwgClose; if (Settings.Default.ReCenterEVafterDwgClose == true) recenterEViewAfterDrawingViewerClosesToolStripMenuItem.Checked = true; else recenterEViewAfterDrawingViewerClosesToolStripMenuItem.Checked = false; //------------------------------------------------------- EViewMethods.screenBehavior = Settings.Default.ViewStyle; normalToolStripMenuItem.Checked = false; clearViewToolStripMenuItem.Checked = false; clearviewDULevLRToolStripMenuItem.Checked = false; clearviewdULevLLToolStripMenuItem.Checked = false; clearviewdURevULToolStripMenuItem.Checked = false; clearviewdURevLLToolStripMenuItem.Checked = false; clearviewdURevLRToolStripMenuItem.Checked = false; smallScreenToolStripMenuItem.Checked = false; //Form1.ActiveForm.SetDesktopLocation(588, 312); //all screen behavior mode will begin centered on the screen EViewMethods.eviewUserPrefLocation = Settings.Default.FormEviewLocation; //------------------------------------------------------- EViewMethods.syncListToDwgNum = Settings.Default.SyncListDwgNum; if (EViewMethods.syncListToDwgNum == true) synchronizeListToActiveDwgToolStripMenuItem.Checked = true; else synchronizeListToActiveDwgToolStripMenuItem.Checked = false; toolStripStatusLabel1.Text = ""; toolStripStatusLabel2.Text = Settings.Default.ViewStyle; toolStripStatusLabel3.Text = Settings.Default.DefaultPrinter; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Assembly asm = Assembly.GetExecutingAssembly(); AssemblyName asmName = asm.GetName(); EViewMethods.eviewVersion = asmName.Version.ToString(); radioPartInfo.Checked = true; disableAllSearch(); EViewMethods.userName = Environment.UserName; EViewMethods.openConnection(); mySplash.Progress++; EViewMethods.loadFavorites(listFavorites); mySplash.Close(); mySplash.Dispose(); this.Show(); this.ActiveControl = comboEntry; }

    Read the article

  • jquery filter .not()

    - by FFish
    I have a form with image thumbnails to select with checkboxes for downloading. I want an array with the images in jQuery for an Ajax call. 2 questions: - On the top of the table there is a checkbox to toggle all checkboxes that I want to exclude from the mapping. I had a look at jQuery's .not() but I can't implement it with the :checkbox selector - is the following example code correct? $(document).ready(function() { $('#myform').submit(function() { var images = $("input:checkbox", this).map(function() { return $(this).attr("name"); }).get().join(); alert(products); // outputs: ",check1,check2,check3" return false; // cancel submit action by returning false }); }); // end doc ready HTML: <form id="myform" action="" > <input type="checkbox" id="toggleCheck" onclick="toggleSelectAll()" checked="checked" ><br /> <input type="checkbox" name="001.jpg" checked="checked" /><br /> <input type="checkbox" name="002.jpg" checked="checked" /><br /> <input type="checkbox" name="003.jpg" checked="checked" /><br /> <br /> <input type="submit" value="download" > </form>

    Read the article

  • jquery checkbox and array help

    - by sea_1987
    Hi There I need to get the names and values of checkboxes that have been checked into an array name selected, I cannot for life of me get it working, below is my attempt, if someone could clrify what I am doing wrong that would be brilliant. //Location AJAX //var dataObject = new Object(); var selected = new Array(); $('#areas input.radio').change(function(){ // will trigger when the checked status changes var checked = $(this).attr("checked"); // will return "checked" or false I think. // Do whatever request you like with the checked status if(checked == true) { /*$("input:checked").each(function() { selected.push($(this).attr('name')+"="+$(this).val(); }); alert(selected)*/ getQuery = $(this).attr('name')+"="+$(this).val()+"&location_submit=Next"; $.ajax({ type:"POST", url:"/search/location", data: getQuery, success:function(data){ alert(getQuery); console.log(data); // $('body.secEmp').html(data); } }); } else { //do something to remove the content here alert("Remove"); } });

    Read the article

  • return false is not working in my submit click

    - by kumar
    Hello friends. this is the code i am using for my Html.BeginForm.. $('#PbtnSubmit').click(function() { $('#PricingEditExceptions input[name=PMchk]').each(function() { if ($("#PricingEditExceptions input:checkbox:checked").length > 0) { var checked = $('#PricingEditExceptions input[type=checkbox]:checked'); var PMstrIDs = checked.map(function() { return $(this).val(); }).get().join(','); $('#1_exceptiontypes').attr('value', exceptiontypes) $('#1_PMstrIDs').attr('value', PMstrIDs); } else { alert("Please select atleast one exception"); return false; } }); }); in else blcok my return false is not working after alert mesage also its going to my controler? thanks is this right? i tried like this $('#PbtnSubmit').click(function() { $('#PricingEditExceptions input[name=PMchk]').each(function() { if ($("#PricingEditExceptions input:checkbox:checked").length > 0) { var checked = $('#PricingEditExceptions input[type=checkbox]:checked'); var PMstrIDs = checked.map(function() { return $(this).val(); }).get().join(','); $('#1_exceptiontypes').attr('value', exceptiontypes) $('#1_PMstrIDs').attr('value', PMstrIDs); } else { alert("Please select atleast one exception"); } }); return false; }); if i do like this on submit its doing nothing.. thanks

    Read the article

  • A quiz with results

    - by Keon Davies
    I'm currently working on programming a quiz withe results. I've tried this: <html> <body> <h1></h1> <form> <ol> <li> How much are you willing to spend on a phone per month?</li> <ul> <li><input type = "radio" name = "q1" id="q1_1"> £5-£10.</input></li> <li><input type = "radio" name = "q1" id="q1_2"> £10-£15.</input></li> <li><input type = "radio" name = "q1" id="q1_3"> £15-£20.</input></li> <li><input type = "radio" name = "q1" id="q1_4"> £20-£25.</input></li> <li><input type = "radio" name = "q1" id="q1_5"> £25-£30.</input></li> <li><input type = "radio" name = "q1" id="q1_6"> £30-£35.</input></li> <li><input type = "radio" name = "q1" id="q1_7"> £35-£40.</input></li> </ul> <li> Are you good with technology</li> <ul> <li><input type = "radio" name = "q2" id="q2_1"> Yes.</input></li> <li><input type = "radio" name = "q2" id="q2_2"> No.</input></li> </ul> <li> Are you looking for an easy to use phone</li> <ul> <li><input type = "radio" name = "q3" id="q3_1"> Yes.</input></li> <li><input type = "radio" name = "q3" id="q3_2"> No.</input></li> </ul> <li> Are you looking for a modern type of phone?</li> <ul> <li><input type = "radio" name = "q4" id="q4_1"> Yes.</input></li> <li><input type = "radio" name = "q4" id="q4_2"> No.</input></li> </ul> <li> How big do you want the phone to be?</li> <ul> <li><input type = "radio" name = "q5" id="q5_1"> Big.</input></li> <li><input type = "radio" name = "q5" id="q5_2"> Medium.</input></li> <li><input type = "radio" name = "q5" id="q5_3"> Small.</input></li> <li><input type = "radio" name = "q5" id="q5_4"> I don't really mind.</input></li> </ul> <li> Do you care about the colour of the phone?</li> <ul> <li><input type = "radio" name = "q6" id="q6_1"> Yes.</input></li> <li><input type = "radio" name = "q6" id="q6_2"> No.</input></li> </ul> <li> Have you ever owned a phone before?</li> <ul> <li><input type = "radio" name = "q7" id="q7_1"> Yes.</input></li> <li><input type = "radio" name = "q7" id="q7_2"> No.</input></li> </ul> <li> Do you want to be able to use the phone to get out of awkward social situations?</li> <ul> <li><input type = "radio" name = "q8" id="q8_1"> Yes.</input></li> <li><input type = "radio" name = "q8" id="q8_2"> No.</input></li> </ul> <li> Do you want to be able to access the app store and download apps using your phone?</li> <ul> <li><input type = "radio" name = "q9" id="q9_1"> Yes.</input></li> <li><input type = "radio" name = "q9" id="q9_2"> No.</input></li> </ul> <li> What happened to the last phone you owned?</li> <ul> <li><input type = "radio" name = "q10" id="q10_1"> I got bored of it.</input></li> <li><input type = "radio" name = "q10" id="q10_2"> It broke.</input></li> <li><input type = "radio" name = "q10" id="q10_3"> The contract ran out.</input></li> <li><input type = "radio" name = "q10" id="q10_4"> Other.</input></li> </ul> </ol> <input type = "button" value = "Submit" onclick="getResults()"> <input type = "reset" value = "Clear"></input> <textarea id="result">The right phone for you will be displayed here.</textarea> </html> <script> function getResults() { if (document.getElementById('q1_1').checked && document.getElementById('q2_1').checked && document.getElementById('q3_1').checked && document.getElementById('q4_1').checked && document.getElementById('q5_1').checked && document.getElementById('q6_1').checked && document.getElementById('q7_1').checked && document.getElementById('q8_1').checked && document.getElementById('q9_1').checked && document.getElementById('q10_1').checked ) { document.getElementById('result').innerHTML = 'Unfortunately, the iPhone is the right phone for you.'; } } </script> </body> But it's just too long winded. Is there any other ways I can design a quiz like this but without having to write a block of code for each radio button?

    Read the article

  • FTPS connection stalled on TLS initialization?

    - by sightofnick
    Hello, I am very good with an HTTP server, but I am new to FTP. I'm trying to configure a FTPS connection and I have listen set to port 990. But FileZilla client connection always hangs up on TLS initialization and then times out. Any suggestions on configuration? This is my current FTPS config: Enable FTP over SSL/TLS support (FTPS) - Checked Allow explicit FTP over TLS - Checked Disallow plain unencrypted FTP - Checked Force PROT P to encrypt file transfers in SSL/TLS mode - Checked

    Read the article

  • Better way to "find parent" and if statements

    - by Luke Abell
    I can't figure out why this isn't working: $(document).ready(function() { if ($('.checkarea.unchecked').length) { $(this).parent().parent().parent().parent().parent().parent().parent().removeClass('checked').addClass('unchecked'); } else { $(this).parent().parent().parent().parent().parent().parent().parent().removeClass('unchecked').addClass('checked'); } }); Here's a screenshot of the HTML structure: http://cloud.lukeabell.com/JV9N (Updated with correct screenshot) Also, there has to be a better way to find the parent of the item (there are multiple of these elements on the page, so I need it to only effect the one that is unchecked) Here's some other code that is involved that might be important: $('.toggle-open-area').click(function() { if($(this).parent().parent().parent().parent().parent().parent().parent().hasClass('open')) { $(this).parent().parent().parent().parent().parent().parent().parent().removeClass('open').addClass('closed'); } else { $(this).parent().parent().parent().parent().parent().parent().parent().removeClass('closed').addClass('open'); } }); $('.checkarea').click(function() { if($(this).hasClass('unchecked')) { $(this).removeClass('unchecked').addClass('checked'); $(this).parent().parent().parent().parent().parent().parent().parent().removeClass('open').addClass('closed'); } else { $(this).removeClass('checked').addClass('unchecked'); $(this).parent().parent().parent().parent().parent().parent().parent().removeClass('closed').addClass('open'); } }); (Very open to improvements for that section as well) Thank you so much! Here's a link to where this is all happening: http://linkedin.guidemytech.com/sign-up-for-linkedin-step-2-set-up-linkedin-student/ Update: I've improved the code from the comments, but still having issues with that first section not working. $(document).ready(function() { if ($('.checkarea.unchecked').length) { $(this).parents('.whole-step').removeClass('checked').addClass('unchecked'); } else { $(this).parents('.whole-step').removeClass('unchecked').addClass('checked'); } }); -- $('.toggle-open-area').click(function() { if($(this).parent().parent().parent().parent().parent().parent().parent().hasClass('open')) { $(this).parents('.whole-step').removeClass('open').addClass('closed'); } else { $(this).parents('.whole-step').removeClass('closed').addClass('open'); } }); $('.toggle-open-area').click(function() { $(this).toggleClass('unchecked checked'); $(this).closest(selector).toggleClass('open closed'); }); $('.checkarea').click(function() { if($(this).hasClass('unchecked')) { $(this).removeClass('unchecked').addClass('checked'); $(this).parent().parent().parent().parent().parent().parent().parent().removeClass('open').addClass('closed'); } else { $(this).removeClass('checked').addClass('unchecked'); $(this).parent().parent().parent().parent().parent().parent().parent().removeClass('closed').addClass('open'); } });

    Read the article

  • jquery checkbox help

    - by sea_1987
    The Problem I am trying to run some ajax on one my pages for my website, basically I have three checkboxes all of which on pageload are unselected, when a checkbox is clicked I need to be able load in via ajax the relevant HTML. This system is currently a PHP script that depending on what the POST is set returns a different view, so I think all I need to is send the POST via AJAX, but I need to do everytime a new checkbox is checked. My HTML looks like this, div class="segment"> <div class="label"> <label>Choose region: </label> </div> <div class="column w190"> <div class="segment"> <div class="input"> <input type="checkbox" checked="checked" class="radio checked" value="Y" name="area[Nationwide]" id="inp_Nationwide"> </div> <div class="label "> <label for="inp_Nationwide">Nationwide</label> </div> <div class="s">&nbsp;</div> </div> </div> <div class="column w190"> <div class="segment"> <div class="input"> <input type="checkbox" checked="checked" class="radio checked" value="Y" name="area[Lancashire]" id="inp_Lancashire"> </div> <div class="label "> <label for="inp_Lancashire">Lancashire</label> </div> <div class="s">&nbsp;</div> </div> </div> <div class="column w190"> <div class="segment"> <div class="input"> <input type="checkbox" checked="checked" class="radio" value="Y" name="area[West_Yorkshire]" id="inp_West_Yorkshire"> </div> <div class="label "> <label for="inp_West_Yorkshire">West Yorkshire</label> </div> <div class="s">&nbsp;</div> </div> <div class="s">&nbsp;</div> </div> </div> My current attempt was to ascertain whether the input has been clicked so I have done this with my javascript, though this is probably wrong, $('input.radio').click(function(){ if($(this).hasClass('clicked')) { $(this).removeClass('clicked'); } else { $(this).addClass('clicked'); } });

    Read the article

  • Do we need to differntiate anything for this in IE8?

    - by kumar
    I have this code in my application var checked = $('#fieldset input[type=checkbox]:checked'); var ids= checked.map(function() { return $(this).val(); }).get().join(','); in firefox I am getting all the checked Ids something like this.. 123,234,443.. but same code in IE8 its showing only first Id not all checked id's even its checked? Even if I uncheck the first checkbox if I check second checkbox second checkbox value showing as null? can anybody help me out? thanks

    Read the article

  • Jquery: Handling Checkbox Click Event with JQuery

    - by wcolbert
    I can't figure out what is going on here. I have some nested lists of checkboxes that I would like to check when the parent is checked. More importantly, I can't even get the alert to show up. It's as if the click event is not firing. Any ideas? $(document).ready(function() { $("#part_mapper_list input[type=checkbox]").click(function(){ alert("clicked"); if ($(this).attr("checked") == "checked"){ $(this + " input").attr("checked") = "checked"; } else { $(this + " input").attr("checked") = ""; } }); }

    Read the article

  • Create an Asp.net Gridview with Checkbox in each row

    - by ybbest
    One of the frequent requirements for Asp.net Gridview is to add a checkbox for each row and a checkbox to select all the items like the Gridview below. This can be easily achieved by using jQuery. You can find the complete source doe here. $(document).ready(function () { $(‘input[name$="CDSelectAll"]‘).click(function () { if ($(this).attr(“checked”)) { $(‘input[name$="CDSelect"]‘).attr(‘checked’, ‘checked’); } else { $(‘input[name$="CDSelect"]‘).removeAttr(‘checked’); } }); });

    Read the article

  • how this code works and how to modify this code to get my desrire work? [closed]

    - by imon_bayazid
    I dont understand how these code works here : m_MouseHookManager.MouseDoubleClick+=HookManager_MouseDoubleClick; m_MouseHookManager.MouseDoubleClick -= HookManager_MouseDoubleClick; m_KeyboardHookManager.KeyPress +=HookManager_KeyPress; m_KeyboardHookManager.KeyPress -=HookManager_KeyPress; My full Code is here : using System; using System.Windows.Forms; using MouseKeyboardActivityMonitor.WinApi; namespace MouseKeyboardActivityMonitor.Demo { public partial class TestFormHookListeners : Form { private readonly KeyboardHookListener m_KeyboardHookManager; private readonly MouseHookListener m_MouseHookManager; public TestFormHookListeners() { InitializeComponent(); m_KeyboardHookManager = new KeyboardHookListener(new GlobalHooker()); // Hooks are not active after instantiation. You need to use either Enabled property or call Start()()()() method m_KeyboardHookManager.Enabled = true;//True - The Hook is presently installed, activated, and will fire events. m_MouseHookManager = new MouseHookListener(new GlobalHooker()); m_MouseHookManager.Enabled = true; } #region Check boxes to set or remove particular event handlers. private void checkBoxMouseDoubleClick_CheckedChanged(object sender, EventArgs e) { if (checkBoxMouseDoubleClick.Checked) { m_MouseHookManager.MouseDoubleClick += HookManager_MouseDoubleClick; } else { m_MouseHookManager.MouseDoubleClick -= HookManager_MouseDoubleClick; } } private void checkBoxKeyPress_CheckedChanged(object sender, EventArgs e) { if (checkBoxKeyPress.Checked) { m_KeyboardHookManager.KeyPress +=HookManager_KeyPress; } else { m_KeyboardHookManager.KeyPress -=HookManager_KeyPress; } } #endregion #region Event handlers of particular events. They will be activated when an appropriate checkbox is checked. private void HookManager_KeyPress(object sender, KeyPressEventArgs e) { Log(string.Format("KeyPress \t\t {0}\n", e.KeyChar)); } private void HookManager_MouseDoubleClick(object sender, MouseEventArgs e) { Log(string.Format("MouseDoubleClick \t\t {0}\n", e.Button)); } private void Log(string text) { textBoxLog.AppendText(text); textBoxLog.ScrollToCaret(); } #endregion private void checkBoxEnabled_CheckedChanged(object sender, EventArgs e) { m_MouseHookManager.Enabled = checkBoxEnabled.Checked; m_KeyboardHookManager.Enabled = checkBoxEnabled.Checked; } private void radioHooksType_CheckedChanged(object sender, EventArgs e) { Hooker hook; if (radioApplication.Checked) { hook = new AppHooker();//Provides methods for subscription and unsubscription to application mouse and keyboard hooks. } else { hook = new GlobalHooker();//Provides methods for subscription and unsubscription to global mouse and keyboard hooks. } m_KeyboardHookManager.Replace(hook); m_MouseHookManager.Replace(hook);//hook->An AppHooker or GlobalHooker object. //Enables you to switch from application hooks to global hooks //and vice versa on the fly without unsubscribing from events. //Component remains enabled or disabled state after this call as it was before. //Declaration Syntax } private void HookManager_Supress(object sender, MouseEventExtArgs e) { if (e.Button != MouseButtons.Right) { return; } Log("Suppressed.\n"); e.Handled = true; } } } Can anybody help to understand that??? I want by this that whenever a F5 key-pressed my application will be active and then it checks if double-click happen it gives a message .... **How can i modify that.....??????**

    Read the article

  • System Slow After Uprading Ubuntu

    - by Aragon N
    i have an ubuntu network machine which has release of 10.04.1 LTS Lucid. on this system i have apache, postgresql and django. for some app. development i have to install php and php-curl... due to being on network, i have exported wmvare machine to internet and firstly i have upgraded system and then install php5 packages on it. After all replacing it with its old place, i have considered that the new system query is some slow according to another. Old system query time : 140 ms New system query time : 9.11 s i have checked /etc/network interface and it seems there is no problem. i have checked /etc/resolv.conf and it seems ok i have checked /etc/nsswitch.conf and only host section is different from old one which old system has hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 and then i have checked time host -t A services.myapp.com and i got real 0m0.355s user 0m0.010s sys 0m0.020s and now what can i have to check for boosting my system as before?

    Read the article

  • Is there any CSS selector to reach an element outside of the current container?

    - by acidrums4
    (And excuse me for my bad english, for starters...) Sorry if this is a noob question, but I really don't know if the following is possible. I'm doing a html5 portfolio. I'm following a tuto from codrops to visually filter works with only css3 (http://tympanus.net/codrops/2012/01/09/filter-functionality-with-css3/). There, user can select which category want to see with some <input type="radio">'s. But those selectors are under the same container (a <section>) and give visibility for the elements via CSS using a general sibling combinator (~). So in that example, the CSS code goes like this: .ff-container input.ff-selector-type-all:checked ~ label.ff-label-type-all, .ff-container input.ff-selector-type-1:checked ~ label.ff-label-type-1, .ff-container input.ff-selector-type-2:checked ~ label.ff-label-type-2, .ff-container input.ff-selector-type-3:checked ~ label.ff-label-type-3{ background: linear-gradient(top, #646d93 0%,#7c87ad 100%); color: #424d71; text-shadow: 0px 1px 1px rgba(255,255,255,0.3); box-shadow: 0px 0px 0px 1px #40496e, 0 1px 2px rgba(0,0,0,0.1) inset; } The thing is I want to put those <input type="radio">'s on the <head> section of my portfolio, but obviously the ~ selector won't work there. So my question is that is there any selector, hack or something that can do that? Something like .ff-container input.ff-selector-type-all:checked $ header > label.ff-label-type-all { awesomeness:100%; } I really don't want to use Javascript/Jquery for that... Thank you so much in advance!

    Read the article

  • ASP.Net RadioButton loses ViewState

    - by Carl
    I'm having trouble with a simple radio set of two radio buttons (I don't want to use a RadioButtonList [RBL] because RBL doesn't allow child controls, and in my case, if you select one option, I want to enable a textbox next to the button; yes you could hack this with jQuery to move the textbox, but that's dirty!). I would check one, submit the form (either explicitly or through AutoPostBack), and the CheckedChanged event would never fire. When the page was reloaded, both buttons would be unchecked, regardless of their initial state on non-postback load or the state before form submission. I took out the checkbox and stripped this down to the simplest example I could come up with. I tossed EnableViewState=true all over the place just in case it was being disabled somewhere I couldn't find. <form id="form1" runat="server" enableviewstate="true"> <div> <asp:RadioButton ID="foo" Text="foo" runat="server" AutoPostBack="true" OnCheckedChanged="rbChanged" Checked="true" GroupName="foobar" EnableViewState="true" /> <asp:RadioButton ID="bar" Text="bar" runat="server" AutoPostBack="true" GroupName="foobar" OnCheckedChanged="rbChanged" Checked="false" EnableViewState="true" /> <asp:Label runat="server" ID="resultLbl" /> </div> </form> protected void rbChanged(object sender, EventArgs e) { if (foo.Checked) resultLbl.Text = "foo is checked"; else if (bar.Checked) resultLbl.Text = "bar is checked"; else resultLbl.Text = "neither is checked"; }

    Read the article

  • c# ListView unable to check a checkbox! Strange problem.

    - by Kurt
    This is a strange problem, I've not added much code as I don't know were to start. I have a listview control in virtual mode, if I filter the listview to show me all people called John, I then see 3 users called John, I then cancel the filter setting all values to null and return all data to the listview, I now have several hundred items in the list but I can only see 30 on screen unless I scroll down the listview. I then use the code below to check a checkbox in each row, all get checked apart from the 3 Johns but if I can see 1 of the 3 Johns in listview without scrolling and then run the code below the visible John is checked. for (int i = 0; i < this._items.Count; i++) { this._items[i].Checked = true; } I have checked the status of the checkbox just before it is checked in the above code and if John is visible then the checkbox believes it is unchecked (false), if it is not visible it belives it is checked (true). So having one visible John on screen the checkbox looks unchecked and running a test proves it is unchecked, for the two Johns I can't see they believe they are checked but if I scroll down so I can see them they aren't. Any ideas? Thanks

    Read the article

  • My AJAX is only firing once,

    - by sea_1987
    Hi There, I ahave some ajax that is fired when a checkbox is clicked, it essentially sends a query string to a PHP script and then returns the relevant HTML, however, if I select a select it works fine if I then slect another checkbox as well as the previous I get no activity what so ever, not even any errors in firebug, it is very curious, does anyone have any ideas? //Location AJAX //var dataObject = new Object(); var selected = new Array(); //alert(selected); $('#areas input.radio').change(function(){ // will trigger when the checked status changes var checked = $(this).attr("checked"); // will return "checked" or false I think. // Do whatever request you like with the checked status if(checked == true) { //selected.join('&'); selected = $('input:checked').map(function() { return $(this).attr('name')+"="+$(this).val(); }).get(); getQuery = selected.join('&')+"&location_submit=Next"; alert(getQuery); $.ajax({ type:"POST", url:"/search/location", data: getQuery, success:function(data){ //alert(getQuery); //console.log(data); $('body.secEmp').html(data); } }); } else { //do something to remove the content here alert($(this).attr('name')); } });

    Read the article

  • Having trouble adding jquery to charisma

    - by kira423
    I am trying to add some jquery to this Charisma admin panel and have been having nothing but trouble. I am trying to add it to the charisma.js file. This is what I am adding // add multiple select / deselect functionality $("#selectall").click(function () { $('.checkbox').attr('checked', this.checked); }); // if all checkbox are selected, check the selectall checkbox // and viceversa $(".checkbox").click(function(){ if($(".checkbox").length == $(".checkbox:checked").length) { $("#selectall").attr("checked", "checked"); } else { $("#selectall").removeAttr("checked"); } }); I have tried this code wrapped in the anonymous $(function(){ as well as without, and I have inserted it into both $(document).ready(function(){ and docReady() as well as in the head of my code but I am not really "trained" on jquery so I am a bit lost as to what I am doing wrong. My class and div tags are correct for the code, as I have checked them several times for misspellings. I am not sure what I am doing wrong. Is there a better "check" all code I can use here, or am I just putting this all in the wrong place? UPDATE: I think the actual code may be working, I cannot tell, after I click the select all box it seems that I have to click the other boxes 3 times to get the check mark back into the box, so it seems like it is having trouble actually showing that the box is marked. This may be a problem with styling, but I don't know how to correct it.

    Read the article

  • jQuery show based on checkbox value at page load.

    - by Jacob Huggart
    I have an ASP MVC web app and on one of the pages there is a set of Main checkboxes with sub-checkboxes underneath them. The sub-checkboxes should only show up when the corresponding main checkbox is checked. I have the following code that works just fine as long as none of the checkboxes are checked when the page loads. $("input[id$=Suffix]").change(function() { prefix = this.id; if (!$(this).hasClass("checked")) { $("tr[id^=" + prefix + "]").show(); $(this).addClass("checked"); } else { $("tr[id^=" + prefix + "]").hide(); $(this).removeClass("checked"); } }); Now I need to check a database for the values of the main checkboxes. I get the values, and can check the boxes on page load. But when the page comes up, the sub-checkboxes are not displayed when the main checkbox is checked. Also, if the main checkbox is checked when the page loads, the sub-checkboxes are only displayed when the main chcekbox is unchecked (obviously because the above function only acts on .change()). What do you all suggest I try? If you need further explanation feel free to ask. edit: btw, all of this is in $(document).ready()

    Read the article

  • Javascript hide/show classes with checkbox

    - by Christina
    I am just learning javascript, so please bear with me! I want to be able to use checkboxes to choose to hide/show div classes (to basically filter the amount of info being shown). It is done in this... but I'm try to figure out something much simpler (since I don't need to dynamically generate the checkbox options.) I came across this example: The Javascript: function showMe (it, box) { var vis = (box.checked) ? "block" : "none"; document.getElementById(it).style.display = vis; } The HTML <form> <input type="checkbox" checked="checked" value="value1" onclick="showMe('div1', this)" />value1 <input type="checkbox" checked="checked" value="value2" onclick="showMe('div2', this)" />value2 <input type="checkbox" checked="checked" value="value3" onclick="showMe('div3', this)" />value3 </form> <div id="div1" style="display:block">Show Div 1</div> <div id="div2" style="display:block">Show Div 2</div> <div id="div3" style="display:block">Show Div 3</div> </body> </html> But it only works for div ids, not classes. Any idea on how I can work this? Thanks in advance if you can help me out!

    Read the article

  • jQuery re-checking check boxes

    - by Jacob
    Hi, I having problems with re-checking some checkboxes after and ajax call updates a table. I have a table of what the project calls 'shares'. I want to: 1) check for and save any checked shares to an array 2) Do my ajax call to update the table of shares 3) Re-check any there we checked before the ajax update. My code is not working and I can't see why? Any tips, help or advise much appreciated. // Array to hold our checked share ids var savedShareIDs = new Array(); // Add checked share ids into array $("input:checkbox[name=share_ids]:checked").each(function() { savedShareIDs.push($(this).val()); }); // Do ajax update Dajaxice.pagination_shares('Dajax.process',{'id':1, 'page':1}) // Re-check any that were checked before ajax update $("input:checkbox[name=share_ids]").each(function() { if ( $.inArray( $(this).val(), savedShareIDs) > -1 ) { $(this).attr('checked',true) } }); The problem is the checkboxes are not checking. I'm pretty sure the loop is working and the inArray check works. Just not checking the checkboxes. Can anyone see where I'm going wrong? Thanks.

    Read the article

  • HTML + javascript mouse over, mouseout, onclick not working in firefox.

    - by help_inmssql
    Hello Everyone, My question is to get onMouseover,onMouseout,onMousedown,onClick on a table row. For which i am calling javascript userdefined functions. onMouseover --- Background color should change. onMouseout --- Reset to original color onClick --- First column checkbox/radio button should be set and background color should change onMousedown --- background color should change. My code in html is:- <tr onMouseOver="hover(this)" onMouseOut="hover_out(this)" onMouseDown="get_first_state(this)" onClick="checkit(this)" > and the methods in javascripts are:- var first_state = false; var oldcol = '#ffffff'; var oldcol_cellarray = new Array(); function hover(element) { if (! element) element = this; while (element.tagName != 'TR') { element = element.parentNode; } if (element.style.fontWeight != 'bold') { for (var i = 0; i<element.cells.length; i++) { if (element.cells[i].className != "no_hover") { oldcol_cellarray[i] = element.cells[i].style.backgroundColor; element.cells[i].style.backgroundColor='#e6f6f6'; } } } } // ----------------------------------------------------------------------------------------------- function hover_out(element) { if (! element) element = this; while (element.tagName != 'TR') { element = element.parentNode; } if (element.style.fontWeight != 'bold') { for (var i = 0; i<element.cells.length; i++) { if (element.cells[i].className != "no_hover") { if (typeof oldcol_cellarray != undefined) { element.cells[i].style.backgroundColor=oldcol_cellarray[i]; } else { element.cells[i].style.backgroundColor='#ffffff'; } //var oldcol_cellarray = new Array(); } } } } // ----------------------------------------------------------------------------------------------- function get_first_state(element) { while (element.tagName != 'TR') { element = element.parentNode; } first_state = element.cells[0].firstChild.checked; } // ----------------------------------------------------------------------------------------------- function checkit (element) { while (element.tagName != 'TR') { element = element.parentNode; } if (element.cells[0].firstChild.type == 'radio') { var typ = 0; } else if (element.cells[0].firstChild.type == 'checkbox') { typ = 1; } if (element.cells[0].firstChild.checked == true && typ == 1) { if (element.cells[0].firstChild.checked == first_state) { element.cells[0].firstChild.checked = false; } set_rowstyle(element, element.cells[0].firstChild.checked); } else { if (typ == 0 || element.cells[0].firstChild.checked == first_state) { element.cells[0].firstChild.checked = true; } set_rowstyle(element, element.cells[0].firstChild.checked); } if (typ == 0) { var table = element.parentNode; if (table.tagName != "TABLE") { table = table.parentNode; } if (table.tagName == "TABLE") { table=table.tBodies[0].rows; //var table = document.getElementById("js_tb").tBodies[0].rows; for (var i = 1; i< table.length; i++) { if (table[i].cells[0].firstChild.checked == true && table[i] != element) { table[i].cells[0].firstChild.checked = false; } if (table[i].cells[0].firstChild.checked == false) { set_rowstyle(table[i], false); } } } } } function set_rowstyle(r, on) { if (on == true) { for (var i =0; i < r.cells.length; i++) { r.style.fontWeight = 'bold'; r.cells[i].style.backgroundColor = '#f2f2c2'; } } else { for ( i =0; i < r.cells.length; i++) { r.style.fontWeight = 'normal'; r.cells[i].style.backgroundColor = '#ffffff'; } } } It is working as expected in IE. But coming to firefox i am surprised on seeing the output after so much of coding. In Firefox:-- onMouseOver is working as expected. color change of that particular row. onClick -- Setting the background color permenantly..eventhough i do onmouseover on different rows. the clicked row color is not reset to white. -- not as expected onclick on 2 rows..the background of both the rows is set...not as expected i.e if i click on all the rows..background color of everything is changed... Eventhough i click on the row. First column i.e radio button or checkbox is not set.. Please help me to solve this issue in firefox. Do let me know where my code needs to be changed... Thanks in advance!!

    Read the article

  • HTML + javascript mouse over, mouseout, onclick not working in firefox.

    - by lucky
    Hello Everyone, My question is to get onMouseover,onMouseout,onMousedown,onClick on a table row. For which i am calling javascript userdefined functions. onMouseover --- Background color should change. onMouseout --- Reset to original color onClick --- First column checkbox/radio button should be set and background color should change onMousedown --- background color should change. My code in html is:- <tr onMouseOver="hover(this)" onMouseOut="hover_out(this)" onMouseDown="get_first_state(this)" onClick="checkit(this)" > and the methods in javascripts are:- var first_state = false; var oldcol = '#ffffff'; var oldcol_cellarray = new Array(); function hover(element) { if (! element) element = this; while (element.tagName != 'TR') { element = element.parentNode; } if (element.style.fontWeight != 'bold') { for (var i = 0; i<element.cells.length; i++) { if (element.cells[i].className != "no_hover") { oldcol_cellarray[i] = element.cells[i].style.backgroundColor; element.cells[i].style.backgroundColor='#e6f6f6'; } } } } // ----------------------------------------------------------------------------------------------- function hover_out(element) { if (! element) element = this; while (element.tagName != 'TR') { element = element.parentNode; } if (element.style.fontWeight != 'bold') { for (var i = 0; i<element.cells.length; i++) { if (element.cells[i].className != "no_hover") { if (typeof oldcol_cellarray != undefined) { element.cells[i].style.backgroundColor=oldcol_cellarray[i]; } else { element.cells[i].style.backgroundColor='#ffffff'; } //var oldcol_cellarray = new Array(); } } } } // ----------------------------------------------------------------------------------------------- function get_first_state(element) { while (element.tagName != 'TR') { element = element.parentNode; } first_state = element.cells[0].firstChild.checked; } // ----------------------------------------------------------------------------------------------- function checkit (element) { while (element.tagName != 'TR') { element = element.parentNode; } if (element.cells[0].firstChild.type == 'radio') { var typ = 0; } else if (element.cells[0].firstChild.type == 'checkbox') { typ = 1; } if (element.cells[0].firstChild.checked == true && typ == 1) { if (element.cells[0].firstChild.checked == first_state) { element.cells[0].firstChild.checked = false; } set_rowstyle(element, element.cells[0].firstChild.checked); } else { if (typ == 0 || element.cells[0].firstChild.checked == first_state) { element.cells[0].firstChild.checked = true; } set_rowstyle(element, element.cells[0].firstChild.checked); } if (typ == 0) { var table = element.parentNode; if (table.tagName != "TABLE") { table = table.parentNode; } if (table.tagName == "TABLE") { table=table.tBodies[0].rows; //var table = document.getElementById("js_tb").tBodies[0].rows; for (var i = 1; i< table.length; i++) { if (table[i].cells[0].firstChild.checked == true && table[i] != element) { table[i].cells[0].firstChild.checked = false; } if (table[i].cells[0].firstChild.checked == false) { set_rowstyle(table[i], false); } } } } } function set_rowstyle(r, on) { if (on == true) { for (var i =0; i < r.cells.length; i++) { r.style.fontWeight = 'bold'; r.cells[i].style.backgroundColor = '#f2f2c2'; } } else { for ( i =0; i < r.cells.length; i++) { r.style.fontWeight = 'normal'; r.cells[i].style.backgroundColor = '#ffffff'; } } } It is working as expected in IE. But coming to firefox i am surprised on seeing the output after so much of coding. In Firefox:-- onMouseOver is working as expected. color change of that particular row. onClick -- Setting the background color permenantly..eventhough i do onmouseover on different rows. the clicked previous row color is not reset to white. -- not as expected onclick on 2 rows..the background of both the rows is set..Only the latest row color should be set. other rows that are selected before should be set back..not as expected i.e if i click on all the rows..background color of everything is changed... Eventhough i click on the row. First column i.e radio button or checkbox is not set.. Please help me to solve this issue in firefox. Do let me know where my code needs to be changed... Thanks in advance!!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >