Click here to Skip to main content
15,915,765 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Control that automatically drags when page is scrolled down Pin
CandyMe22-Oct-07 18:45
CandyMe22-Oct-07 18:45 
GeneralRe: Control that automatically drags when page is scrolled down Pin
Bjohnson3323-Oct-07 0:56
Bjohnson3323-Oct-07 0:56 
GeneralRe: Control that automatically drags when page is scrolled down Pin
CandyMe25-Oct-07 2:31
CandyMe25-Oct-07 2:31 
GeneralRe: Control that automatically drags when page is scrolled down Pin
Bjohnson3325-Oct-07 22:12
Bjohnson3325-Oct-07 22:12 
GeneralRe: Control that automatically drags when page is scrolled down Pin
CandyMe29-Oct-07 17:38
CandyMe29-Oct-07 17:38 
QuestionI used nant to build ASP .NET application Pin
balpanbh14-Oct-07 18:36
balpanbh14-Oct-07 18:36 
AnswerRe: I used nant to build ASP .NET application Pin
Paddy Boyd15-Oct-07 2:49
Paddy Boyd15-Oct-07 2:49 
Question[modified]To set the borders of the layers in javascript. Pin
gopal_Pandey13-Oct-07 5:17
gopal_Pandey13-Oct-07 5:17 
-- modified at 2:14 Monday 15th October, 2007
hi friends,
I know one of u can answer this question.

my question is how to set the border of the layer at client side programming.......

i am at beginner level in javascript even after that i made a function called setBorder in which i am setting the border of the layer but at runtime it giving the error ::"document.form1.layer1.style.border is null or not an object."

now here is i am giving my code which i am using please tell me what i have to do if i am wrong where i am wrong.....

this code i am using in asp.net

Thanks in advance...........


<HTML>
<HEAD>
<title>Test</title>
</HEAD>
<body>
<script language="javascript">
function setBorder(layer)
{
resetBorder();
if (layer==1)
document.form1.layer1.style.border = 2;
if (layer==2)
document.form1.layer2.style.border = 2;
if (layer==3)
document.form1.layer3.style.border = 2;
if (layer==4)
document.form1.layer4.style.border = 2;
if (layer==5)
document.form1.layer5.style.border = 2;
}

function resetBorder()
{
document.form1.layer1.style.border = 0;
document.form1.layer2.style.border = 0;
document.form1.layer3.style.border = 0;
document.form1.layer4.style.border = 0;
document.form1.layer5.style.border =0;
}

//==============================>

function DispUpload(ControlNo)
{
document.form1.oFile.disabled=false;
document.form1.txtControlNo.value=ControlNo;
alert(ControlNo);
return true;
}
</script>


