Jump to content

neilfurry

Members
  • Posts

    107
  • Joined

  • Last visited

Everything posted by neilfurry

  1. You're the best mate... Thank you so much :-)
  2. Hi Mate, I need help on using the jquery clone method. i have this html script that i clone <div class="col-md-2 col-sm-3 col-lg-1 nopadding"> <input id="length" class="form-control input-sm nopadding" type="text" onchange="compute('floor','length','width','sqft');" placeholder="Length" maxlength="4" name="length"> </div> Then when i cloned, it outputs this with id appending an incremented number at the end of the original id. example (length to length1) which is correct. <div class="col-md-2 col-sm-3 col-lg-1 nopadding"><input id="length1" class="form-control input-sm nopadding" type="text" onchange="compute('floor','length','width','sqft');" placeholder="Length" maxlength="4" name="length"> </div> Now how can i pass the same ids to the onchange event so it should output compute('floor1','length1','width1','sqft1'). at the moment it did not pass the incremented id to the method. here is my javascript: function addrow(){ var template = $('#rowsec').clone(); rCount++; var attendee = template.clone().find(':input').val(0).each(function(){ var newId = this.id.substring(0, this.id.length) + rCount; this.id = newId; }).end() .attr('id', 'rowsec' + rCount) .appendTo('#rows'); } Thank you in advance.
  3. Yes, correct i want my query to return those rows without clientID's and my query doesnt seem to work...
  4. I want to select rows that doesnt have clientID's and not that
  5. Hi Mate, i need help with my mysql query.. SELECT * FROM `schedules` WHERE `clientID`=''; it doesn't select any values having an empty clientID... there are rows on my database that i need to select that has an empty clientID and using this statement does not return any value... but if i use `clientID`!='' it works fine, it returns all the data having clientID. Any help is highly appreciated. Thank you in advance. Neil
  6. i solved it just using json... Thank you mate...
  7. but is there anyway i can put all the users into the calendar using javascript from json file? thank you for answering my questions... i really appreciate it.
  8. this is where i intend to use this function... if you look at line 197, that should be the exact location where i want to display the list of users from that function im working. https://github.com/themouette/jquery-week-calendar/blob/master/weekcalendar_demo_3.html any help would be greatly appreciated. Thank you Neil
  9. is this correct users:uList(function(callback) { return callback; }), when i use alert on callback it works as it should be working... but when i use return it displays nothing.. how can i display the content of that callback to the html screen... im attenpting to display this list of users on a calendar. thank you Neil
  10. is this correct if i want to get the list of users and display it somewhere else function uList(callback) { $.ajax({ type: "POST", url: "techs.php", success: callback }); } uList(function(users) { return users; });
  11. how can pass this to this variable users: so if i use users:uList, would be right? thank you
  12. Hello Mate, I would like to seek help... i have this json script which gets the names of the users from my database: $sql=mysql_query("SELECT firstname FROM tblusers WHERE usertype=1"); $u = array(); while($rs=mysql_fetch_array($sql)){ $u[] = $rs['firstname']; } print json_encode($u); And getting this to javascript function through ajax: function uList(){ $.ajax({ type: "POST", url: "techs.php", success: function(data) { console.log(data); return data; } }); } my console.log shows the correct format i want to get, but it doesn't display on my calendar page.... ["user1","user2","user3","user4","user5"]... im using this code to send data to my calendar script. users:uList, Any help is very much appreciated. Thank you
  13. Hi Mate, I need advice on my query any inputs is highly appreciated. i have this query on the system that im developing, im using a jquery autosearch api here. $sql = 'SELECT referrals.clientid,fullname, firstname, lastname,email,referredby,hearaboutus,gatecode, address1,city,state,zip, homephone, workphone, cellphone,company FROM referrals INNER JOIN address ON address.clientid=referrals.clientid WHERE referrals.firstname is not null '; for($i = 0; $i < $p; $i++) { $sql .= ' AND fullname LIKE ' . "'%" . mysql_real_escape_string($parts[$i]) . "%' "; } My query seems making the search function slow to respond... is there any adjustments on that sql statemet that you can advice to make it search faster. im searching of about 20K of clients on my database. Thanks in advance Neil
  14. so for example: $keyword ="" When i search using the following query: SELECT fullname FROM clients WHERE fullname LIKE '%".$keyword."%' if i have John Doe on my clients table and i want to search Doe Jo... it should also return the name John Doe... as the search $keyword name is just a reverse of the fullname.
  15. note that this search query can be another name not just Williams Robert... so that should be $keyword sent via $_REQUEST method
  16. hello mate, im having problem making a search criteria work.... i have a field named fullname, inside that field i have a data eg: "Robert Williams" Im trying to use LIKE on mysql statement such as SELECT fullname FROM clients WHERE fullname LIKE '%keyword%' keyword being any character from the name "Robert Williams". but when i tried to search "Williams R" it will not show me "Robert Williams"... Then, how can i make it so that when i search for "Williams R" it will also show me "Robert Williams" What im trying to attain here is to search any name in any order whether firstname first of lastname first. Thank you in advance. Cheers! Neil
  17. I already solved this mate. Thank you for your time :-) Cheers! Neil
  18. Thanks mate, i just get it working... :-) cheers Neil
  19. Hello Mate, I have another problem, though i already fixed the problem on my previous post, i came across on another problem. i have this code: $sql = mysql_query("SELECT * FROM schedules") or die(mysql_error()); $results = array(); while($rs=mysql_fetch_array($sql)){ $results['events'] = array([ 'id' => (int)$rs['id'], 'start' => $rs['date_start'], 'end' => $rs['date_end'], 'title' => $rs['details'], 'free' => (bool)$rs['isfree'], 'userId' => (int)$rs['techID'], 'color' => render_color_code($rs['zip']) ]); } I have many events on my database, but only one is being displayed using the script above. how can i make it so that this script will get all events from my database. can you check what is wrong with my coding? Cheers! Neil
  20. hello mate, i need help on creating the json file with data are fetched from mysql database. here will be the result i want to get. { "freebusys":[ { "start":"2012-12-20T16:29:34.000+0000", "end":"2013-02-06T16:44:24.000+0000", "free":true } ], "events":[ { "start":"2013-01-04T03:57:06.000+0000", "end":"2013-02-18T03:57:06.000+0000", "id":2, "title":"A lesson" }, { "start":"2013-01-04T12:43:30.000+0000", "end":"2013-02-18T12:43:30.000+0000", "id":4, "title":"A lesson" } ] } i have a table named "schedules" on my database with the following fields, start, end, id, title, and free, all i need is to do php array "freebusys" and "events" then their values will be fetched from my database. how can i do this. please help. Thank you
  21. hi mate, i have this json output and i need this to be in php array how can i do this, events : [ {'id':1, 'start': new Date(year, month, day, 12), 'end': new Date(year, month, day, 13, 00), 'title': 'Lunch with Sarah', userId: [1, 2]}, {'id':2, 'start': new Date(year, month, day, 14), 'end': new Date(year, month, day, 14, 40), 'title': 'Team Meeting', userId: 0}, ], free: [ {'start': new Date(year, month, day-1, , 'end': new Date(year, month, day-1, 18), 'free': true, userId: [0,1,2,3]}, {'start': new Date(year, month, day, , 'end': new Date(year, month, day+0, 18), 'free': true, userId: [0,1,2,3]}, ] Thanks in advance
  22. Hi there, i've been struggling on a problem converting datetime format to ISO8601 here is my code: $string = $_REQUEST['sched-date']." ".$_REQUEST['sched-start']; $start_string = date("Y-m-d H:i", strtotime($string)); $newformat = date('c',$start_string); echo "String: ".$string; echo "\n"; echo "ISO Format: ".$newformat; AND Here is the output: String: 07/30/2015 07:45 AM ISO Format: 1969-12-31T17:33:35-07:00 You will notice that the ISO output is not correct. can you help me with this? Thanks in advance. Neil
  23. hi i need help on this, i have three input fields in html form lets say: input 1 = 10 input 2 = 3 input 3 = 13 (sum) so whenever i change values of input 1 or input 2 it will still compute for the sum.. so if: input 1 = 4 input 2 = 3 input 3 = 7 (sum) im using "onchange" method here.. thanks in advance.
  24. try this: <?php $Fname = $_POST["fname"]; $Lname = $_POST["lname"]; $Bus = $_POST["business"]; $Addr = $_POST['addr']; $City = $_POST["city"]; $State = $_POST["state"]; $Zip = $_POST["zip"]; $Ctry = $_POST["ctry"]; $Email = $_POST["email"]; $Ph1 = $_POST["ph1"]; $Type1 = $_POST["type1"]; $Ph2 = $_POST["ph2"]; $Type2 = $_POST["type2"]; $Ph3 = $_POST["ph3"]; $Type3 = $_POST["type3"]; $ph4 = $_POST["ph4"]; $Type4 = $_POST["type4"]; $Notes = $_POST["notes"]; if(isset($_POST["save"])): $query = "UPDATE directory SET fname='$Fname', lname='$Lname', bus='$Bus', addr='$Addr' WHERE directory.id = '$nameid'"; $result = $mysqli->query($query); printf("Affected rows (UPDATE): %d\n", $mysqli->affected_rows); endif;
  25. hello, anyone here can help me. i want to get a popup from a website.. ok here is waht i want, when you go to h t t p : / / o x i f r e s h [dot] com you will see on the top left schedule online today you will need to type in any U.S zip code like 92240... i want to get that exact popup including the content. please put it on a separate page where i can test. i can only pay a small amount to people who can help.. thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.