Search Results

Search found 45193 results on 1808 pages for 'select call'.

Page 35/1808 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • How do i call a MouseDoubleClick event? WinForm

    - by acidzombie24
    In my MouseDoubleClick i may run into a case where i would like to call all the controls in a list with MouseDoubleClick. However i cant call MouseDoubleClick, only add/remove events to the chain. How do i call MouseDoubleClick/OnMouseDoubleClick? ATM i workaround the problem since i know the objects MouseDoubleClick function and i pass in the parameters myself calling that specific function. How do i call the event in the case i do not know what function is set to the control MouseDoubleClick

    Read the article

  • How to Unselect The Field in select Query using sql

    - by raam
    hi in my database i am store more than 50 field with primarykey (Auto increment) i am not sure about the fields name but i wants to select the entire data in that table , i am using SELECT * FROM tablename i want to select all the fields except that ID but this query populate the entire table so is there is possible to unselect the particular field in the select query. Can anyone have an idea please guide me. Thanks in Advance

    Read the article

  • Autopopulate from Select box from database

    - by Chris Spalton
    hope you can help, please forgive any poor coding or anytihng, I'm new to this and just hacking my way through to get things to work. That said, on one of my projects I have this code, which successfully populates the dropdown from a database when the page is loaded: <select name="Region" id="Region"> <option value="">-- Select Region --</option> <?php $region=$POST['Region']; if ($region); { $regionquery = "SELECT DISTINCT REGION FROM Sales_Execs "; $regionresult = mysql_query($regionquery); while($row = mysql_fetch_array($regionresult)) { echo "<option value=\"".$row['REGION']."\">".$row['REGION']."</option>\n "; } } ?> <script type="text/javascript"> document.getElementById('Region').value = <?php echo json_encode(trim($_POST['Region']));?>; </script> </select> On my next project that I'm working on now, I need to do the same thing, so I copied the above code amended, and placed in my new project: <select name="Sales_Exec" id="Sales_Exec"> <option value="">-- Select SE --</option> <?php $salesexec=$POST['Sales_Exec']; if ($salesexec); { $salesexecquery = "SELECT DISTINCT Assigned FROM Data "; $salesexecresult = mysql_query($salesexecquery); while($row = mysql_fetch_array($salesexecresult)) { echo "<option value=\"".$row['ASSIGNED']."\">".$row['ASSIGNED']."</option>\n "; } } ?> <script type="text/javascript"> document.getElementById('Sales_Exec').value = <?php echo json_encode(trim($_POST['Sales_Exec']));?>; </script> </select> This second chunk of code doesn't work... and I can't work out why as it seems I've copied it all and amended all the neccersary parts, can anyone spot what is wrong? Thankyou!

    Read the article

  • Unable to call through asterisk

    - by sk
    I want to create a voip service. I have installed asterisk-1.4 on a dedicated remotely hosted debian lenny distro. I made a sip.conf and extensions.conf so as to place a call between two sip phones(i am using xlite 3.0) installed in some other Windows PC. Whenever i switch this phones the asterisk console shows that Registration from '"1000"<sip:[email protected]>' failed for '122.168.10.254' - Peer is not supposed to register Where xx.xx.xx.xx is the server's IP. i.e my sip phones are unable to register with the asterisk server. Please help me to place call between two sip phones #sip show peers Name/username Host Dyn Nat ACL Port Status 2000 (Unspecified) D 0 Unmonitored 1000 (Unspecified) D 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] # sip show registry Host Username Refresh State Reg.Time # sip show channels Peer User/ANR Call ID Seq (Tx/Rx) Format Hold Last Message 0 active SIP channels

    Read the article

  • Spawn phone call from EC2 alerts

    - by Matt
    I have a system setup on AWS/EC2, it currently is using their CloudWatch alert system. The problem is this sends just to email, when ideally I would like this to be making a phone call and/or sending text messages to certain phone numbers when an alert fires (Note that I do not need the phone call to actually say anything, just call the person). We are trying to solve the problem that Amazon alerts are only useful if people are checking their email, which isnt always the case because all server problems love to happen at 4am on saturday... Please respond with any possible solutions/ideas, ideally I do not want to implement an entire monitoring system (IE: Nagios) on top of everything to handle this.

    Read the article

  • asterisk incoming/miss call notification (to skype)

    - by tike
    My environment: Centos 5.6, Asterisk with freepbx , skype i.e.sends message with parameter skype.sh skype_user message. Now i wanted to send skype notification so that my asterisk server notification are sent to skype rather than email (or to both skype and email). I know, there is voicemail.conf, voicemail_general and vm_email.inc, which has these body created. vm_email.inc emailbody=${VM_NAME},\n\nThere is a new voicemail in mailbox ${VM_MAILBOX} But i dont see where is something like "mail" command. What my thought to do is: instead of saying "mailcmd" pass system ( /path/to/script) and it would simply send message as rest is already configured. Any suggestion where i could run script rather than sending email Or Executing script on every incoming call, so that i could send as notification on every call over the Skype. (however, ultimate goal is to achieve miss call notification or voice mail notification over Skype.)

    Read the article

  • InnerHTML IE 8 doesn't work properly? Resetting form.

    - by Craig Whitley
    Yeah this works in FF and Chrome, but for some reason wont work in IE 8. I'm using a radio button to clear a section of a form.. that section is a select box, but I don't want to leave the area empty - instead I want to reset it to what it was when the page loaded. At the moment IE8 is just leaving me with an empty small select box. Html: <select id="city_select" disabled="true" name="location_id" onchange="show_search_button();"><option selected>Select your city</option> </select> Javascript: document.getElementById('city_select').innerHTML = "<option selected>Select your city</option>"; I've also tried using location_id instead of city_select in the javascript but to no avail.. innerText and innerContent dont work either.. though the inner.HTML works in IE8 for an earlier function, but that isnt trying to innerHTML into a form. Does anybody know why this works in Chrome and FF but not IE8? and is there a solution to this? Any help appreciated thanks!

    Read the article

  • How to get max row from table

    - by Odette
    HI I have the following code and a massive problem: WITH CALC1 AS ( SELECT OTQUOT, OTIT01 AS ITEMS, ROUND(OQCQ01 * OVRC01,2) AS COST FROM @[email protected] WHERE OTIT01 <> '' UNION ALL SELECT OTQUOT, OTIT02 AS ITEMS, ROUND(OQCQ02 * OVRC02,2) AS COST FROM @[email protected] WHERE OTIT02 <> '' UNION ALL SELECT OTQUOT, OTIT03 AS ITEMS, ROUND(OQCQ03 * OVRC03,2) AS COST FROM @[email protected] WHERE OTIT03 <> '' UNION ALL SELECT OTQUOT, OTIT04 AS ITEMS, ROUND(OQCQ04 * OVRC04,2) AS COST FROM @[email protected] WHERE OTIT04 <> '' UNION ALL SELECT OTQUOT, OTIT05 AS ITEMS, ROUND(OQCQ05 * OVRC05,2) AS COST FROM @[email protected] WHERE OTIT05 <> '' ORDER BY OTQUOT ASC ) SELECT OTQUOT, ITEMS, MAX(COST) FROM CALC1 WHERE OTQUOT = '04886471' GROUP BY OTQUOT, ITEMS result: 04886471 FEPO5050WCGA24 13.21 04886471 GFRK1650SGL 36.21 04886471 FRA7500GA 12.6 04886471 CGIFESHAZ 11.02 04886471 CGIFESHPDPR 11.79 04886471 GFRK1350DBL 68.23 04886471 RET1.63825GP 32.55 04886471 FRSA 0.12 04886471 GFRK1350SGL 55.94 04886471 GFRK1650DBL 71.89 04886471 FEPO6565WCGA24 16.6 04886471 PCAP5050GA 0.28 04886471 FEPO6565NCPAG24 0.000000 How can I get the result of the row with the Itemcode that has the highest value? In this case I need the result: 04886471 GFRK1650DBL 71.89 but i dont know how to change my code to get that - can anybody please help me?

    Read the article

  • ruby on rails-Problem with the selection form helper

    - by winter sun
    Hello I have a form in witch users can add their working hours view them and edit them (All in one page). When adding working hours the user must select a project from a dropdown list. In case the action is adding a new hour record the dropdown field should remain empty (not selected) in case the action is edit the dropdown field should be selected with the appropriate value. In order to overcome this challenge I wrote the following code <% if params[:id].blank?%> <select name="hour[project_id]" id="hour_project_id"> <option value="nil">Select Project</option> <% @projects.each do|project|%> <option value="<%=project.id %>"><%=project.name%></option> <% end%> </select> <% else %> <%= select('hour','project_id', @projects.collect{|project|[project.name,project.id]},{:prompt => 'Select Project'})%> <% end %> So in case of save action I did the dropdown list only with html, and in case of edit action I did it with the collect method. It works fine until I tried to code the errors. The problem is that when I use the error method: validates_presence_of :project_id it didn't recognize it in the html form of the dropdown list and don’t display the error message (its working only for the dropdown with the collect method). I will deeply appreciate your instructions and help in this matter

    Read the article

  • JSP: Refresh ComboBox options

    - by framara
    Hi, There's a class 'Car' with brand and model as properties. I have a list of items of this class List<Car> myCars. I need to represent in a JSP website 2 ComboBox, one for brand and another for model, that when you select the brand, in the model list only appear the ones from that brand. I don't know how to do this in a dynamic way. Any suggestion where to start? Thanks Update Ok, what I do now is send in the request a list with all the brand names, and a list of the items. The JSP code is like: <select name="manufacturer" id="id_manufacturer" onchange="return getManufacturer();"> <option value=""></option> <c:forEach items="${manufacturers}" var="man"> <option value="${man}" >${man}</option> </c:forEach> </select> <select name="model" id="id_model"> <c:forEach items="${mycars}" var="car"> <c:if test="${car.manufacturer eq man_selected}"> <option value="${car.id}">${car.model}</option> </c:if> </c:forEach> </select> <script> function getManufacturer() { man_selected = document.getElementById('id_manufacturer').value; } </script> How do I do to refresh the 'model' select options according to the selected 'man_selected' ?

    Read the article

  • sql query selecting one name no matter how many rows it was mentioned in

    - by Baruch
    Basically what I'm trying to do is get the information from column x no matter how many times it was mentioned. means that if I have this kind of table: x | y | z ------+-------+-------- hello | one | bye hello | two | goodbye hi | three | see you so what I'm trying to do is create a query that would get all of the names that are mentions in the x column without duplicates and put it into a select list. my goal is that I would have a select list with TWO not THREE options, hello and hi this is what I have so far which isn't working. hope you guys know the answer to that: function getList(){ $options="<select id='names' style='margin-right:40px;'>"; $c_id = $_SESSION['id']; $sql="SELECT * FROM names"; $result=mysql_query($sql); $options.="<option value='blank'>-- Select something --</option>" ; while ($row=mysql_fetch_array($result)) { $name=$row["x"]; $options.="<option value='$name'>$name</option>"; } $options.= "</SELECT>"; return "$options"; } Sorry for confusing... i edited my source

    Read the article

  • Get content of a div

    - by Sergiu
    <select> <div class="options"> <option value="nothing">Nothing</option> <option value="snothing">Second Nothing</option> </div> </select> I want to get the content of the DIV and print it inside javascript in a selector. $(document).ready(function () { var options = $('.options').html(); . . . var content = '<select>' + options + '</select>'; . . . }); I need to take options from the HTML. I've created a div indise <select></select> tags, because I had no other idea. But it's not working! I tried to put the options var inside <p></p> tags so i can print it, it sais 'undefined'.

    Read the article

  • How does MySQL's ORDER BY RAND() work?

    - by Eugene
    Hi, I've been doing some research and testing on how to do fast random selection in MySQL. In the process I've faced some unexpected results and now I am not fully sure I know how ORDER BY RAND() really works. I always thought that when you do ORDER BY RAND() on the table, MySQL adds a new column to the table which is filled with random values, then it sorts data by that column and then e.g. you take the above value which got there randomly. I've done lots of googling and testing and finally found that the query Jay offers in his blog is indeed the fastest solution: SELECT * FROM Table T JOIN (SELECT CEIL(MAX(ID)*RAND()) AS ID FROM Table) AS x ON T.ID >= x.ID LIMIT 1; While common ORDER BY RAND() takes 30-40 seconds on my test table, his query does the work in 0.1 seconds. He explains how this functions in the blog so I'll just skip this and finally move to the odd thing. My table is a common table with a PRIMARY KEY id and other non-indexed stuff like username, age, etc. Here's the thing I am struggling to explain SELECT * FROM table ORDER BY RAND() LIMIT 1; /*30-40 seconds*/ SELECT id FROM table ORDER BY RAND() LIMIT 1; /*0.25 seconds*/ SELECT id, username FROM table ORDER BY RAND() LIMIT 1; /*90 seconds*/ I was sort of expecting to see approximately the same time for all three queries since I am always sorting on a single column. But for some reason this didn't happen. Please let me know if you any ideas about this. I have a project where I need to do fast ORDER BY RAND() and personally I would prefer to use SELECT id FROM table ORDER BY RAND() LIMIT 1; SELECT * FROM table WHERE id=ID_FROM_PREVIOUS_QUERY LIMIT 1; which, yes, is slower than Jay's method, however it is smaller and easier to understand. My queries are rather big ones with several JOINs and with WHERE clause and while Jay's method still works, the query grows really big and complex because I need to use all the JOINs and WHERE in the JOINed (called x in his query) sub request. Thanks for your time!

    Read the article

  • Mysql Sub Select Query Optimization

    - by Matt
    I'm running a query daily to compile stats - but it seems really inefficient. This is the Query: SELECT a.id, tstamp, label_id, (SELECT author_id FROM b WHERE b.tid = a.id ORDER BY b.tstamp DESC LIMIT 1) AS author_id FROM a, b WHERE (status = '2' OR status = '3') AND category != 6 AND a.id = b.tid AND (b.type = 'C' OR b.type = 'R') AND a.tstamp1 BETWEEN {$timestamp_start} AND {$timestamp_end} ORDER BY b.tstamp DESC LIMIT 500 This query seems to run really slow. Apologies for the crap naming - I've been asked to not reveal the actual table names. The reason there is a sub select is because the outer select gets one row from the table a and it gets a row from table b. But also need to know the latest author_id from table b as well, so I run a subselect to return that one. I don't want to run another select inside a php loop - as that is also inefficient. It works correctly - I just need to find a much faster way of getting this data set.

    Read the article

  • Selecting arbitrary strings with Zend DB Select?

    - by wizzard
    I am using the fluent interface to create a Zend DB Select object/query. As part of the query, I would like to select an arbitrary string, like "SELECT 'foo' AS 'type' FROM ...". foo is not a column, it's just a string literal. When I select an arbitrary number, the query works as expected. When I change it to a string, Zend tries to treat foo as a column, and throws an error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l.foo' in 'field list' I have tried wrapping the string in Zend_Db_Expr in various ways such as: $select->columns(array('type' => new Zend_Db_Expr('foo'))); That stops Zend from adding the correlation name, but it still treats it as a column: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'foo' in 'field list' I feel like I must be missing something obvious here. How do I tell Zend to stop treating this as a column?

    Read the article

  • get the response of a jquery ajax call as an input parameter of another function:

    - by Nauman Bashir
    Hello, Is it possible to make a jquery ajax call, and get the response as an input parameter of another function: here is an example, i have the following function call at a location: updateTips(validationTextObject,objUsers.fetchAvailable()); the objUsers.fetchAvailable() function makes a ajax call to the server. The callback function on successful call would be something like this. It is being used to process the result BHUsers.prototype.recvAvailable= function(response){ // some kind of processing over here return (response["status"] == "OK")? "Available" : "Not Available"; } I want that fuction to return the processed result which can be used as a parameter to the function updateTips The primary goal of this is to be able to do all of this for multiple scenarios, rather than writing multiple functions for the same call. Also i want the calling and the response processing functions to just do what they are doing. I dont want to add html objects into it. Any Clues?

    Read the article

  • MonoRail - Select parent category from one dropdown, show child category dropdown

    - by Justin
    Hey, I'm new to MonoRail and am trying to figure out how to have it so that I can select a parent category in a dropdown then have it show a second dropdown with the categories that are children of the parent. If I were using what I'm used to, ASP.NET MVC, I would have a javascript function that would be called onchange of the first dropdown and would make an ajax call to a controller method (passing in the selected parent category id) that would grab all child categories of that parent category and return them in JSON. Then in the callback javascript function I would eval the JSON and populate the second dropdown with the child categories. How would I do this using MonoRail/jQuery? Here's the code I have so far: $FormHelper.Select("business.category.id", $categories, "%{value='id', text='name', firstoption='Select a Category'}") $FormHelper.Select("business.category.id", $childCategories, "%{value='id', text='name', firstoption='Select a Sub-Category'}") Then in BusinessController.cs: private void AddDataToModels() { PropertyBag["categories"] = CategoryRepository.GetParentCategories(); PropertyBag["childCategories"] = CategoryRepository.GetChildCategories(1); } Thanks for any input on how to approach this! Justin

    Read the article

  • Sql Server - INSERT INTO SELECT to avoid duplicates

    - by Ashish Gupta
    I have following two tables:- Table1 ------------- ID Name 1 A 2 B 3 C Table2 -------- ID Name 1 Z I need to insert data from Table1 to Table2 and I can use following sytax for the same:- INSERT INTO Table2(Id, Name) SELECT Id, Name FROM Table1 However, In my case duplicate Ids might exist in Table2 (In my case Its Just "1") and I dont want to copy that again as that would throw an error. I can write something like this:- IF NOT EXISTS(SELECT 1 FROM Table2 WHERE Id=1) INSERT INTO Table2 (Id, name) SELECT Id, name FROM Table1 ELSE INSERT INTO Table2 (Id, name) SELECT Id, name FROM Table1 WHERE Table1.Id<>1 Is there a better way to do this without using IF - ELSE? I want to avoid two INSERT INTO-SELECT statements based on some condition. Any help is appreciated.

    Read the article

  • Select dynamic string has a different value when referenced in Where clause

    - by David
    I dynamically select a string built using another string. So, if string1='David Banner', then MyDynamicString should be 'DBanne' Select ... , Left( left((select top 1 strval from dbo.SPLIT(string1,' ')) //first word ,1) //first character + (select top 1 strval from dbo.SPLIT(string1,' ') //second word where strval not in (select top 1 strval from dbo.SPLIT(string1,' '))) ,6) //1st character of 1st word, followed by up to 5 characters of second word [MyDynamicString] ,... From table1 Join table2 on table1pkey=table2fkey Where MyDynamicString <> table2.someotherfield I know table2.someotherfield is not equal to the dynamic string. However, when I replace MyDynamicString in the Where clause with the full left(left(etc.. function, it works as expected. Can I not reference this string later in the query? Do I have to build it using the left(left(etc.. function each time in the where clause?

    Read the article

  • SQL select statement

    - by kwokwai
    Hi all, I got a Table which has two fields: Point, and Level, with some sample data as follows: ----------------------- Point | Level ----------------------- 10 | Level 1 20 | Level 2 30 | Level 3 40 | Level 4 Suppose that there is a user who has 25 points, to find the Level in which this user is in, the Select statement I used was: Select Level from Table where Point < 30 AND Point > 20; But the Select SQL ststament is a hard-copy one where you can see the ponts 30 and 20 are fixed. I want to alter the Select statement so that the new SQL Select statement can be applied to all users with different points, but I don't know how to do it.

    Read the article

  • How to return 'null' instead of 'undefined' from select element

    - by MrW
    How can I return null instead of a 'undefined' from a select element. Basically I have 4 selects at the moment, but only the first one is populated with data at this point, but I want to grab the value from all of them when working with them. <select class="changeValue" id="drpOne"></select> <option id=1>1</option> <option id=2>2</option> <option id=3>3</option> <select class="changeValue" id="drpTwo"></select> JQuery: $('.changeValue').change(function() { var data = {}; data["Id1"] = $('#drpOne:selected').attr("id"); data["Id2"] = $('#drpTwo:selected').attr("id"); In this case, drpTwo will return 'undefined'. Is there anyway to get a null instead?

    Read the article

  • Regular Expression - capturing contents of <select>

    - by joey mueller
    I'm trying to use a regular expression to capture the contents of all option values inside an HTML select element For example, in: <select name="test"> <option value="blah">one</option> <option value="mehh">two</option> <option value="rawr">three</option> </select> I'd like to capture one two and three into an array. My current code is var pages = responseDetails.responseText.match(/<select name="page" .+?>(?:\s*<option .+?>([^<]+)<\/option>)+\s*<\/select>/); for (var c = 0; c<pages.length; c++) { alert(pages[c]); } But it only captures the last value, in this case, "three". How can I modify this to capture all of them? Thanks!

    Read the article

  • Capturing the contents of <select>

    - by joey mueller
    I'm trying to use a regular expression to capture the contents of all option values inside an HTML select element For example, in: <select name="test"> <option value="blah">one</option> <option value="mehh">two</option> <option value="rawr">three</option> </select> I'd like to capture one two and three into an array. My current code is var pages = responseDetails.responseText.match(/<select name="page" .+?>(?:\s*<option .+?>([^<]+)<\/option>)+\s*<\/select>/); for (var c = 0; c<pages.length; c++) { alert(pages[c]); } But it only captures the last value, in this case, "three". How can I modify this to capture all of them? Thanks!

    Read the article

  • Reuse select query in a procedure in Oracle

    - by Jer
    How would I store the result of a select statement so I can reuse the results with an in clause for other queries? Here's some pseudo code: declare ids <type?>; begin ids := select id from table_with_ids; select * from table1 where id in (ids); select * from table2 where id in (ids); end; ... or will the optimizer do this for me if I simply put the sub-query in both select statements?

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >