Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-19-2005, 03:50 AM   PM User | #1
sharingan
New to the CF scene

 
Join Date: Sep 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
sharingan is an unknown quantity at this point
Unhappy Plzz HElp ME

Hello..i've prob here..the prob is, is't some simple way to do these function.this is because, i have to do all again the code if the selected item is to many.
These function actually change the different output base on the selected item for "Report Name".
Plzz help me...


below is the code:



<html>
<head>
<title>Testing Daa...</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.dropcontent{
width: 300px;
height: 140px;
border: 0;
background-color: #FFFFFF;
display:block;
}
</style>

<script type="text/javascript">

if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.dropcontent{display:none;}\n')
document.write('</style>\n')
}

function contractall(){
if (document.getElementById){
var inc=0
while (document.getElementById("dropmsg"+inc)){
document.getElementById("dropmsg"+inc).style.display="none"
inc++
}
}
}

function expandone(){
if (document.getElementById){
var selectedItem=document.dropmsgform.dropmsgoption.selectedIndex
contractall()
document.getElementById("dropmsg"+selectedItem).style.display="block"
}
}

if (window.addEventListener)
window.addEventListener("load", expandone, false)
else if (window.attachEvent)
window.attachEvent("onload", expandone)

</script>


</head>

<body>

<table width="800" border="0" cellpadding="0" cellspacing="0" >
<!--DWLayoutTable-->
<tr>

<form name="dropmsgform">

Report Name<br>
<select name="dropmsgoption" size="1" style="width:210" onChange="expandone()">
<option>Alarm By Alarm Type By Day</option>
<option>Alarm By Alarm Type By Month</option>
<option>Audit Trail</option>
<option>Case Manager Activity Report</option>
<option>Cases By Fraud Type</option>
<option>CDR Archive List</option>
<option>Resolved Case Detailed List</option>
</select>

<div id="dropmsg0" class="dropcontent">
<br>
Start Date<br>
<input name="" type="text">
<br>
End Date<br>
<input name="" type="text">
</div>
<div id="dropmsg1" class="dropcontent">
<br>
Month<br>
<select name="" style ="width:100">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select>
<br>
Year<br>
<input name="" type="text">

</div>

<div id="dropmsg2" class="dropcontent">
<br>
Start Date<br>
<input name="" type="text">
<br>
End Date<br>
<input name="" type="text">
</div>

<div id="dropmsg3" class="dropcontent">
<br>
Start Date<br>
<input name="" type="text">
<br>
End Date<br>
<input name="" type="text">
</div>

<div id="dropmsg4" class="dropcontent">
<br>
Start Date<br>
<input name="" type="text">
<br>
End Date<br>
<input name="" type="text">
</div>

<div id="dropmsg5" class="dropcontent">
<br>
Start Date<br>
<input name="" type="text">
<br>
End Date<br>
<input name=""type="text">
<br>
Service No<br>
<input name="" type="text">
</div>

<div id="dropmsg6" class="dropcontent">
<br>
Start Date<br>
<input name=""type="text">
<br>
End Date<br>
<input name="" type="text">

</div>



</form>
</tr>
<tr>
<td height="521">&nbsp;</td>
</tr>
</table>
</body>
</html>
sharingan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:22 PM.


Advertisement
Log in to turn off these ads.