Jump to content

funbinod

Members
  • Content Count

    499
  • Joined

  • Last visited

Everything posted by funbinod

  1. then what is the suggestion @justsomeguy?
  2. sorry! i again need to come back in this topic. the error in the ajax request is solved (i think) but its each time returning error function. this is the ajax request $(document).ready(function(e) { $('#vname').blur(function(e) { $.ajax({ url:"ajax/aid.php", dataType:"jsonp", contentType:"text/xml", type:'GET', data: { name: $('#vname').val() }, success: function(result) { $('#vaid').val(result); $('#vname').css('background-color', '#1CDC06'); $('#vamt').focus(); }, error: function() { $('#vname').focus(); $('#vname').css('back
  3. i found the error that i forgot to give a name to the data to be sent. data: { name: $('#vname').val(), format: 'json' }, and i've to use comma inside the object declaration. i found this on http://api.jquery.com/jquery.ajax/ thank u for ur support
  4. no. its not working even after removing the semi-column $('#vname').blur(function(e) { $.ajax({ url:"ajax/aid.php", data: { $('#vname').val() }, error: function() { $('#vname').focus(); $('#vname').css('background-color', '#F00'); }, dataType:"jsonp", success: function(result) { $('#vaid').val(result); $('#vname').css('background-color', '#1CDC06'); $('#vamt').focus(); }, type:'GET' }); });
  5. thank u. its much helpfull. i checked the console and it said there is a "syntax error" on the following line data: { $('#vname').val(); }, after i delete the line and execute the blur function, i receive the data from error function what could be the problem on the line?
  6. hello all! greetings! ‚Äči'm trying to learn jquery ajax request. before i was using xml http request. after learning online, i tried the following code but its not working. $('#vname').blur(function(e) { alert('checking'); $.ajax({ url:"ajax/aid.php", data: { $('#vname').val(); }, error: function() { $('#vname').focus(); $('#vname').css('background-color', '#F00'); }, dataType:"jsonp", success: function(result) { $('#vaid').val(result); $('#vname').css('background-color', '#1CDC06'); $('#vamt').focus(); }, type:POST }); });
  7. both are correct. types are also defined as [ INT(1) ] and phone number as [ INT(15) ]
  8. hello all! i've written the following table update code $updateq = $mysqli->prepare("UPDATE user SET address=?, phone=? WHERE uid=?"); if(!$updateq) { $_SESSION['err'] = "There is some error updating user info!"; die(header("location: uman.php?uid=$userid")); } else { $updateq->bind_param('sii', $addr, $phone, $userid); if (!$updateq->execute()) { $_SESSION['err'] = "There is some error executing user update!"; die(header("location: uman.php?uid=$userid")); } else { // success ?> <script> alert('User info updated successfully
  9. then it might not had found the file. check if the file exists on appropriate path that u defined..
  10. but the default <progress> bar on firefox and chrome is animated. only after stylling there is no any animation.
  11. sorry! i think i couldn't make u understand clearly. i meant that the <background-color> defines the color of the progress bar. but there is no any progressing (or running) dots (like they appear on IE inside the progress bar..
  12. and the color of the value??? color:#FF0;
  13. thank u for d reply and help. i got d required result using end($total)
  14. i expect to get sum of all $balance that i get from query
  15. i don't need the <meter>. i'm trying to display a progress bar until something (or page) is loaded..
  16. but its not working for me in firefox either.. i'm using firefox 41.0.2 EDIT: it styles the progress bar but doesn't display the progress...
  17. i want to sum each value from the retrieved values from an array. but i'm failing in this like, i get $balance for each $aid $ttl = 0while ($r = $q->fetch_array) { // .................. // .................. $aid = $r['aid']; $balance = $r['balance'];}$ttl += $balance;$totamtarr[ $aid ] = $balance;$runSum = 0;foreach($totamtarr as $clamt) { $runSum += $clamt; $total[] = $runSum;}echo $total; but this $total say -> "Array to string conversion in.................." please guide. thanks in advance...
  18. i was trying to style my progress bar with css. it worked fine with only IE but not with other browsers - chrome, firefox, opera. the following is what i tried progress { width:100%; color:#F00; background-color:#EFD259; height:30px; border-radius:10px; border:2px solid #FFF;}progress::-webkit-progress-bar { width:100%; color:#F00; background-color:#EFD259; height:30px; border-radius:10px; border:2px solid #FFF;}progress::-webkit-progress-value { width:100%; color:#F00; background-color:#EFD259; height:30px; border-radius:10px; border:2px solid #FFF;} https://jsfiddle.net/kza8ykxx/ pl
  19. i dont know. but in one of d books i read, it was said styling with css is better than using h tags.. and j.silver's prolem will be solved using span tag in stead of h tag
  20. why r u using <h1> tag? it is said to be deprecated. use <span> in stead and style it with the default elements of <h1> then remove the <span> tag that is inside the <h1> tag.
  21. style="width:95%; margin-left:auto; margin-right:auto;"
  22. funbinod

    summing results

    I also tried $total += $balance; and it also doesn't work. actually the $balance is derived from lots of calculations after the query so I don't know how can I make the sum of $balance in sql. that's why I wish the $total calculated with php...
×
×
  • Create New...