<form id="form1" runat="server">
<table id="table1" style="WIDTH: 625px; HEIGHT: 714px" borderColor="#800000" height="714"
width="625" border="1" runat="server">
<tr>
<td style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid">
<div id="layer1" onclick="setBorder(1);" style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: 1px solid; PADDING-LEFT: 4px; Z-INDEX: 2; LEFT: 41px; PADDING-BOTTOM: 1px; BORDER-LEFT: 1px solid; WIDTH: 188px; PADDING-TOP: 1px; BORDER-BOTTOM: 1px solid; POSITION: absolute; TOP: 303px; HEIGHT: 121px; BACKGROUND-COLOR: #ffffff">
<IMG id="imgF1" style="WIDTH: 176px; HEIGHT: 118px" height="118" width="176" runat="server"></div>
<div id="layer2" onclick="setBorder(2);" style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: 1px solid; PADDING-LEFT: 4px; Z-INDEX: 2; LEFT: 43px; PADDING-BOTTOM: 1px; BORDER-LEFT: 1px solid; WIDTH: 188px; PADDING-TOP: 1px; BORDER-BOTTOM: 1px solid; POSITION: absolute; TOP: 455px; HEIGHT: 229px; BACKGROUND-COLOR: #ffffff">
<IMG id="imgF2" style="WIDTH: 176px; HEIGHT: 224px" height="224" width="176" runat="server"></div>
<div id="layer3" onclick="setBorder(3);" style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: 1px solid; PADDING-LEFT: 4px; Z-INDEX: 3; LEFT: 218px; PADDING-BOTTOM: 1px; BORDER-LEFT: 1px solid; WIDTH: 254px; PADDING-TOP: 1px; BORDER-BOTTOM: 1px solid; POSITION: absolute; TOP: 347px; HEIGHT: 305px; BACKGROUND-COLOR: #ffffff">
<IMG id="imgF3" style="WIDTH: 248px; HEIGHT: 298px" height="298" width="248" runat="server"></div>
<div id="layer4" onclick="setBorder(4);" style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: 1px solid; PADDING-LEFT: 4px; Z-INDEX: 6; LEFT: 437px; PADDING-BOTTOM: 1px; BORDER-LEFT: 1px solid; WIDTH: 133px; PADDING-TOP: 1px; BORDER-BOTTOM: 1px solid; POSITION: absolute; TOP: 273px; HEIGHT: 123px; BACKGROUND-COLOR: #ffffff">
<IMG id="imgF4" style="WIDTH: 128px; HEIGHT: 118px" height="118" width="128" runat="server"></div>
<div id="layer5" onclick="setBorder(5);" style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: 1px solid; PADDING-LEFT: 4px; Z-INDEX: 5; LEFT: 433px; PADDING-BOTTOM: 1px; BORDER-LEFT: 1px solid; WIDTH: 133px; PADDING-TOP: 1px; BORDER-BOTTOM: 1px solid; POSITION: absolute; TOP: 453px; HEIGHT: 194px; BACKGROUND-COLOR: #ffffff">
<IMG id="imgF5" style="WIDTH: 152px; HEIGHT: 216px" height="216" width="152" runat="server"></div>
</td>
</tr>
</table>
</form>
</body>
</HTML>
AnswerRe: set layers border using javascript Pin
Guffa13-Oct-07 6:33
Guffa13-Oct-07 6:33 
AnswerRe: set layers border using javascript Pin
Hesham Amin13-Oct-07 22:41
Hesham Amin13-Oct-07 22:41 
QuestionDigest Authentication NIGHTMARE Pin
erikkl200012-Oct-07 17:31
erikkl200012-Oct-07 17:31 
QuestionChange Textbox Color Using Javascript Pin
stormcandi12-Oct-07 11:27
stormcandi12-Oct-07 11:27 
AnswerRe: Change Textbox Color Using Javascript Pin
Guffa13-Oct-07 0:44
Guffa13-Oct-07 0:44 
GeneralRe: Change Textbox Color Using Javascript Pin
stormcandi15-Oct-07 10:54
stormcandi15-Oct-07 10:54 
Questionrequest.GetResponse() problem Pin
Borryz12-Oct-07 1:44
Borryz12-Oct-07 1:44 
AnswerRe: request.GetResponse() problem Pin
kubben12-Oct-07 2:09
kubben12-Oct-07 2:09 
GeneralRe: request.GetResponse() problem Pin
Borryz12-Oct-07 3:23
Borryz12-Oct-07 3:23 
AnswerRe: request.GetResponse() problem Pin
Vasudevan Deepak Kumar12-Oct-07 2:45
Vasudevan Deepak Kumar12-Oct-07 2:45 
GeneralRe: request.GetResponse() problem Pin
Borryz12-Oct-07 3:29
Borryz12-Oct-07 3:29 
QuestionYAHOO.widget.AutoComplete Pin
ankushmn12-Oct-07 0:01
ankushmn12-Oct-07 0:01 
QuestionLogout problem Pin
abhishek.mumbai11-Oct-07 23:40
abhishek.mumbai11-Oct-07 23:40 
AnswerRe: Logout problem Pin
Hesham Amin13-Oct-07 22:43
Hesham Amin13-Oct-07 22:43 
AnswerRe: HTTP 500 - Internal server error. Pin
Vasudevan Deepak Kumar12-Oct-07 2:43
Vasudevan Deepak Kumar12-Oct-07 2:43 
QuestionJavascript : Similar to match Pin
ss.mmm11-Oct-07 5:21
ss.mmm11-Oct-07 5:21 
AnswerRe: Javascript : Similar to match Pin
andyharman11-Oct-07 6:44
professionalandyharman11-Oct-07 6:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.