Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Checkbox Restrictions

    This may seem like a simple question, but I'm new to Javascript (Intern >.<).

    I need to finish up a project that's basically this:

    A form with a certain number of questions, and each question has 3 checkboxes.

    The problem that I am running into is that the checkboxes need to be made so that only one checkbox per group can be selected. Each checkbox is worth a number and a total is created as you check a box. I tried replacing the boxes with radios, but the adding tool did not work when I changed it.

    I searched for forums here for a few minutes, and I also skimmed through The Javascript Bible, 5th Edition (Have yet to look at the CD) and I didn't find anything.

    No one here at the office knows enough about Javascript to help me. Any help would be much appreciated.

  • #2
    New Coder
    Join Date
    Jun 2005
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you post your code for the adding tool, because it would be much easier to modify a function and use a radio selection than having to disabled checkboxes, etc. Just because you weren't able to get the adding tool to work, doesn't mean someone on here can't . Give us a try

  • #3
    New Coder
    Join Date
    Jul 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here it is:

    Code:
    	function CheckChoice(whichbox)
    	{
    		with (whichbox.form)
    		{
    			//Handle differently, depending on type of input box.
    			if (whichbox.type == "radio")
    			{
    				//First, back out the prior radio selection from the total:
    				hiddentotal.value = eval(hiddentotal.value) - eval(hiddenpriorradio.value);
    				//Then, save the current radio selection:
    				hiddenpriorradio.value = eval(whichbox.price);
    				//Now, apply the current radio selection to the total:
    				hiddentotal.value = eval(hiddentotal.value) + eval(whichbox.price);
    			}
    			else
    			{
    				//If box was checked, accumulate the checkbox value as the form total,
    				//Otherwise, reduce the form total by the checkbox value:
    				if (whichbox.checked == false)
    					{ hiddentotal.value = eval(hiddentotal.value) - eval(whichbox.value); }
    				else 	{ hiddentotal.value = eval(hiddentotal.value) + eval(whichbox.value); }
    			}
    
    			//Now, return with formatted total:
    			return(formatC(hiddentotal.value));
    		}
    	}
    
    	//Define function to format a value:
    	function formatC(num)
    	{
    		num = num.toString().replace(/\$|\,/g,'');
    		if(isNaN(num))
    		   num = "0";
    		sign = (num == (num = Math.abs(num)));
    		num = Math.floor(num*100+0.50000000001);
    		num = Math.floor(num/100).toString();
    		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
    		    num = num.substring(0,num.length-(4*i+3))+','+
    		          num.substring(num.length-(4*i+3));
      	    return (((sign)?'':'-') + num);
    	}
    
    	//Define function to init the form on reload:
    	function InitForm()
    		{
    		//Reset the displayed total on form:
    		document.myform.total.value='0';
    		document.myform.hiddentotal.value=0;
    		document.myform.hiddenpriorradio.value=0;
    
    		//Set all checkboxes and radio buttons on form-1 to unchecked:
    		for (xx=0; xx < document.myform.elements.length; xx++)
    		{
    		   if (document.myform.elements[xx].type == 'checkbox' | document.myform.elements[xx].type == 'radio')
    			{
    			document.myform.elements[xx].checked = false;
    			}
    		}
    
    	}
    Edit: Forgot to add that I didn't write this code. I was the one put in charge to fix it :P
    Last edited by tehbau; 07-06-2005 at 05:19 PM. Reason: Adding something

  • #4
    New Coder
    Join Date
    Jun 2005
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Forgot to ask the first time around, can you also post the code for all the relative elements that are affected, use, or call these functions. Then I could see what exactly is getting passed to the function and what uses these functions to do what.
    Last edited by Burgerking63; 07-06-2005 at 05:30 PM.

  • #5
    New Coder
    Join Date
    Jul 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <td width="542" style="border-style: none; border-width: medium">
    <font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Is there a mention of a severe weather threat?
    <a href="javascript:explain('Help', 'opener.document.form.help.value', 'The ... forecast.  Yes = 3, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    <td width="43" style="border-style: none; border-width: medium">
    <font face="Arial" size="2">Yes<input type="checkbox" name="yes2"   value=3  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    <td width="36" align="right" style="border-style: none; border-width: medium">
    <font face="Arial" size="2">No<input type="checkbox" name="no2" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    <td width="105" style="border-style: none; border-width: medium">
    <font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure2"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    I believe the names have to be the same, correct? That's one of the unmodified checkbox groups. Here's the code for the lazy, modified radio version I did (basically changed the values to the same and then took out type="checkbox" and stuck in type="radio", which I have no clue if that will work or not). I'll only paste a few lines instead of the whole group.
    Code:
    <td width="43" style="border-style: none; border-width: medium">
    <font face="Arial" size="2">Yes<input type="radio" name="CHKBX3"   value=1  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    <td width="36" align="right" style="border-style: none; border-width: medium">
    <font face="Arial" size="2">No<input type="radio" name="CHKBX3" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>

  • #6
    New Coder
    Join Date
    Jun 2005
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's cool that your new to Javascript and seeking help, its understandable. But its also very hard to debug a script when the person who is seeking help:

    A) Didnt write it, but tries to modify and doesnt understand how

    B) Doesnt supply all the relevant code

    C) Doesnt explain very well what exactly they are trying to do.

    This function is calling on an external Javascript file for the "Help" link which is also defining some values. Since it wasnt included in the post, its hard to say what it does/doesnt do. Also, you need to include all the code with the hidden input boxes as well as "price" which comes up, but is no where to be found in the posted code. Please post all your code so I can test changes without having to write a bunch of my own. Just keep these things in mind when you seek help in the future.

  • #7
    New Coder
    Join Date
    Jul 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here's the full code, unmodified:

    Code:
    <html>
    
    <HEAD>
    
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- Begin
    	function CheckChoice(whichbox)
    	{
    		with (whichbox.form)
    		{
    			//Handle differently, depending on type of input box.
    			if (whichbox.type == "radio")
    			{
    				//First, back out the prior radio selection from the total:
    				hiddentotal.value = eval(hiddentotal.value) - eval(hiddenpriorradio.value);
    				//Then, save the current radio selection:
    				hiddenpriorradio.value = eval(whichbox.price);
    				//Now, apply the current radio selection to the total:
    				hiddentotal.value = eval(hiddentotal.value) + eval(whichbox.price);
    			}
    			else
    			{
    				//If box was checked, accumulate the checkbox value as the form total,
    				//Otherwise, reduce the form total by the checkbox value:
    				if (whichbox.checked == false)
    					{ hiddentotal.value = eval(hiddentotal.value) - eval(whichbox.value); }
    				else 	{ hiddentotal.value = eval(hiddentotal.value) + eval(whichbox.value); }
    			}
    
    			//Now, return with formatted total:
    			return(formatC(hiddentotal.value));
    		}
    	}
    
    	//Define function to format a value:
    	function formatC(num)
    	{
    		num = num.toString().replace(/\$|\,/g,'');
    		if(isNaN(num))
    		   num = "0";
    		sign = (num == (num = Math.abs(num)));
    		num = Math.floor(num*100+0.50000000001);
    		num = Math.floor(num/100).toString();
    		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
    		    num = num.substring(0,num.length-(4*i+3))+','+
    		          num.substring(num.length-(4*i+3));
      	    return (((sign)?'':'-') + num);
    	}
    
    	//Define function to init the form on reload:
    	function InitForm()
    		{
    		//Reset the displayed total on form:
    		document.myform.total.value='0';
    		document.myform.hiddentotal.value=0;
    		document.myform.hiddenpriorradio.value=0;
    
    		//Set all checkboxes and radio buttons on form-1 to unchecked:
    		for (xx=0; xx < document.myform.elements.length; xx++)
    		{
    		   if (document.myform.elements[xx].type == 'checkbox' | document.myform.elements[xx].type == 'radio')
    			{
    			document.myform.elements[xx].checked = false;
    			}
    		}
    
    	}
    
    //  End -->
    
    //This is the code for the help pop-up.
    <!-- Begin
    function explain(name, output, msg) {
    newwin = window.open('','','top=150,left=150,width=325,height=300');
    if (!newwin.opener) newwin.opener = self;
    with (newwin.document)
    {
    open();
    write('<html>');
    write('<body onLoad="document.form.box.focus()"><form name=form>' + msg + '<br>');
    write('<p><center><input type=button value="Click to close when finished" onClick=window.close()>');
    write('</center></form></body></html>');
    close();
       }
    }
    //This is the End of the code for the help pop-up -->
    
    //This is the Beginning of the code to print the page -->
    function printwindow() {
    self.printer = this;
    self.print()
    }
    //This is the End of the code to print the page -->
    
    //This is the Beginning of the code to refresh the page -->
    <!--
    function refresh()
    {
        window.location.reload( false );
    }
    //This is the End of the code to refresh the page -->
    
    
    </script>
    
    <title>Warm Season Severe Weather Worksheet</title>
    
    </HEAD>

  • #8
    New Coder
    Join Date
    Jul 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <BODY onLoad="InitForm();" onreset="InitForm();">
    <form method="POST" name="myform" style="width: 720">
    
    	<input type="hidden" name="hiddenpriorradio" value=0>
    	
    	<input type="hidden" name="hiddentotal" value=0>
    
    <div align="left">
    	<table border="0" width="720" id="table1" cellspacing="0" cellpadding="0">
    		<tr>
    			<td width="70" align="center">
    			<img border="0" src="amu_logo.jpg" width="52" height="52"></td>
    			<td width="790">
    			<p align="center"><font size="5" color="#800000" face="Arial">45th Weather Squadron<br>
    			Warm Season Severe Weather Forecast Tool</font></td>
    			<td width="140">
    			<p align="center">
    			<img border="0" src="ensco-logo.jpg" width="100" height="43"></td>
    		</tr>
    	</table></div>
    	<div align="center" style="border-bottom-style: solid; border-bottom-width: 1px; padding-bottom: 1px">
    	<table border="0" width="739" cellspacing="1" id="table4" style="border-left-width: 0px; border-right-width: 0px">
    		<tr>
    			<td style="border-bottom-style: solid; border-bottom-width: 1px; border-top-style:solid; border-top-width:1px" bordercolor="#000000">
    			<p align="left">&nbsp;<font face="Arial" size="2" color="#0000FF"><b>
    
    <script language="javascript">
    
    //This is the beginning of the code for the date/time display -->
    		var today = new Date();
    		var GMTtoday = today.toGMTString();document.write(GMTtoday);
    //This is the end of the code for the date/time display -->
    
    </script></b></font></td>
    			<td width="190" colspan="3" align="center" style="border-bottom-style: solid; border-bottom-width: 1px; border-top-style:solid; border-top-width:1px" bordercolor="#000000">
    			<b><font face="Arial" size="2" color="#FF0000">Check one box per row!</font></b></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-bottom-style: none; border-bottom-width: medium">
    			<font face="Arial" size="2">1. <b>28 OWS Southeast CONUS Hazard Discussion (<a target="_blank" href="https://28ows.shaw.af.mil">AWUS12</a>):</b>
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Access the 28 OWS discussion at https://28ows.shaw.af.mil for a high-level overview of the southeastern US weather situation.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-bottom-style: none; border-bottom-width: medium">&nbsp;</td>
    			<td width="36" style="border-bottom-style: none; border-bottom-width: medium">&nbsp;</td>
    			<td width="105" style="border-bottom-style: none; border-bottom-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Is there a mention of a severe weather threat?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'The 28 OWS has forecast, watch, and warning responsibility for all of the southeast US. This discussion should be used as a guide for your severe weather forecast.  Yes = 3, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes2"   value=3  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no2" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure2"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Was there a severe weather threat mentioned in the previous discussion?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Mention of severe weather in the previous discussion that indicates a persistent pattern.  Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes3"   value=1  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no3" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure3"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">2. <b>KMLB Area Forecast Discussion (<a target="_blank" href="http://www.srh.noaa.gov/mlb/forecast.html">FXUS62</a>):</b>
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Access the NWS discussion at http://www.srh.noaa.gov/mlb/forecast.html. The Melbourne NWS Forecast Office forecasters have many years of local expertise. This discussion is coordinated with multple NWS offices prior to dissemination and should be used as a guide for your severe weather forecast.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Is there a mention of a severe weather threat?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'The Melbourne NWS Forecast Office forecasters have many years of local expertise. This discussion is coordinated with multple NWS offices prior to dissemination and should be used as a guide for your severe weather forecast.  Yes = 3, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes2"   value=3  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no2" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure2"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Was there a severe weather threat mentioned in the previous discussion?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Mention of severe weather in the previous discussion that indicates a persistent pattern.  Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes3"   value=1  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no3" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure3"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		</tr>
    		
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">3. <b>Persistence:</b></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Has severe weather occurred in 
    			<u>east-central</u> Florida in the last 24 hours?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'If severe weather has occurred in east-central Florida within the last 24 hours, it is likely to occur again today if the air mass and triggers are the same.  Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes4"   value=2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no4" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure4"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">4. <b>Front or squall line activity:</b></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Has severe weather occurred in 
    			<u>northwest</u> Florida in the last 24 hours?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Look for a front or squall line that triggered severe weather over northwest Florida - if the feature is moving into the local area it could increase instability, lift  and rotation.  Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes5"   value=1  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no5" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure5"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Is there a front or squall line in 
    			<u>northwest</u> Florida moving ESE (morning only)?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Look for a front or squall line that triggered severe weather over northwest Florida - if the feature is moving into the local area it could increase instability, lift  and rotation.  Yes = 2, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes6"   value=2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no6" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure6"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">5. <b>Water vapor satellite image:</b></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp; Is there a distinct moisture/dry boundary across central Florida?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Look for a dry zone boundaries in the water vapor imagery - these include axes of jet streams, thermal and upper-level ridges, and upper-level anticyclones.  Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes7"   value=2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no7" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure7"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style:none; border-width:medium; ">
    			<font face="Arial" size="2">6. <b>Sounding/stability parameters:</b></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium; " bordercolor="#808080" bordercolorlight="#FFFFFF" bordercolordark="#808080">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; a. MDPI: </font>
    			<font face="Times New Roman" style="font-size: 9pt">≤</font><font face="Arial" size="2"> 
    			1.0
    			<input type="checkbox" name="no8" value=-1 onclick="this.form.total.value=CheckChoice(this);">&nbsp; 
    			&gt; 1.0
    			<input type="checkbox" name="yes8"   value=2  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp;&nbsp;
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'MDPI values over 1.0 indicate a strong microburst potential with additional energy in the downdraft.  GT1 = 2, LTE1 = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="190" style="border-style:none; border-width:medium; " colspan="3">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium; " bordercolor="#800000" bordercolorlight="#FFFFFF">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; b. K-Index: 
    			&lt; 26 
    			<input type="checkbox" name="no9" value=-2 onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			26 to 28 
    			<input type="checkbox" name="notsure9"   value=0  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			&gt; 28 
    			<input type="checkbox" name="yes9"   value=0  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp;&nbsp;
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Climatology shows that when K-Index was in the moderate to high threat categories, 26 to 28 and greater than 28, the occurrence of severe weather was 18% and 16%, respectively. But when KI < 26, 39% of all days were non-lightning while severe weather occurred only 8% of the time. GT28 = 0, 26 to 28 = 0, LT26 = -2.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="190" colspan="3" style="border-style:none; border-width:medium; ">&nbsp;</td>
    		</tr>

  • #9
    New Coder
    Join Date
    Jul 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium; " bordercolor="#808080" bordercolorlight="#FFFFFF" bordercolordark="#808080">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; c. Total Totals:</font><font face="Symbol" size="2">
    			</font><font face="Times New Roman" style="font-size: 9pt">≤</font><font face="Arial" size="2"> 
    			45 
    			<input type="checkbox" name="notsure10"   value=-1  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			46 to 48 
    			<input type="checkbox" name="no10" value=0 onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			&gt; 48 
    			<input type="checkbox" name="yes10"   value=2  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp;&nbsp;
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Climatology shows that when Total Totals was over 48, severe weather occurred 29% of the time. Values over 48 only occurred 8% of the time. With TT values between 46 and 48, severe weather occurred 18% of the time and when TT values less than or equal to 45, severe weather occurred 9% of the time. Also, when TT was less that or equal to 45, 24% of all days were non-lightning days. GT48 = 2, 46 to 48 = 0, LTE45 = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="190" colspan="3" style="border-style:none; border-width:medium; ">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium; " bordercolor="#808080" bordercolorlight="#FFFFFF" bordercolordark="#808080">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; 
    			d. Cross Totals: </font>
    			<font face="Times New Roman" style="font-size: 9pt">≤</font><font face="Arial" size="2"> 
    			19 
    			<input type="checkbox" name="notsure14"   value=0  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			20 to 21
    			<input type="checkbox" name="notsure30"   value=0  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			22 to 23 
    			<input type="checkbox" name="no14" value=0 onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			</font><font face="Times New Roman" style="font-size: 9pt">≥</font><font face="Arial" size="2"> 
    			24
    			<input type="checkbox" name="yes33"   value=2  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp;&nbsp;
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Climatology shows that when Cross Totals were in the very high threat category, greater than or equal to 24, there was a 27% occurrence of severe weather. However, CT equal to or greater than 24 only occurred on 6% of the warm season days. When CT was less than or equal to 23, the occurrence of severe weather was nearly uniform at 10-14% among the low, moderate, and high threat categories. GTE 24 = 2, 22 to 23 = 0, 20 to 21 = 0, LTE19 = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="190" style="border-style:none; border-width:medium; " colspan="3">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium; " bordercolor="#808080" bordercolorlight="#FFFFFF" bordercolordark="#808080">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; e. Lifted Index: &lt; -5<input type="checkbox" name="yes11"   value=3  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; -3 to -5<input type="checkbox" name="no11" value=0 onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; &gt; -3<input type="checkbox" name="notsure11"   value=0  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp;&nbsp;
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Climatology shows that when the Lifted Index was less than -5, there was a 25% occurrence of severe weather. But LI was less than -5 on only 3% of the warm season days. When LI was -3 to -5, severe weather occurrence was 16% and when LI was greater than -3, severe weather occurrence was 10%. LT-5 = 3, -3 to -5 = 0, GT-3 = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="190" colspan="3" style="border-style:none; border-width:medium; ">
    			<p align="right">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium; " bordercolor="#808080" bordercolorlight="#FFFFFF" bordercolordark="#808080">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; f.&nbsp; Showalter 
    			Stability Index: &lt; -2<input type="checkbox" name="yes11"   value=2  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; -2 
    			to 2<input type="checkbox" name="no11" value=0 onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; </font><font face="Times New Roman" style="font-size: 9pt">≥</font><font face="Arial" size="2"> 
    			3<input type="checkbox" name="notsure11"   value=-1  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp;&nbsp;
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Climatology shows that when the Showalter Stability Index was less than -2, there was a 32% occurrence of severe weather. But SSI was only less than -2 on 2% of the warm season days. When SSI was -2 to 2, severe weather occurred 16% of the time and when SSI was greater than or equal to 3, severe weather occurred 7% of the time. Also, when SSI was greater than or equal to 3, non-lightning days occurred 35% of the time.  LT-2 = 3, -2 to 2 = 0, GTE3 = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="190" colspan="3" style="border-style:none; border-width:medium; ">
    			<p align="right">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium; " bordercolor="#808080" bordercolorlight="#FFFFFF" bordercolordark="#808080">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; 
    			g.&nbsp;Thompson Index: &lt; 25
    			<input type="checkbox" name="notsure31"   value=-1  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			25 to 34
    			<input type="checkbox" name="notsure32"   value=0  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			35 to 39
    			<input type="checkbox" name="no30" value=1 onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			</font><font face="Times New Roman" style="font-size: 9pt">≥</font><font face="Arial" size="2"> 
    			40
    			<input type="checkbox" name="yes34"   value=3  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp;&nbsp;
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Climatology shows that when the Thompson Index was greater than 40, severe weather occurred 21% of the time. TI greater than 40 occurred 6% of the time. When TI was between 35 and 39, severe weather occurred 16% of the time. When TI was between 25 and 34, severe weather occurred 16% of the time and when TI was less than 25, severe weather occurred 6% of the time. Also, when TI was less than 25, 46% of all days were non-lightning days. GT40 = 2, 35 to 39 = 1, 25 to 34 = 0, LT25 = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">
    			Help</a></font></td>
    			<td width="190" style="border-style:none; border-width:medium; " colspan="3">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style:none; border-width:medium; " bordercolorlight="#FFFFFF" bordercolordark="#808080" bordercolor="#808080">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; h. Precipitable 
    			Water: &lt; 1.0&quot;
    			<input type="checkbox" name="pw1" value=-2 onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			1&quot; to 1.5&quot;
    			<input type="checkbox" name="pw2"   value=-1  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp; 
    			&gt; 1.5&quot;
    			<input type="checkbox" name="pw3"   value=0  onclick="this.form.total.value=CheckChoice(this);">&nbsp;&nbsp;&nbsp;&nbsp;
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Climatology shows that when Precipitable Water was equal to or greater than 1.5, there was a 15% occurrence of severe weather. When PW was between 1 and 1.5, severe weather occurred 9% of the time and when PW was less than 1 severe weather occurred 3% of the time. PW is greater than 1.5 68% of the time so it is not a good indicator of severe weather but it is a good indicator of non-severe weather days. GT1.5 = 0, 1 to 1.5 = -1, LT1 = -2.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a>
    			</font></td>
    			<td width="190" colspan="3" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" bordercolor="#808080" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; i.&nbsp; Is CAPE FMaxT > 3500 
    			J/kg?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'CAPE FMaxT was not able to differentiate among severe and non-severe days except when it was over 3500 J/kg. CAPE FMaxT was only this high 0.04% of the time but when it was, severe weather occurred 67% of the time.   Yes = 3, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes15"   value=3  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no15" value=0 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure15"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" bordercolor="#808080" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; j.&nbsp; Are the winds veering with height from surface to 10,000 ft?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'A veering wind with height in the lower part of the atmosphere is a type of directional shear often considered important for development of a rotating updraft. The rotating updraft of a supercell, called a mesocyclone, helps the supercell to produce extreme severe weather events such as large hail, strong downbursts of 80 miles per hour or more and strong to violent tornadoes.  Yes = 2, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes15"   value=2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no15" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure15"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; k.&nbsp;Is there an inversion below 8,000 ft?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'This could indicate low level dry air moving in and increased subsidence. Lack of moisture in the lower troposphere reduces the severe storm threat. Note that this inversion is not part of a morning surface inversion.  Yes = -2, No = 1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes16"   value=-2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no16" value=1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure16"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; l.&nbsp; Is the 
    			forecast max temp minus sounding conv temp equal to or greater than 5<sup>o</sup>C?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'This difference will indicate the lower atmosphere lift potential, turn over of the boundary layer. Warm/moist rising air will increase the lower atmosphere instability.  Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes17"   value=1  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no17" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure17"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; m.Is there an 850 mb cap (is the 850 mb temp < 20<sup>o</sup>C)?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'This indicates that the lower atmosphere is to too warm to allow strong thermals to develop - the atmosphere is capped. The 850 MB temperature needs to be colder than the air at the surface for storms to develop.  Yes = -2, No = 1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes18"   value=-2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no18" value=1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure18"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; n. Is the mean RH from 1000 mb to 700 mb equal to or greater than 70%?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Moisture is critical for storm development and severity. 70-90% RH is a good range, the lower atmosphere should not be too dry or moist for severe storm development.  Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes19"   value=1  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no19" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure19"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; o. Does it look hazy outside?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Normally in the warm season it is not hazy outside. Haze indicates subsidence and trapped particulates in the low levels. Yes = -2, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes20"   value=-2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no20" value=0 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure20"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>

  • #10
    New Coder
    Join Date
    Jul 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">7. <b>Jet Dynamics</b></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; a. Upper-level 
    			speed max exit region or divergence over KSC/CCAFS?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'When an upper level speed max entrance/exit region or upper level divergence is present over KSC/CCAFS, severe weather occurs 19% of the time. These conditions account for 29% of all warm season days. Yes = 2, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes21"   value=2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no21" value=0 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure21"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; b. Low-level jet with a south to west component from surface to 5,000 ft &gt; 25 kts?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'A low level jet with a south to west component transports moisture and warm air advection into a developing thunderstorm updraft. The high-speed wind and directional shear helps generate large values of helicity that can lead to tornadogenesis or strong gusts of wind at the surface.  Yes = 2, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes22"   value=2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no22" value=0 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure22"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">8. <b>Flow 
    			Regime Lightning Climatology - See <i>
    			<a target="_blank" href="obj_lightning_flow.htm">Objective Lightning Tool 
    			Flow Regimes</a></i></b></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="726" colspan="4" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; a. 
    			<input type="checkbox" name="yes23"   value=2  onclick="this.form.total.value=CheckChoice(this);">&nbsp; 
    			SW-1
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Southwest flow (SW-1) over KSC/CCAFS occurs when the layer-averaged wind direction at all 3 stations is 180°-270°, indicating the Atlantic ridge is south of the Florida Peninsula. The probability of lightning is 66%. Yes = 2, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a>&nbsp; 
    			<input type="checkbox" name="yes24"   value=3  onclick="this.form.total.value=CheckChoice(this);">&nbsp; 
    			SW-2
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Southwest flow (SW-2) also occurred when the ridge was between MIA and TBW, with layer-averaged wind directions of 180°-270° at JAX and TBW and 90°-180° at MIA. The probability of lightning is 72%. Yes = 3, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a>&nbsp;
    			<input type="checkbox" name="yes30"   value=1  onclick="this.form.total.value=CheckChoice(this);">&nbsp; 
    			SE-1
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Southeast flow (SE-1) occurred when the ridge moved north of KSC/CCAFS with the layer-averaged wind directions 180°-270° at JAX and 90°-180° at MIA and TBW. The probability of lightning is 51%. Yes = 1, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a>&nbsp;
    			<input type="checkbox" name="yes31"   value=-1  onclick="this.form.total.value=CheckChoice(this);">&nbsp; 
    			SE-2
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Southeast flow (SE-2) also occurred when the ridge was north of the Florida Peninsula and the layer-averaged wind direction at all three stations was 90°-180°. The probability of lightning is 39%. Yes = -1, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a>&nbsp; 
    			<input type="checkbox" name="yes25"   value=0  onclick="this.form.total.value=CheckChoice(this);">&nbsp; 
    			NW
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Northwest flow regime (NW) occurred when the layer-averaged wind direction at all three stations was 270°-360°. The probability of lightning is 43%. Yes = 0, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a>
    			<input type="checkbox" name="yes32"   value=-2  onclick="this.form.total.value=CheckChoice(this);">&nbsp; 
    			NE
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Northeast flow regime (NE) occurred when the layer-averaged wind direction at all three stations was 0°-90°. The probability of lightning is 18%. Yes = -2, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a>&nbsp; 
    			<input type="checkbox" name="yes26"   value=-2  onclick="this.form.total.value=CheckChoice(this);">&nbsp; 
    			Other
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'When the layer-averaged wind directions at the three stations did not fit any of the above criteria, it was designated as Other. The probability of lightning is 44%. Yes = 0, No = 0.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">9. <b>Sea Breeze and Boundary Collisions</b>
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Boundary collisions will increase lift and rotation');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; a. If a sea breeze forms, will it stay east of I-95?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'If so, this leaves a strong line of discontinuity (Temp, RH & Helicity) in the forecast area. Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes27"   value=1  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no27" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure27"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; b. Are you forecasting a late developing sea breeze?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'If so, you are adding additional lower atmosphere heating (lift), which will increase the instability. Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes28"   value=1  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="checkbox" name="no28" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure28"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-bottom-style: solid; border-bottom-width: 1px; border-top-style:none; border-top-width:medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; c. Are you forecasting or observing multiple boundary collisions?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Multiple boundary collisions are often the single most important trigger for severe weather. Yes = 2, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-bottom-style: solid; border-bottom-width: 1px; border-top-style:none; border-top-width:medium">
    			<font face="Arial" size="2">Yes<input type="checkbox" name="yes29"   value=2  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="36" style="border-bottom-style: solid; border-bottom-width: 1px; border-top-style:none; border-top-width:medium" align="right">
    			<font face="Arial" size="2">No<input type="checkbox" name="no29" value=-1 onclick="this.form.total.value=CheckChoice(this);"></font></td>
    			<td width="105" style="border-bottom-style: solid; border-bottom-width: 1px; border-top-style:none; border-top-width:medium">
    			<font face="Arial" size="2">Not Sure<input type="checkbox" name="notsure29"   value=0  onclick="this.form.total.value=CheckChoice(this);"></font></td>
    		</tr>
    		<td width="542" style="border-top-style: solid; border-top-width: 1px" bordercolor="#000000">
    		<p align="left"><a href="javascript:refresh()">
    		<span style="font-weight: 700; text-decoration: none">
    		<font face="Arial" size="2" color="#000080">Click here to </font></span>
    		</a><font face="Arial"><a href="javascript:refresh()">
    		<span style="text-decoration: none; font-weight: 700">
    		<font color="#000080" size="2">reset all values to zero</font></span></a></font><b><font face="Arial" size="2" color="#000080">&nbsp;</font><font face="Arial" size="2" color="#800000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total Threat Score: 
    		</font></b><font size="2" face="Arial">
    		<input type="text" name="total" readonly onFocus="this.blur();" size="2" style="height: 20; width: 20">
    		</font></td>
    		<td width="190" colspan="3" style="border-top-style: solid; border-top-width: 1px" bordercolor="#000000">
    		<p align="right"><b><font face="Arial" size="2">
    		<a href="javascript:printwindow();"><font color="#008000">
    		<span style="text-decoration: none">Print this page</span></font></a></font></b></td>
    		</tr>
    	</table>
    	</div>
    </form>
    	
    	</body>
    
    </html>
    That's all of it...after 4 posts....Lol

  • #11
    New Coder
    Join Date
    Jun 2005
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts
    alright, this might take awhile, you have numerous syntax errors in your code which is going to make it difficult to start debugging the script until they are fixed. also, you cant use the same "name" for another row of checkboxes or radio selections.... -_-. I will rename each set of them based on the description of the row.

  • #12
    New Coder
    Join Date
    Jul 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You don't have to rename them for me. I know I can do that. And if you could point out the errors and tell me how to fix them, I can do that myself, too.

    Edit: Also, whenever I open up the .html, I don't get any errors.
    Last edited by tehbau; 07-06-2005 at 06:46 PM.

  • #13
    New Coder
    Join Date
    Jun 2005
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Almost have it working, just some radio selection validation issues left, I will finish it after lunch

  • #14
    New Coder
    Join Date
    Jun 2005
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts
    First of all, if you were loading it up before and not getting HTML or Javascript errors, you need to turn Javascript errors on in IE or whatever browser you use, because your not seeing them. Second, you seriously need to learn Cascading Style Sheets (CSS) because your coding is atrociously long for something simple. A CSS would cut out all the times you declare a font size change, <td> property, border style's, etc. Something to keep in mind, since I am not going to go through it and do it for you.

    The code is working now and I fixed all of your syntax errors, which by the way, were numerous. Get a HTML editor and continually test your work as you go bit by bit to avoid large scale errors later on caused by minor things like a open bracket.

    I renamed all your radio selections because that was a mess. You cannot just call each Yes radio "yes1, yes2, yes3, etc, etc" when they are in different rows and radio groups... same thing with the No's. You can change them to be more descriptive or whatever, as long as you make sure all the radio buttons in that "group" have the same name.

    The function I wrote (validateTotal() ) checks the form each time you click on a radio button and looks for all the other checked radio buttons. It adds them together to keep a "running total" and updates each time you click another radio button. This avoids the problem of subtracting the prior value from the total then adding the new one, which only worked if you clicked on radio buttons in the same row two times in a row. If you wanted to change a previously selected radio button, it would still add it to the total without subtracting the value that was selected before it.

    Here is the script code code:
    Code:
    <html>
    <HEAD>
    
    <SCRIPT LANGUAGE="JavaScript">
    function validateTotal() {
    var runningtotal = 0;
    for (i = 0; i < myform.elements.length; i++) {
      if (myform.elements[i].checked == true) {
      runningtotal = eval(runningtotal) + eval(myform.elements[i].value);
      myform.total.value = runningtotal; } }
      }
    </script>
    
    <SCRIPT LANGUAGE="JavaScript">
    	//Define function to init the form on reload:
    	function InitForm()	{
    		//Reset the displayed total on form:
    		document.myform.total.value="0";		
    
    		//Set all radioes and radio buttons on form-1 to unchecked:
    		for (xx=0; xx < document.myform.elements.length; xx++){
    		   if (document.myform.elements[xx].type == 'radio' | document.myform.elements[xx].type == 'radio'){
    			document.myform.elements[xx].checked = false;}	}
    	}
    </script>
     
    <SCRIPT LANGUAGE="JavaScript">
    //This is the code for the help pop-up.
    <!-- Begin
    function explain(name, output, msg) {
    newwin = window.open('','','top=150,left=150,width=325,height=300');
    if (!newwin.opener) { newwin.opener = self; }
    with (newwin.document)
    {
    open();
    write('<html>');
    write('<body onLoad="document.form.box.focus()"><form name=form>' + msg + '<br>');
    write('<p><center><input type=button value="Click to close when finished" onClick=window.close()>');
    write('</center></form></body></html>');
    close();
       }
    }
    // This is the End of the code for the help pop-up 
    </script>
    
    <SCRIPT LANGUAGE="JavaScript">
    // This is the Beginning of the code to print the page//
    function printwindow() {
    self.printer = this;
    self.print()
    }
    //This is the End of the code to print the page
    </script>
    
    <SCRIPT LANGUAGE="JavaScript">
    //This is the Beginning of the code to refresh the page
    function refresh()
    {
        window.location.reload( false );
    }
    </script>
    Replace all of your scripts in the <head> portion of you document with what I have here. The rest will be in the next reply.

  • #15
    New Coder
    Join Date
    Jun 2005
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is an abridged version since I am not going to split this all up into 4 replies. Just make sure you change all the onclick="this.form.total.value=CheckChoice(this) to onclick="validateTotal();". Also, get an HTML and do a "Find and Replace" for all your values you define for each radio. Value=1 is not good coding. Value="1" is correct so go back through to make sure that wont cause problems. The naming you can do, just remember the rules for radio button groups and follow the examples.

    Here is the example stuff:
    Code:
    <title>Warm Season Severe Weather Worksheet</title>
    </HEAD>
    <BODY onLoad="InitForm()" onReset="InitForm()">
    <form method="POST" name="myform" style="width: 720">
    <div align="left">
    	<table border="0" width="720" id="table1" cellspacing="0" cellpadding="0">
    		<tr>
    			<td width="70" align="center">
    			<img border="0" src="amu_logo.jpg" width="52" height="52"></td>
    			<td width="790">
    			<p align="center"><font size="5" color="#800000" face="Arial">45th Weather Squadron<br>
    			Warm Season Severe Weather Forecast Tool</font></td>
    			<td width="140">
    			<p align="center">
    			<img border="0" src="ensco-logo.jpg" width="100" height="43"></td>
    		</tr>
    	</table></div>
    	<div align="center" style="border-bottom-style: solid; border-bottom-width: 1px; padding-bottom: 1px">
    	<table border="0" width="739" cellspacing="1" id="table4" style="border-left-width: 0px; border-right-width: 0px">
    		<tr>
    			<td style="border-bottom-style: solid; border-bottom-width: 1px; border-top-style:solid; border-top-width:1px" bordercolor="#000000">
    			<p align="left">&nbsp;<font face="Arial" size="2" color="#0000FF"><b>
    
    <script language="javascript">
    		var today = new Date();
    		var GMTtoday = today.toGMTString();document.write(GMTtoday);
    </script>
    
    </b></font></td>
    			<td width="190" colspan="3" align="center" style="border-bottom-style: solid; border-bottom-width: 1px; border-top-style:solid; border-top-width:1px" bordercolor="#000000">
    			<b><font face="Arial" size="2" color="#FF0000">Check one box per row!</font></b></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-bottom-style: none; border-bottom-width: medium">
    			<font face="Arial" size="2">1. <b>28 OWS Southeast CONUS Hazard Discussion (<a target="_blank" href="https://28ows.shaw.af.mil">AWUS12</a>):</b>
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Access the 28 OWS discussion at https://28ows.shaw.af.mil for a high-level overview of the southeastern US weather situation.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-bottom-style: none; border-bottom-width: medium">&nbsp;</td>
    			<td width="36" style="border-bottom-style: none; border-bottom-width: medium">&nbsp;</td>
    			<td width="105" style="border-bottom-style: none; border-bottom-width: medium">&nbsp;</td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Is there a mention of a severe weather threat?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'The 28 OWS has forecast, watch, and warning responsibility for all of the southeast US. This discussion should be used as a guide for your severe weather forecast.  Yes = 3, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="radio" name="28OWS_severe_weather_threat" value="3" onclick="validateTotal();"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="radio" name="28OWS_severe_weather_threat" value="-1" onclick="validateTotal();"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="radio" name="28OWS_severe_weather_threat"   value="0"  onclick="validateTotal();"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Was there a severe weather threat mentioned in the previous discussion?
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Mention of severe weather in the previous discussion that indicates a persistent pattern.  Yes = 1, No = -1.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Yes<input type="radio" name="28owsweather_threat_in_discuss?" value="1" onclick="validateTotal();"></font></td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">No<input type="radio" name="28owsweather_threat_in_discuss?" value="-1" onclick="validateTotal();"></font></td>
    			<td width="105" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">Not Sure<input type="radio" name="28owsweather_threat_in_discuss?"  value="0"  onclick="validateTotal();"></font></td>
    		</tr>
    		<tr>
    			<td width="542" style="border-style: none; border-width: medium">
    			<font face="Arial" size="2">2. <b>KMLB Area Forecast Discussion (<a target="_blank" href="http://www.srh.noaa.gov/mlb/forecast.html">FXUS62</a>):</b>
    			<a href="javascript:explain('Help', 'opener.document.form.help.value', 'Access the NWS discussion at http://www.srh.noaa.gov/mlb/forecast.html. The Melbourne NWS Forecast Office forecasters have many years of local expertise. This discussion is coordinated with multple NWS offices prior to dissemination and should be used as a guide for your severe weather forecast.');" onMouseOver="window.status='Click for explanation...';return true;" onMouseOut="window.status='';return true;">Help</a></font></td>
    			<td width="43" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="36" align="right" style="border-style: none; border-width: medium">&nbsp;</td>
    			<td width="105" style="border-style: none; border-width: medium">&nbsp;</td>
    		</tr>


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •