Thanks in advance for taking the time to read this. Below is some ASP VB code that I'm trying to change to Javascript so I'm not limited to Windows web servers. There is much more to it, but I didn't want to post the entire web page code here. You can access the result at Anyway, as you can see, I am defining default variables using if/then/else statements. Then, a users is able to change these variables by a simple POST form that just reloads the same page with the new variables. What I can't seem to do is have the variables print in the proper areas using Javascript, and I also cannot get the form to work. Perhaps I will need a separate form handling script since I'm trying to switch from server-side to client-side scripting? Thanks!
<%
if Request.form("height") = "" then
height = "400"
else
height = Request.form("height")
end if
if Request.form("width") = "" then
width = "620"
else
width = Request.form("width")
end if
%>
//html stuff
<SCRIPT LANGUAGE=javascript>
<!--
var codebase="if (navigator.userAgent.toUpperCase().indexOf("MAC") >= 0)
document.write("<APPLET codebase=\""+codebase+"\" CODE=\"javAPRS.class\" archive=\"japrsmac.jar\" WIDTH=<%Response.write width%> HEIGHT=<%Response.write height%>>");
else
{
document.write("<APPLET codebase=\""+codebase+"\" CODE=\"javAPRS.class\" archive=\"japrs.jar\" WIDTH=<%Response.write width%> HEIGHT=<%Response.write height%>>");
document.write("<param name=\"cabbase\" value=\"japrs.cab\">");
}
// -->
</SCRIPT>
//html stuff
<FORM METHOD="Post" action="bakervegas.asp">
Enter Map Width (pixels): <INPUT TYPE="Text" NAME="width" VALUE="<%Response.write width%>" SIZE="4"> 
Enter Map Height (pixels): <INPUT TYPE="Text" NAME="height" VALUE="<%Response.write height%>" SIZE="4">
<P><INPUT TYPE="Submit" VALUE="Customize" NAME="Size"></FORM></P>
<%
if Request.form("height") = "" then
height = "400"
else
height = Request.form("height")
end if
if Request.form("width") = "" then
width = "620"
else
width = Request.form("width")
end if
%>
//html stuff
<SCRIPT LANGUAGE=javascript>
<!--
var codebase="if (navigator.userAgent.toUpperCase().indexOf("MAC") >= 0)
document.write("<APPLET codebase=\""+codebase+"\" CODE=\"javAPRS.class\" archive=\"japrsmac.jar\" WIDTH=<%Response.write width%> HEIGHT=<%Response.write height%>>");
else
{
document.write("<APPLET codebase=\""+codebase+"\" CODE=\"javAPRS.class\" archive=\"japrs.jar\" WIDTH=<%Response.write width%> HEIGHT=<%Response.write height%>>");
document.write("<param name=\"cabbase\" value=\"japrs.cab\">");
}
// -->
</SCRIPT>
//html stuff
<FORM METHOD="Post" action="bakervegas.asp">
Enter Map Width (pixels): <INPUT TYPE="Text" NAME="width" VALUE="<%Response.write width%>" SIZE="4"> 
Enter Map Height (pixels): <INPUT TYPE="Text" NAME="height" VALUE="<%Response.write height%>" SIZE="4">
<P><INPUT TYPE="Submit" VALUE="Customize" NAME="Size"></FORM></P>