Jump to content

rizwansyed

Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by rizwansyed

  1. Similar issues
  2. Hi As you suggested i am able to submit the form with POST and url.am able to receive it on server side. But not getting any data. Submit is success but no data.I think submit is not getting any data.so it is submitting with no data. Attached is my modified source code. Please suggest how to get a data in submit Thanks and Regards Rizwan Syed mass.txt
  3. Hi, Am able to get the dynamic data every 1 sec. I need to submit a form using ajax so that i can avoid going to other page with html. Please suggest how to use submit form using ajax.
  4. Hi Please suggest how to use ajax for submitting the data. Please share a example using AJAX and FORM action
  5. Hi I have a html code, how can i modify to use submit button using ajax. Attached is the html code Please suggest mass.txt
  6. Hi Whenever i click on submit button,It goes to other page in html and i need to press back button. I came to know that with AJAX, It is possible to avoid going to next page as it does in background. Can anyone please share a example for ajax submit form Please suggest Thanks and Regards Rizwan Syed
  7. Hi Dsonesuk, The above mentioned method is not working.I only get whatever data is available in file.Not henry ford. I forgot to tell i used GET method to get data continuously. Now am getting the dynamic data, thats fine. I have a input text box in my HTML page. What ever the dynamic data i receive is it possible to keep it in text box. Please suggest
  8. Hi Now it is able to read the data from my file ajax_info.txt.Only static data present in file am getting. So now how can i get updated value from my board. DO i need to write it continuously to ajax_info.txt or any other way to do it.
  9. Hi Dsonesuk, Actually form usage i have checked with html.it works fine. With Ajax am trying to use setInterval("loadDoc()", 1000); as shown in attached figure. Every 1 sec, i can able to see the data receiving at POST request on board side ( checked through breakpoint). Now in sd card i have kept a file "ajax_info.txt" with some static data in it.But am not getting any data. atest.txt
  10. Hi am able to run using XAMPP on PC. When i run from my board, am not getting proper data. I mean it is not fetching the file index_1.txt.html and index_1.txt file are available in same path in sd card. Anything wrong Instead of using second argument with file name, is it possible to use as a function and call it in same file in below code xhttp.open("POST", "index_1.txt", true); Please suggest Thanks and Regards Rizwan Syed
  11. Hi 1.am able to run using XAMPP on PC. When i run from my board, am not getting proper data. I mean it is not fetching the file index_1.txt.html and index_1.txt file are available in same path in sd card. Anything wrong 2.Instead of using second argument with file name, is it possible to use as a function and call it in same file in below code xhttp.open("POST", "index_1.txt", true); Please suggest Thanks and Regards Rizwan Syed
  12. Hi How to run ajax code in my web browser. Do i need to install a test server on board side to support it?
  13. Hi 1.Now am able to run using XAMPP on PC. 2.Instead of using second argument with file name, is it possible to use as a function and call it in same file in below code xhttp.open("POST", "index_1.txt", true); 3.When i run from my board, am not getting proper data. I mean it is not fetching the file index_1.txt.html and index_1.txt file are available in same path in sd card. Anything wrong Please suggest Thanks and Regards Rizwan Syed
  14. Hi I have loaded the same file on my PC xhttp.open("POST", "index_1.txt", true); and i have index_1.txt file in my same folder as html file. When i press the button , am not getting the content present in index_1.txt file Please suggest
  15. Hi I am working on AJAX basics of post. https://www.w3schools.com/js/tryit.asp?filename=tryjs_ajax_post I have tried above example and it prints as below: This content was requested using the POST method. Requested at: 8/29/2018 7:46:26 AM How Does This gets printed? Is it getting the data from "demo_post.asp". Can anyone share the contents of "demo_post.asp" and clear understanding how it works Thanks and Regards Rizwan Syed
  16. Hi My board can access post requests. By seeing above link, it has "xhttp.open(\"GET\", \"ajax_info.txt\", true);" Do it need a file for taking a data. How does it work Actually my code will be searching a delimiter and then replace the text or value corresponding to it. I may not be using any other file
  17. Hi Dsonesuk https://renesasrulz.com/synergy/f/synergy---forum/10817/writing-data-on-web-browser Some one has used a AJAX for writing , who has similar requirement. Will this be helpful for writing a dynamic data, being a new for AJAX.i need to get some info on this
  18. Hi Am trying to execute basic example from w3schools, but am only getting "Getting server updates " print and nothing else. I have kept my two files.index.html and "demo_sse.php" in same folder and trying to load html file. demo_sse.php : <?php header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); $time = date('r'); echo "data: The server time is: {$time}\n\n"; flush(); ?> index.html: <!DOCTYPE html> <html> <body> <h1>Getting server updates</h1> <div id="result"></div> <script> if(typeof(EventSource) !== "undefined") { var source = new EventSource("demo_sse.php"); source.onmessage = function(event) { document.getElementById("result").innerHTML += event.data + "<br>"; }; } else { document.getElementById("result").innerHTML = "Sorry, your browser does not support server-sent events..."; } </script> </body> </html> Please suggest any mistake am doing here Thanks and Regards Rizwan Syed
  19. Hi Dsonesuk, Thanks for the Reply .It may not work as this again similar to refreshing to get the value. Is It possible to do with HTML. Please suggest
  20. Hi Dsonesuk, I have a S7G2-DK MCU board which interacts with HTML file loaded from SD card. As mentioned above the code below has a delimiter "$$$". The code inside delimiters will be searched and replaced with a particular text or value. var fxn = function() { document.getElementById('time').innerHTML = "$$$ABC1$$$"; } "$$$ABC1$$$" is one delimiter. Similarly it counts the number of delimiters in the html file and updates the values based on our values assigning to replace the delimiter on html file . The problem am facing is, whenever i refresh my web page only that particular time, the value gets updated else it will be a constant. But i need whenever there is change in value,it should get updated without refreshing my web page. This is my requirement and am not getting exactly how to solve this Please suggest Thanks and Regards Rizwan Syed
  21. Hi Dsonesuk Yes correct. I think from HTML it is updating. But I think board is not sending updated value
  22. Hi Funce, Thanks for the reply. Actually My requirement is, I need to reload only a portion of the page like only the updating value to my html page . Its like updating time where only seconds are updating and other part is constant. Similar way i need to update all the values which changes dynamically every 1 second. In the above post, i tried the code which i have posted, it updates only once whenever i refresh and not continuous. Without refreshing i should be able to update the values . Thanks and Regards Rizwan Syed
  23. Hi I have a sample code for dynamic update of value every 1 sec. <script> var count = 100; var fxn = function() { count++; document.getElementById('time').innerHTML = count; } setInterval(fxn, 1000); </script> <div id=time></div> As in above example, i need to display dynamic values every second . So i tried to modify my code as below. <br> <input style="border:none;font-size:18pt;" type="text" name="$$$undefinedA1$$$" size="10" > <script> var fxn = function() { document.getElementById('time').innerHTML = "$$$ABC1$$$"; } setInterval(fxn, 1000); </script> <div id=time> </div> In above code , i will receive the value from my board in "$$$ABC1$$$". So i should be able to update the value continuously on web browser apge. I tried above code but doesnot work.Please suggest how to proceed.
  24. Thanks for the reply. I didnt get exactly what u mean to say but i tried <form action="/action_page.php" method="post" autocomplete="off" onsubmit="Validate()"> with two script files but didnt get it work. Can you just explain once again
  25. Hi I have a code in which i am running a script for drop-down list to show only the selected drop-down content as shown in attached file. I need to add one more script file for alerting a warning for unselected drop-down list as shown below <input type="submit" value="submit" onclick="return Validate()" /> <script > function Validate() { var abc = document.getElementById("opts"); if (abc.value == "") { //If the "Please Select" option is selected display error. alert("Please select an option!"); return false; } return true; } </script> How can i merge two script files or anyway to call both files Please suggest Thanks and Regards Rizwan Syed adding one more script file.txt
×
×
  • Create New...