Jump to content

kamal213

Members
  • Content Count

    198
  • Joined

  • Last visited

Community Reputation

0 Neutral

About kamal213

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  1. Hi there Ok tried to uploads the file but that doesn't work either so I'll start typing the code in full again. Below is the full jquery script responsible for parsing variable between file. it work fine in Internet explorer but not on Chrome or firefox. <script language = "JavaScript" type = "text/javascript"> function ajax_post(){ // Create our XMLHttpRequest object var hr = new XMLHttpRequest(); // Create some variables needed to send to our PHP file var url = "orderfilefunc.php"; var sd = document.getElementById("startdate").value; var ed = document.getElementById("enddate"). value; var ot = document.getElementById("ordertype").value; var vars = "startdate="+sd+"&enddate="+ed+"&ordertype="+ot; hr.open("POST", url, true); // SET content type header information for sending url encoded variables in the request hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); // Access the onreadystatechange event for the XMLHttpRequest object hr.onreadystatechange = function() { if(hr.readyState == 4 && hr.status == 200) { //alert("form was submitted"); var return_data = hr.responseText; document.getElementById("status").innerHTML = return_data; } } // Send the data to PHP now... and wait for response to update the status div hr.send(vars); //Actually execute the request document.getElementById("status").innerHTML = "processing..."; } <script>
  2. Hi there Ok tried to uploads the file but that doesn't work either so I'll start typing the code in full again. Below is the full jquery script responsible for parsing variable between file. it work fine in Internet explorer but not on Chrome or firefox. <script language = "JavaScript" type = "text/javascript"> function ajax_post(){ // Create our XMLHttpRequest object var hr = new XMLHttpRequest(); // Create some variables needed to send to our PHP file var url = "orderfilefunc.php"; var sd = document.getElementById("startdate").value; var ed = document.getElementById("enddate"). value; var ot = document.getElementById("ordertype").value; var vars = "startdate="+sd+"&enddate="+ed+"&ordertype="+ot; hr.open("POST", url, true); // SET content type header information for sending url encoded variables in the request hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); // Access the onreadystatechange event for the XMLHttpRequest object hr.onreadystatechange = function() { if(hr.readyState == 4 && hr.status == 200) { //alert("form was submitted"); var return_data = hr.responseText; document.getElementById("status").innerHTML = return_data; } } // Send the data to PHP now... and wait for response to update the status div hr.send(vars); //Actually execute the request document.getElementById("status").innerHTML = "processing..."; } <script>
  3. Hi there Ok tried to uploads the file but that doesn't work either so I'll start typing the code in full again. Below is the full jquery script responsible for parsing variable between file. it work fine in Internet explorer but not on Chrome or firefox. <script language = "JavaScript" type = "text/javascript"> function ajax_post(){ // Create our XMLHttpRequest object var hr = new XMLHttpRequest(); // Create some variables needed to send to our PHP file var url = "orderfilefunc.php"; var sd = document.getElementById("startdate").value; var ed = document.getElementById("enddate"). value; var ot = document.getElementById("ordertype").value; var vars = "startdate="+sd+"&enddate="+ed+"&ordertype="+ot; hr.open("POST", url, true); // SET content type header information for sending url encoded variables in the request hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); // Access the onreadystatechange event for the XMLHttpRequest object hr.onreadystatechange = function() { if(hr.readyState == 4 && hr.status == 200) { //alert("form was submitted"); var return_data = hr.responseText; document.getElementById("status").innerHTML = return_data; } } // Send the data to PHP now... and wait for response to update the status div hr.send(vars); //Actually execute the request document.getElementById("status").innerHTML = "processing..."; } <script>
  4. Please find attached the full jquery code, please open with notepad, tried to type the code again but its been an absolute nightmare. Thanks
  5. Sorry guys please ignore the above I submitted the topic half way through typing by accident. this system is has been a nightmare to use. Tried to see if I could edit it but you cant copy and paste or upload so had to type the code again only to press submit and discover I cant save changes cause I don't have permission so I bit upset. Will try and type this again so please bear with me
  6. Hi guys The code below is meant to parse variables from one page/file to the next. It works perfectly on all IE's but not on Firefox or Chrome for some reason. Could you have a look please for the reason why it doesn't work on Firefox and Chrome and how this could be solved. Thanks a lot. <script language="JavaScript" type="text/javascript"> function ajax_post(){ //Create XMLHttpRequest object
  7. Wow! Barand you are a PHP god in human form! Thanks a lot that's exactly what I was looking for and more. Love the fact I can even update the previous records into a new column with the correct format. Thanks a bunch men, Amazing! Have a nice day!
  8. Hi there, I'm basically trying to do the following in mysql: SELECT sale_date FROM customer-sale WHERE sale_date BETWEEN '05/02/2015' AND '10/02/2015' However I keep getting 0 results, I found out that the issue is with my date format as it should be in (YYYY-mm-dd) format. Now I know, wish I know so about a year ago as I already have over 1500 records on my customer table so to late to change. So I need help with the following: 1.) Is there a search query that can convert dd/mm/yyyy into YYYY-mm-dd so I can run the above query 2.) Is there a way to convert the dates using PHP Need help Thanks a alot
×
×
  • 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.