Helpful Information
 
 
Category: Embedded Programming
Webserver using uip1.0 stack

I am working on lpc2468 microcontroller.

I am using uip1.0 tcp/ip stack.

I want to make webpages for the ip configuration of the hardware, like it is available in the routers.

I am able to make and view simple static webpages.

For Dynamic Webpages, I tried creating webpages with form action methods and then processing the data from the url parsing. URL received is like
http://192.168.1.80/Settings.html?input1=12&input2=24
where input1 and input2 are the inputboxes names in the page.

This method is also working. But sometimes, the whole webpage does not loads, few characters gets missed. Due to which the whole webpage syntax changes. I have to refresh the webpage 2-3 times for loading it correctly.

Is there any way I could use to load and make webpages.

My webpage code sample is below for reference




<html>

<head>

<meta http-equiv="content-type"content="text/html" />

<script type="text/javascript">

text1="192.168.001.080";

text2="000.000.000.000";

text3="255.255.255.000";

text4="000.000.000.000";

text5="4040";

text6="4040";

text7="192.168.001.001";

text8="00-50-C2-EB-00-0E";

text9=0;

function load(){

document.getElementById('t1').value=text1;

document.getElementById('t2').value=text2;

document.getElementById('t3').value=text3;

document.getElementById('t4').value=text4;

document.getElementById('t5').value=text5;

document.getElementById('t6').value=text6;

document.getElementById('t7').value=text7;

document.getElementById('t8').value=text8;

document.getElementById('t9').checked=text9;

}

</script>

<title> .</title>

</head>

<body onload="load()" style="background-color:#C0C0C0">

<table width="1000" border="0">

<tr>

<td colspan="2" style="background-color:#FFA500;text-align:center">

<h1 style="color:#800000"> </h1>

</td>

</tr>

<tr valign="top">

<td style="background-color:#FFD700;width:150px;text-align:top;">

<br/><br/>

<span style="padding-left:21px"><a href="./Home.html"><b>Home</b></a><br />

<span style="padding-left:20px"><a href="./ChangeSettings.html"><b>Change Setting</b></a><br />

<span style="padding-left:20px"><a href="./ChangePassword.html"><b>Change Password</b></a><br />

<span style="padding-left:20px"><a href="./LogOut.html"><b>Logout</b></a>

</td>

<td style="background-color:#FAFAD2;height:200px;width:500px;text-align:top;">

<h2><b><span style="padding-left:100px">Configuration Settings</b></h2>

<form>

<fieldset>

<table border="0">

<tr>

<td><span style="padding-left:5px"><b>Local IP:</b> <span style="padding-left:40px"><input id="t1" type="text" name="input" size="15"/></td>

</tr>

<tr>

<td><span style="padding-left:5px"><b>Subnet Mask:</b><span style="padding-left:9px"><input id="t3" type="text" name="input" size="15"/></td>

</tr>

<tr>

<td><span style="padding-left:5px"><b>Local Port:</b><span sUUUU="padding-left:25px"> <input id="t5" type="text" name="input" size="4"/></td>


</tr>

<tr>

<td><span style="padding-left:5px"><b>Gateway:</b><span style="padding-left:40px"><input id="t7" type="text" name="input" size="15"/><br/><br/></td>

</tr>

<tr>
</tr>

</table>

</fieldset>

<br/><br/>

<span style="padding-left:250px"><input type="submit" value="Save"/>

</form>

</td>

</tr>

<tr>

<td colspan="2" style="background-color:#FFA500;text-align:center;">

<b></b></td>

</tr>

</table>

</body>

</html>










privacy (GDPR)