Jump to content

Search the Community

Showing results for tags 'submit form'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 2 results

  1. hello. I have a html form designed using W3CSS. There is a SELECT field which I have used an ONCHANGE command, & this submits the form when the select is changed. HOWEVER, the button, does not submit the form. It just moves the page to the DIV anchor. At the top of the page I have the current time - hh:mm:ss. When I press the w3blue button, (select animal) the page moves, so the 'menu' div is at the top of the visible page, However the clock/time at the top doesn't change. <form class="w3-container" action="/animals/#menu"> <select class="w3-select" name="viewpet" onchange="this.form.submit()"> <option value="">Select Animal</option> <option value="220000001" selected="selected">220000001, cat, Jerry, (m) scottish_fold</option> <option value="220000002" >220000002, cat, Jerry, (f) toyger</option> </select> <button class="w3-btn w3-blue">Select Animal</button> </form> I'm going to add a few extra input values/fields in, But what do I do to fix the form so the blue button actually submits the page & refreshes it..? i am following this website. https://www.w3schools.com/w3css/w3css_input.asp (Half the examples don't even have a submit button to test...) EDIT: ive got a 2nd form on the same page, the submit button is exactly the same (very similar) - Both forms have no ID's etc - no names.. It just submits "this form". I'm not sure why 1 form works & one form doesn't. (the div ID is above both the forns - To see part of the visible page I want folk directed to.. BOTH forms go to the sane page/div ID. )
  2. Here is a niggling problem I have with an embedded web server.The issue i am having is when I submit my form the form data is submitted to the web server, the web server updates a duel port RAM chip and will then read from that duel port RAM. The problem is the action of reading and writing to the duel port RAM causes a delay in data being passed back to and Web Server.If I write for example the value selected in the option list and submit the form the value is written to the server and when the form reloads it attempt to read the values written from the duel port RAM. The problem is that I always get the previously stored value because the Web server updates quicker than the RAM updates. If I hit the submit button twice the value is read back fine.I put in a breakpoint in the ReadReadBlock but it shows the previous read so I know the problem is due to the slow update from the RAM to the Web server.How can I get around the delay between submitting the form and reading the data back when the form loads.Below is my HTML and Javascript and was hoping that something could give me some pointers.Write to server function is<?--#exec cmd_argument='scanf("parameter", "%u", OutWriteword( 0 ))'-->Read from server function is<?--#exec cmd_argument='printf("%i",InReadUword(44))'-->Many thanks <!DOCTYPE html><head><link rel="stylesheet" type="text/css" href="../css/styles.css" media="screen"><title>BW500</title><script type="text/javascript" src="js/convert.js"></script><script>window.addEventListener('load',ReadReadBlock)</script></head><body><form action="test.html" method="post" id="spa" ><input type="text" id="r_parameter" name="r_parameter"value="<?--#exec cmd_argument='printf("%i",InReadUword(44))'-->"></input><input type="text" id="r_dp" name="r_dp"value="<?--#exec cmd_argument='printf("%i",InReadUword(54))'-->"></input><input type="text" id="r_priindex" name="r_priindex"value="<?--#exec cmd_argument='printf("%i",InReadUword(46))'-->"></input><input type="text" id="r_valueread" name="r_valueread"value="<?--#exec cmd_argument='printf( "%d",InReadUlong(50))'-->"></input><select name="parameter" id="parameter" onChange="WriteWriteBlock()"><option value="911">mA output</option><option value="914">mA input Value</option><option value="918">Speed Frequency</option><option value="940">Load Cell mV</option><option value="943">A/D Reference</option><option value="367">Direct Zero</option><option value="368">Direct Span</option><option value="377">Inital Zero</option><option value="378">Inital Span</option><option value="950">Zero Register</option><option value="951">Span Register</option><option value="341">Days of Service</option><option value="948">Error Log</option></select><select name="pri" id="pri"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="5">5</option></select><input type="hidden" name="dp" id="dp"></input><input type="submit" value="Submit"></input></form><?--#exec cmd_argument='scanf("parameter", "%u", OutWriteword( 0 ))'--><?--#exec cmd_argument='scanf("priindex", "%u", OutWriteword(2))'--><?--#exec cmd_argument='scanf("dp", "%u", OutWriteword(10))'--></body></html> function ReadReadBlock(p,pr,d,value_in){p= document.getElementById('r_parameter').value;pr= document.getElementById('r_priindex').value;d = document.getElementById('r_dp').value;value_in= document.getElementById('r_valueread').value;switch (p){case "911": /mA output/document.getElementById('parameter').selectedIndex = 0;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 2;d=2;break;case "914": /mA input/document.getElementById('parameter').selectedIndex = 1;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 2;d=2;break;case "918": /Speed Input/document.getElementById('parameter').selectedIndex = 2;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value =2;d=2;break;case "940":/Loadcell mV/document.getElementById('parameter').selectedIndex = 3;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 2;d=2;break;case "943": /AD Referonce/document.getElementById('parameter').selectedIndex = 4;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 0;d=0;break;case "367": /Direct Zero/document.getElementById('parameter').selectedIndex = 5;document.getElementById("pri").disabled = true;document.getElementById("r_dp").value = 0;d=0;break;case "368":/Direct Span/document.getElementById('parameter').selectedIndex = 6;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 0;d=0;break;case "377": /Inital Zero/document.getElementById('parameter').selectedIndex = 7;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 0;d=0;break;case "378":/Inital Span/document.getElementById('parameter').selectedIndex = 8;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 0;d=0;break;case "950": /Zero Register/document.getElementById('parameter').selectedIndex = 9;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 0;d=0;break;case "951":/Span Register/document.getElementById('parameter').selectedIndex = 10;document.getElementById("pri").disabled = false;document.getElementById("r_dp").value = 0;d=0;break;case "341": /Days of Service/document.getElementById('parameter').selectedIndex = 11;document.getElementById("pri").disabled = true;document.getElementById("r_dp").value = 0;d=0;break;case "948": /error log/document.getElementById('parameter').selectedIndex = 12;document.getElementById("pri").disabled =false;document.getElementById("r_dp").value = 0;d=0;break;}switch (d){case 0:document.getElementById("r_valueread").value=value_in;break;case 1:document.getElementById("r_valueread").value=value_in/10;break;case 2:document.getElementById("r_valueread").value=value_in/100;break;case 3:document.getElementById("r_valueread").value=value_in/1000;break;}}
  • Create New...