Jump to content

s_avinash_s

Members
  • Posts

    121
  • Joined

  • Last visited

Everything posted by s_avinash_s

  1. Hi Actually exam.txt file dont have anything to send.everything i send is through "xhttp.send(formData);". exam.txt is just kept it to receive it as a unique resource i mean else if ((NX_HTTP_SERVER_POST_REQUEST == request_type) && (0 == strcmp (resource, "/exam.txt")))
  2. Hi In Above code it has not changed to xhttp, but in my code.everything is xhttp only not valid. As it is already xhttp , that should not be an issue.something else might be
  3. Hi The data whatever we receive using xhttp from server.Is it possible to increase its font size and change the colour without using input text. Thanks Avinash
  4. Hi Now i am getting a sigbus interrupt and stops. Thread #1 1 (single core) (Suspended : Signal : SIGBUS:Bus error) Default_Handler() at startup_S7G2.c:84 0x16fa0 <signal handler called>() at 0xfffffff1 _tx_timer_expiration_process() at tx_timer_expiration_process.c:270 0x39d8 _tx_timer_interrupt() at tx_timer_interrupt.c:142 0x1e88 0xffffffec but am receiving some data on server side request=post and resource =/exam.txt and no data is received <form action="/exam.txt" id="myForm" method="post" autocomplete="off" onsubmit="entry(event)"> <div> <label for="username">Dismissed students:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">Failed students:</label> <input type="text" id="useracc" name="useracc"> </div> <input type="submit" value="Submit!"> </form> <script> function entry(e) { e.preventDefault(); var myForm = document.getElementById('myForm'); formData = new FormData(myForm); var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("exam").innerHTML = this.responseText; } }; xhttp.open("POST", "exam.txt", true); xhttp.send(formData); } } </script> Here is the log resource =/exam.txt request_type =2 g_post_data =-----------------------------284341963928912 Select Option -----------------------------284341963928912 Content-Disposition: form-data; name="jq" 1 -----------------------------284341963928912 Content-Disposition: form-data; name="jjq" 1 -----------------------------284341963928912-- </h1><a href="/">Back</a></body></html> Is there any issue with sending from client side
  5. HI <form action="/exam.txt" id="myForm" method="post" autocomplete="off" onsubmit="myFunction()"> <div> <label for="username">Dismissed students:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">Failed students:</label> <input type="text" id="useracc" name="useracc"> </div> <input type="submit" value="Submit!"> </form> <script> function entry() { var myForm = document.getElementById('myForm'); formData = new FormData(myForm); var valid = new XMLHttpRequest(); valid.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("exam").innerHTML = this.responseText; } }; valid.open("POST", "exam.txt", true); xhttp.send(formData); } function myFunction() { document.getElementById("myForm").addEventListener("event", function(event){ event.preventDefault() }); } </script> I have used like above , still it goes to other page, Is anything wrong Please Help Thanks and Regards Avinash
  6. Hi how to insert code in button brackets. Please help to add code in button brackets sorry for inconvenience
  7. how to add code in button brackets. Please help to add code in button brackets sorry for inconvenience
  8. Hi I have used buttons like above < >, dont know if its proper.Sorry if its wrong < <form action="/exam.txt" id="myForm" method="post" autocomplete="off" onsubmit="myFunction()"> <div> <label for="username">Dismissed students:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">Failed students:</label> <input type="text" id="useracc" name="useracc"> </div> <input type="submit" value="Submit!"> </form> <script> function entry() { var myForm = document.getElementById('myForm'); formData = new FormData(myForm); var valid = new XMLHttpRequest(); valid.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("exam").innerHTML = this.responseText; } }; valid.open("POST", "exam.txt", true); xhttp.send(formData); } function myFunction() { document.getElementById("myForm").addEventListener("event", function(event){ event.preventDefault() }); } </script> > I have used like above , still it goes to other page, Is anything wrong
  9. Hi Can you please check my other post . http://w3schools.invisionzone.com/topic/58213-submit-with-xhttp/
  10. Hi I can able to receive a data to my server but also it goes to other page "http://192.168.3.63/exam.txt" and displays problem loading page. I want it to send a data to server and don't want going to other page <div id="Examination" class="tabcontent"> <form action="/exam.txt" id="myForm" method="post" autocomplete="off" > <div> <label for="username">Dismissed students:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">Failed students:</label> <input type="text" id="useracc" name="useracc"> </div> <input type="submit" value="Submit!"> </form> <script> function entry() { var myForm = document.getElementById('myForm'); formData = new FormData(myForm); var valid = new XMLHttpRequest(); valid.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("exam").innerHTML = this.responseText; } }; valid.open("POST", "exam.txt", true); xhttp.send(formData); } </script> Please suggest how to proceed. Thanks Avinash
  11. with document.getElementById("demo2").value=this.responseText; document.getElementById("myText").value=this.responseText; I can able to get the data in text box .but gets junk characters at the end
  12. Hi What is being wrong so that am getting "undefined " Please help
  13. Hi Am trying to submit the data to server, nothing is received on server. I mean "dismissed students" and "failed students " am filling and sending but not receiving on server side. How to get the data on server side. <div id="Examination" class="tabcontent"> <html> <body> <p id="exam"></p> dismissed students: <input type="text" name="index1" size="10"> <br><br> failed students: <input type="text" name="index2" size="10"> <button type="button" onclick="entry()">submit</button> <script> function entry() { var formData = new FormData(); var valid = new XMLHttpRequest(); valid.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("exam").innerHTML = this.responseText; } }; valid.open("POST", "exam.txt", true); xhttp.send(formData); } </script> I just added "formData" and i get just some junk characters not original data.How to fill the data in "formData" How to get the data, anything else is required to make it work. Thanks Avinash
  14. Hi Value is printing in my text box but showing undefined. <p id="demo2"></p> <script> function abc() { var valID = document.getElementById("demo2").value; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo2").value=this.responseText; } }; xhttp.open("GET", "hex.txt", true); xhttp.send(); } setInterval("abc()", 1000); </script> <input type="text" id="myText" > <script> function myFunction() { document.getElementById("myText").value = this.responseText; } </script>
  15. But we will be receiving a value from server in document.getElementById("demo2").value= this.responseText; So how to get that value in my html text box.
  16. Hi I modified like below and can see some improvement. Am getting a textbox with value as "this.responseText;". How can i get receiving value from server <p input type="text" id="demo2"></p> <script>function abc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo2").value= this.responseText; } };xhttp.open("GET", "hex.txt", true);xhttp.send();}setInterval("abc()", 1000);</script> <input type="text" id="demo2" size="20" value="this.responseText">
  17. Hi Am not understanding.i tried like below. Can you just modify below code . Please as am not getting with so much of suggestions also <p input type="text" id="demo2"></p> <script>function abc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo2").value= this.responseText; <input type="text" id="demo" size="20" .value="this.responseText"> } };xhttp.open("GET", "hex.txt", true);xhttp.send();<input type="text" id="demo" size="20" value="this.responseText">}setInterval("abc()", 1000);</script>
  18. Am new to ajax and html.I am not able to understand. Can you just share any example similar to above. <p id="demo2"></p> <script>function abc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo2").value= this.responseText; } };xhttp.open("GET", "hex.txt", true);xhttp.send();<input type="text" id="demo" size="20" value="this.responseText">}setInterval("abc()", 1000);</script> Am not getting text box .and value also not printing Thanks Avinash
  19. Hi <p id="demo2"></p> <script> function abc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo2").innerHTML = this.responseText; } }; xhttp.open("GET", "hex.txt", true); xhttp.send(); <input type="text" id="demo2" size="20" value="this.responseText"> } setInterval("abc()", 1000); </script> I tried like above but not able to get.Is it wrong Please help Thanks Avinash
  20. Hi All Am working on Web server .Am able to send GET request to server and receive the data from server with some delay using setInterval API. Is it possible to store the data receiving from server in some text box? Thanks and Regards Avinash
×
×
  • Create New...