Hi, I have to pass string entered in the input text to server method calling through jquery ajax. But its not going through. can please somebody tell me what i m doing wrong here. Below is the code: [CODE]$.ajaxSetup({ cache: false //timeout: 1000000 }); function concatObject(obj) { strArray = []; //new Array for (prop in obj) { strArray.push(prop + " value :" + obj[prop]); } return strArray.join(); } //var Eid = "stephen.gilroy1"; function testCAll() { //var ntid = $('#Eid').val(); $.ajax({ type: "POST", url: "Testing.aspx/SendMessage", //data: "{'ntid':'stephen.gilroy1'}", //working data: "{'ntid': $('#Eid').val()}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(result) { alert(result.d); resultData …

Member Avatar
Member Avatar
+0 forum 5

inside mysql db which is table employe in coloumn *id_employee*, some data have a leading zero, etc : **id_employee : 0378192918 empy_name : Daniweb** i need to get id_employee for delete employe in my aplication, then i using ajax method like this : if(id) { alert(id); $("#deleteBtn").unbind('click').bind('click',function(){ $.ajax({ url: 'pegawai/delpeg.php', type:'post', data: {emp_id : id}, datatype: 'json', success:function(response) { return value is **378192918**, the first number **0** not showing in alert box. why ? then how to get entire value id_employe from db ?

Member Avatar
Member Avatar
+0 forum 8

I need some help to add few audio effects to website. I found some examples like following, audioOn: true audio.muted = false setAudioOn true ref: "audio", attrs: { "id": "projects-audio" } }, [_c('source', { attrs: { "src": "/audio/click.mp3" } playAudio: function playAudio() { this.$parent.$refs.clickAudio.volume = 0.8; this.$parent.$refs.clickAudio.play(); }, I need help to play audio using **play() **, control volume using **volume = 1** What is **workClick: ?** I found it used with sound properties. So, basic needs are play various sounds - on click, background music, control volume of background music, play sound on overlay appears

Member Avatar
Member Avatar
+0 forum 12

Hi DW. I'm trying to post data without refreshing the page using the ajax, and its works fine the problem is that on the response I also get the array data that I posted to my php file then at the end of response is the returned data which is echoed from my php file. I post 3 data which are from my form but the problem is that on my response this data is also shown when I do `alert(response);` please check attached image and you will see that on the alert response firstly the array of what I …

Member Avatar
Member Avatar
+0 forum 1

i have been trying to upload image files in to my database but i failed in many ways, the form saves everything except the image files. i am not sure if its the php or the java or the html page, honestly i lost my path. i have included all my pages, any help would mean a lot, thanks!!! <html> <head> <meta charset="utf-8"> <title>PYB Register Bike</title> <link href="bootstrap-3.3.7/dist/css/bootstrap-theme.min.css" rel="stylesheet"> <!--styling css link --> <link href="bootstrap-3.3.7/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- styling css link --> <link href="font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"> <!-- styling css link --> <link rel="stylesheet" href="../ProtectYourBike.css"> <!-- CSS Reference --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> <script src="http://malsup.github.com/jquery.form.js"></script> …

Member Avatar
Member Avatar
+0 forum 1

Hi All, I have a PHP code which do some changes to the POST variables it receives and redirect the page to some other page. This PHP code was initially designed to work without Ajax. So there wasn't any problem with the redirect function and it perfectly handles the POSt variables and redirect the user to another page. So now I want to use the same PHP code with Ajax... :) I tried it and and it did not gave me the results I was expecting. Problem is with the redirect function. Other PHP lines execute perfectly fine( it stores …

Member Avatar
Member Avatar
+0 forum 8

Hey everyone, this code below is giving me a weird error, Script 438: Object doesn't support property or method 'ajax'. I am testing this in Microsoft Edge, but...I have a website that uses this exact same code, and its working like normal. I am getting the `var id` to load properly, I am not sure why it is not working, since, its working on the other site. I copied and pasted the code to match exact. anywho, its stating that it at the `$.ajax({` line. <script> $(function(){ $('.get-msg').click(function(){ var id = $(this).attr('data-id'); $.ajax({ type : 'GET', url : 'viewmessage.php', data …

Member Avatar
Member Avatar
+0 forum 4

Hi all, I had created a function updateprintingqc() that work like this 1. user will click on a clickable button to update the data 2.when user click on OK,the dummy data will be create based on the main data shown in below image's link https://drive.google.com/file/d/0B46VQHVMeBTNMzVodDRxZEw3dGs/view?usp=sharing When the user click the button for the 1st time,the function work fine.But when the user click on the button for the 2nd time,error occur. Here's my coding in javascript function updateprintingqc(this_, idschedule,idmsul,articleno,part_name,remain) { var conf = confirm("Are you choose to Update this Row of Record?"); if (conf == true) { var url = "msp/updateqc?id=" …

Member Avatar
Member Avatar
+0 forum 2

Hello every One i have been trying this for a day but can't able to find out what i am doing wrong? Here Class proxy function which gives me access token and refresh token after user enter it's username and password by ajax request i send request to controller where proxy controller function is called private function proxy($grantType, array $data = []) { try { $config = app()->make('config'); $data = array_merge([ 'client_id' => 'm492pkQPkw5YGa2sBRFvLKPSfkhy9yLbU52DiyDL', 'client_secret' => 'X96evDo1jq067VMzQoq8UC4iMlfFmm2DTjPQCHba', 'grant_type' => $grantType ], $data); $client = new Client(); $guzzleResponse = $client->post(sprintf('%s/api/auth/authorize', $config->get('app.url')), [ 'form_params' => $data ]); } catch(\GuzzleHttp\Exception\BadResponseException $e) { $guzzleResponse …

Member Avatar
Member Avatar
+0 forum 1

I am creating a web service to interact with a database and it is supposed to perform the CRUD operations. Right now it works fine with the read and post operation the WCF service supposed to have a method that is called from within jQuery whenever the page completes load to retrieve a list of all providers and it works fine, however, when I update the WCF Service with a method like this [OperationContract] [WebInvoke(Method = "PUT", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] public Object PutSupplier(int id, Supplier oParameter) { // Do work } OR [OperationContract] [WebInvoke(Method = "DELETE", RequestFormat …

Member Avatar
Member Avatar
+0 forum 1

Hey everyone, I have a question. I created a page that pop-ups when a user clicks a link and that page displays a table of the information that it pulls from the database that I have created. I want to be able to have a user click an update button next to the entry, so I created a button to appear next to each entry on each row so that they can choose to update that one user if they need to. I am also going to implement a delete button that will ask for confirmation if they want to …

Member Avatar
Member Avatar
+0 forum 8

Hey everyone, I am trying to use JQuery to help me load a page on my page so that the user does not have to refresh or move to a new page. So far, I have the code so that the next page's contents will display, but the update button that I have on there won't work and the values are not showing on the table correctly since the values from the first page were not passed. Does anyone have an idea about how to do this? here are some snippets of the code so that you can have an …

Member Avatar
Member Avatar
+0 forum 7

Hi, I need your help to plot multiple locations from mysql table using latitude and longitude and I want to display a particular location in different color using google map or any other

Member Avatar
+0 forum 0

`l(x)` is my shortcut to `console.log(x)`. `item.php` has text "EYES!!", just that. var session = $.get("item.php", function(data) { session = data; }) l(session); // *all XHR flags in an object, responseText ("EYES!!"), status (200) etc. $.get("item.php", function(data) { session = data; }) l(session); // undefined $.get("item.php", function(data) { l(data) }) // "EYES!!" (note, these are 3 different cases, but I cannot them get seperated without HTML freaking out) Is there a way for me to transfer `$.get` response into external variable? Code generally looks something like this: var session; (need some fairy magic to happen) l(session); // "EYES!!"

Member Avatar
Member Avatar
+0 forum 1

Hello, i not sure what is the problem with my code. Below is my code. <?php if(isset($_SESSION["products"]) && count($_SESSION["products"])>0){ $total = 0; foreach($_SESSION["products"] as $product){ $product_name = $product["name"]; $product_price = $product["price"]; $product_code = $product["product_code"]; $product_qty = $product["product_qty"]; $currency = "RM "; $img = mysqli_query($link, "SELECT img FROM internet_shop where id=$product_code"); $row = mysqli_fetch_assoc($img); $item_price = sprintf("%01.2f",($product_price)); // price x qty = total item price $subtotal = sprintf("%01.2f",($product_price * $product_qty)); //Multiply item quantity * price $total = sprintf("%01.2f",($total + $subtotal)); //Add up to total price ?> <tr> <form id="update_info_cart<?php echo $product_code?>" class="form-horizontal form-label-left"> <input name="update" type="hidden" value="update"> <td><img src="<?php echo "adminPanel/MenuPicture/".$row['img']?>" …

Member Avatar
+0 forum 0

Hi I am trying to update the ON / OFF status through the below code. If i change the OFF status to ON, its getting a value is OFF. can any one please help to fix the issue. **toggle.php** <div id="setQuickVar1"> <input type="checkbox" data-switchery <?php if($SCYQ64EV01=='Y') echo 'checked'; ?> /> </div> <span class="uk-form-help-block"> <div id="resultQuickVar1"></div> </span> <script type="text/javascript"> $(document).ready(function() { $('#setQuickVar1').on('click', function() { var checkStatus = this.checked ? 'ON' : 'OFF'; alert(checkStatus); $.post("engineDBUpdate.php", {"quickVar1a": checkStatus}, function(data) { $('#resultQuickVar1').html(data); }); }); }); </script> **EngineDBUpdate.php** <?php if (isset($_POST['quickVar1a'])) echo $quickVar1a = $_POST['quickVar1a']; ?>

Member Avatar
Member Avatar
+0 forum 3

Hi all, I'm having some serious issues with AJAX forms. I'm currently using jQuery 2.2.0 and the jQuery Form plugin. I have a simple php file: <?php if(isset($_POST)): print_r(json_encode($_POST)); endif; ?> I have a simple html form: <form method="post" id="regform"> <input id="login_name" name="login_name" type="text" > <input id="login_password" name="login_password" type="text" > <input id="submit" type="submit"> </form> I am trying to use AJAX to execute the PHP script and return the response. Here is what I have so far: $(document).ready(function(){ $('#regform').on('submit', function(e) { function response(response) { alert("The server says: " + response); } e.preventDefault(); var data = $(this).serialize(); $.ajax ({ type : 'POST', …

Member Avatar
Member Avatar
+0 forum 5

I have a page running scrolling nav bootstrap theme which essentially means for me that I have multiple forms on one page. The problem I am having is whenever someone submits any of the 3 forms it sends data from all forms on the page. The code is below, I put a print line in the database.php page which prints the form Type which is a hidden field on each form. The field type is always searchForm which happens to be the last one whcih makes sense as it sends from all forms so the last form type field it …

Member Avatar
Member Avatar
+0 forum 2

this is js code i am calling "is_loggedin" from ajax in php folder in login.php but it always gives undefined index action $(document).ready(function(){ $('.carousel').carousel({ pause: "false" }); }); $("#loginId").click(function(){ $("#modalLoginId").modal("show"); }); $("#registerId").click(function(){ $("#modalRegisterId").modal("show"); }); $("#login-btn").click(function () { var loginpasswordJSON = JSON.stringify({ "username": $('#login_username').val(), "password": $('#login_password').val(), }); alert(loginpasswordJSON); console.log ("Login Started"); $.ajax({ type: 'POST', url: 'php/login.php', dataType: 'json', // data type of response data: {action:"success"}, contentType:'application/json', success: function(data){ alert("successfully logged In") } //error: function(jqXHR, textStatus, errorThrown){ // handleErrors('Error: ' , textStatus , errorThrown); // } }); console.log ("Login Ends"); return false; } ); login.php <?php $action = $_POST["action"]; if($action=="success") { is_loggedin(); …

Member Avatar
Member Avatar
+0 forum 4

Hi all, I have been using this tutorial: [bootply.com](http://www.bootply.com/lxa0FF9yhw) and I almost have it working, the problem is that my table is generated VIA AJAX from a php file. Basically I see my table but no working pagination unless I open chrome web tools and go to console and paste the following line: $('#myTable').pageMe({pagerSelector:'#myPager',showPrevNext:true,hidePageNumbers:false,perPage:4}); My javascript in my document is nested within a `$(document).ready(function(){});` and I have the ajax call to generate the table first followed by the call to call the pagination function. Attached at the bottom is my full code VIA pastebin. Is there anyway I can get …

Member Avatar
Member Avatar
+0 forum 1

I am new in Symfony2. I am trying to get result from a drop-down using ajax and symfony; I did all the settings as it is which is mentioned in the documentation provided. But I am getting **POST http://localhost/docCMS/web/app_dev.php/getclientaddress/13 500 Internal Server Error** DefaultController.php /** * @Route("/getclientaddress/{id}", name="get_client_address", options={"expose"=true}) * @Template("SuntecMarcusAssignmentBundle:Default:getclientaddress.html.twig") */ public function getclientaddressAction($getclientaddress){ $client = $this->get_client_details($id); routing.yml fos_js_routing: resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" suntec_marcus_getclientaddress: pattern: /getclientaddress/{param} defaults: { _controller: SuntecMarcusAssignmentBundle:Default:getclientaddress } options: expose: true ajax $(document).on('change', '#client', function (){ var client_id = $(this).val(); var getTeamsUrl = Routing.generate('get_client_address',{ id: client_id }); $.ajax({ type : "POST", url : getTeamsUrl, success : function(response){ alert(response); …

Member Avatar
+0 forum 0

Hello i want to calculate three parameters. one X two X three = Y The one is the value of a <input type="number"> the second is default the value '1' and the third is the count of this $sql = "SELECT uid, username, name, profile_pic FROM users"; $result = mysqli_query($db,$sql) or die(mysql_error()); if(mysqli_num_rows($result)) { echo '<ul class="list">'; while($row = mysqli_fetch_array($result)) { $str = strtolower($row['username']); $user_image=$base_url.$upload_path.$row['profile_pic']; echo '<li><a id="'.$row['uid'].'"><img src="'.$user_image.'" /> '.$str.'</a></li>'; } echo "</ul>"; } any help?

Member Avatar
Member Avatar
+0 forum 33

I need some guidance in this I have registration form in which there will be button clicking on which open a new form without refreshing a page and again clicking on same button hides form it's user will to fill that form.Here is snapshot what i actually want.I want to know how actually i can do it

Member Avatar
Member Avatar
+0 forum 6

I am following this[ tutorial](http://carlofontanos.com/ajax-multi-file-upload-in-codeigniter/) but i am facing problem in uploading file i done similar as in tutorial.Below is my code Code: <?php echo form_open_multipart('upload/do_upload', array('class' => 'upload-image-form'));?> <div class="form-inline"> <div class="form-group"> <input type="file" name="uploadfile[]" id="js-upload-files" multiple = "multiple" accept = "image/*"> <br /> </div> <button type="submit" value="upload" class="btn btn-sm btn-primary" id="js-upload-submit">Upload files</button> </div> <script> jQuery(document).ready(function($) { var options = { beforeSend: function(){ // Replace this with your loading gif image $(".upload-image-messages").html('<p><img src = "<?php echo base_url() ?>img/images.png" class = "loader" /></p>'); }, complete: function(response){ // Output AJAX response to the div container $(".upload-image-messages").html(response.responseText); $('html, body').animate({scrollTop: $(".upload-image-messages").offset().top-100}, 150); } …

Member Avatar
+0 forum 0

Hi friends i am trying to display dynamic dropdown using php. but it is not fetching the second dropdown value. I collected the below code from internet. please help me to fix it. <?php $dbc = mysqli_connect("localhost","root","escape123","tsheet"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $tAOptions=''; $cNOptions=''; $pNameoptions=''; /*Task Drop Down*/ $tAsk = "select * from ce_task order by tas_id asc"; $rowtAsk = mysqli_query($dbc, $tAsk); while ($tARow = mysqli_fetch_array($rowtAsk)) { $tAOptions .="<option value=\"".$tARow['tas_name']."\">" . $tARow['tas_name'] . "</option>"; } $tADropDown = "<select name='Task' id='Task'> <option selected='selected' disabled='disabled' value=''>Select Task</option> " . $tAOptions . …

Member Avatar
Member Avatar
+0 forum 8

I am having no luck with this code but for some reason i can get this element to work but not the other one. here is my code. <td><a onclick="javascript:approve_account_function(<?php echo $row['id'];?>, <?php echo $rownumber;?>)" class="btn btn-success" name="yes_account" id="yes_account">Approve</a></td> <td><a onclick="javascript:decline_account_function(<?php echo $row['id'];?>, <?php echo $rownumber;?>)" class="btn btn-danger" name="no_account" id="no_account">Decline</a></td> <input type="hidden" name="sub_id<?php echo $rownumber;?>" id="sub_id<?php echo $rownumber;?>" value="<?php echo $row['id']; ?>"/> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="row_total" id="row_total" value="<?php echo $rownumber; ?>"/> one thing to rememebr is that my hidden elements are being generated by a while loop so they will be different per user. This …

Member Avatar
Member Avatar
+0 forum 3

Hi. Im trying to update a page with a form using AJAX but it isn't working. Nothing happens. I have a table and one of the columns has an anchor tag like this`<td><a href='#' value='$name' class='request' onclick='request(".$name.")'>$status</a></td>` so when the user clicks on Request a form opens up via ajax. In the console this appears : Uncaught SyntaxError: missing ) after argument list page.php:64 ive probably gone blind looking at the code for too long coz i can't find anything missing. thanks in advance This is the AJAX: <script type="text/javascript"> function request(str) { if (window.XMLHttpRequest) { // Create the object …

Member Avatar
Member Avatar
+0 forum 9

Hi all, I've searched in the ASP.Net and AJAX forums but I can't see any matches to this issue. The reason I'm posting in the ASP.NET forum is that the Error is being caused by my ASP.NET designer page. Myself and another developer are both working on different parts of a web project. We are supposed to have a standard build of the same OS and we are both using Visual Studio 2013 Premium Update 4. We have both downloaded and installed the same AJAX tool kit. We have the same references (same solution) etc. But when I add an …

Member Avatar
Member Avatar
+0 forum 2

I am quite new to web development, so I naturally came to a point where I needed some help. I am making a web site where the user has to log in, and if authentication is successful, the user's data will be fetched from server and displayed on page (and can be edited by user). Because the web site is highly dynamic, the user will click around a lot and change this data, so changes has to be continously uploaded to the server. I have the index.html where a pop-up box (modal. I'm using Bootstrap) opens for user to enter …

Member Avatar
Member Avatar
+0 forum 4

so i am trying to output course information when the course number is selected and the button is clicked. here is the html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Course Info</title> </head> <body> <h1>Course Information Search</h1> <form action="" method="post"> <select name="course" id="course"> <option value="420-121">420-121</option> <option value="420-122">420-122</option> <option value="420-123">420-123</option> <option value="420-221">420-221</option> <option value="420-222">420-222</option> <option value="420-223">420-223</option> <option value="420-224">420-224</option> <select> Select a course to see the course name and teacher assigned<br><br> <input type="button" id="go" value="go!"> </form> <br><br> <div id="courseInfo"></div> </body> </html> php <?php $filename = "data.txt"; try { if ($courses = @fopen($filename, "r")) { while (!feof($courses)) { $line = fgets($courses); $array = …

Member Avatar
Member Avatar
+0 forum 13

The End.