Hello Guys
Please check this below code and tell me how can I get the value of textbox into javascript function .
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function setElementVisibility(elementToSet, showItSwitch, keepPlacementSwitch){
if (showItSwitch) {
elementToSet.style.display = "inline";
elementToSet.style.visibility = "visible";
}
else{
elementToSet.style.display = "inline";
elementToSet.style.visibility = "hidden";
}
function hideTable(){
setElementVisibility(document.getElementById("a"), false, document.getElementById('TextBox1').value);
}
function removeTable(){
setElementVisibility(document.getElementById("a"), false, call(a));
}
function showTable(){
setElementVisibility(document.getElementById("a"), true);
}
</script>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:50px;
height:39px;
z-index:1;
left: 273px;
top: 177px;
}
#Layer2 {
position:absolute;
width:43px;
height:40px;
z-index:1;
left: 0px;
top: 0px;
}
-->
</style>
</head>
<body>
<div>
<form id="form1" runat="server">
<div>
<div id="Layer1"><img src="green.gif" width="28" height="28" alt="a" />
<div id="Layer2"><img src="red.gif" width="28" height="28" alt="a" id="a"/></div>
</div>
<p> </p>
Insert <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</form>
<p> </p>
<p><img alt="a" src="map.gif" width="672" height="587" usemap="#Map" />
<map id="Map">
<area alt="a" shape="poly" onclick="hideTable()"
coords="267,102,253,96,239,80,239,62,251,
48,241,34,229,24,236,21,243,17,252,10,267,9,
281,13,287,25,294,30,309,45,324,44,340,35,355,
42,351,56,345,74,332,85,349,101,333,107,312,
105,306,97,295,93,286,90,279,97,268,105,266,
104" href="#" />
<area alt="a" shape="poly" id="Area1" style="border-color: #000000"
coords="221,275,204,253,168,238,
155,210,166,194,202,187,226,168,238,
155,268,189,270,209,245,232,282,
220" href="#" />
</map>
</p>
</div>
</body>
</html>