Alex
Alex
Problem with ajax using jquery when sending data to php
I am having a weird problem sending data to php using ajax with JQuery here is my code:
<?php
$chkStates = $_POST['chkStatesObject'];
$newChkStates = json_decode($_POST['newChkStates'], true); // True to convert the JSON result to an associative array.
echo gettype($newChkStates);
echo sizeof($newChkStates);
?>
<?php
$chkStates = $_POST['chkStatesObject'];
$newChkStates = json_decode($_POST['newChkStates'], true); // True to convert the JSON result to an associative array.
echo gettype($newChkStates);
echo sizeof($newChkStates);
?>
JavaScript
function ConfirmReservationOptions()
{
if(newChkStates.charAt(newChkStates.length - 1) == ",")
newChkStates = '"{' + newChkStates.slice(0, -1) + '}"';
// console.log(newChkStates);
$.ajax({
url: 'confirm_reservation_options.php',
type: 'POST',
async: true,
data: {chkStatesObject: chkStatesObject, newChkStates: JSON.stringify(newChkStates)},
success: function(response){
$("#reservationOptionsResults").html(response);
},
});
}
function ConfirmReservationOptions()
{
if(newChkStates.charAt(newChkStates.length - 1) == ",")
newChkStates = '"{' + newChkStates.slice(0, -1) + '}"';
// console.log(newChkStates);
$.ajax({
url: 'confirm_reservation_options.php',
type: 'POST',
async: true,
data: {chkStatesObject: chkStatesObject, newChkStates: JSON.stringify(newChkStates)},
success: function(response){
$("#reservationOptionsResults").html(response);
},
});
}
8 replies
Timer Control ticking slower than real life in C#
I am making a simple Timer application in windows forms using C#. The problem is when I start the timer, it ticks slightly slower than a real timer. Anyone knows why and how I can solve this?
10 replies
Need Advice Choosing Framework
I want to start a new project, and I want to build a website that includes both front-end and back-end. The problem I am facing is that I have never used a framework, and there are a lot of them for front-end. Can anyone suggest me a good, if not the best framework to use? It is important that the framework is supported and has a lot of resources in case I get stuck at some point and need to search for answers on the internet. I have ready learned basic HTML, CSS, and JavaScript, and currently learning PHP.
58 replies
AutoNumber VS Number
Language: DataBase. Program: Microsoft Access. Question: When creating new tables. What is a good practice to use AutoNumber and what is a good practice to use Number? In other words, when is it better to use which? I know the differences but I am just not sure how that would effect implementation when using a programming language like C# to read/write in/to the database. Feel free to go in as many details and view this in different angles if you like to. The more info I can get the better. Thank you.
19 replies
Is there a tool that converts plain text to LaTeX in C#?
Hi Is there a NuGet package maybe or a tool in Visual Studio that I can use that converts plain text to LaTeX code automatically? It is important to have it return the LaTeX result as a string. It would actually be perfect if CSharpMath or SkiaSharp is capable of doing this. And If so, how? If not, what other options do I have? Example: string equation = "x=a/b". Here, x=a/b is in plain text, it would be nice to feed this string to a parser function of some sort that can return a LaTeX string representing the input given. In my actual case, I am taking a string from a user TextBox so I don't know what equation the user will be providing. Solved
13 replies