Hi, I am trying to get these fields to highlight when clicked: 'search conducted', 'contraband', and 'arrest result of stop'. I have tried with Dreamweaver CC, but the particular thing I'm trying to do just won't work. Thanks in advance!
Misty_3 0 Newbie Poster
The attachment preview is chopped off after the first 10 KB. Please download the entire file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Racial Profiling</title>
<!-- Bootstrap -->
<link href="bootstrap.css" rel="stylesheet" type="text/css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="file:///W|/jQueryAssets/jquery-1.11.1.min.js"></script>
<script src="file:///W|/jQueryAssets/jquery-ui-effects.custom.min.js"></script>
<script type="text/javascript">
function MM_DW_effectHighlight(obj,method,effect,color,speed)
{
obj[method](effect, {color:color}, speed);
}
</script>
</head>
<div class="datetime">DATETIME</div>
<div class="container-fluid">
<h2 align="center">
SB 1849 - Sandra Bland Act - Racial Profiling Data</h2>
</div>
<br><form name="RACIAL PROFILING" action="pagea.php" method="post">
DATETIME:<br>
<input type="date" name="DATETIME"><br>
BADGE #<br>
<input type="text" name="user"><br>
<div class="container-fluid">
<div class="gender col-lg-2">
<div class="gender col-lg-12">
<h4>GENDER</h4>
<input type="radio"name="gender" value="FEMALE" id="female"style="display: none">
<label for="female" class="gender">FEMALE</label><br/>
<input type="radio"name="gender" value="MALE" id="male" style="display: none">
<label for="male" class="gender">MALE</label>
</div>
<div class="race col-lg-12" onClick="MM_DW_effectHighlight($(this),'show','highlight','#99FFFA',1000)">
<h4>RACE</h4>
<input type="radio"name="race"value="WHITE" id="white"style="display:none">
<label for="white" class="race">WHITE</label><br>
<input type="radio" name="race" value="BLACK" id="black"style="display:none">
<label for="black" class="race">BLACK</label><br>
<input type="radio" name="race" value="HISPANIC LATINO" id="hispanic"style="display:none">
<label for="hispanic" class="race">HISPANIC<BR>LATINO</label><br>
<input type="radio" name="race"class="race"value="ALASKA NATIVE AMERICAN INDIAN" id="alaska"style="display: none">
<label for="alaska" class="race">ALASKA NATIVE<br><br>AMERICAN INDIAN</label>
<input type="radio" name="race"class="race"value="ASIAN PACIFIC ISLANDER" id="asian"
style="display: none">
<label for="asian"class="race">ASIAN<br> PACIFIC ISLANDER</label>
</div>
<div class="prior col-lg-12">
<input type="radio"name="raceknownprior"value="YES"id="yes"style="display:none">
<label for="race known prior to stop" name="raceknownprior"class="prior"> RACE KNOWN<br> PRIOR<br> TO STOP</label>
</div>
</div>
<div class = "violation col-lg-2">
<div class="violation col-lg-12">
<h4>REASON TO STOP</h4>
<input type="radio"name="reasonforstop" value="VIOLATION OTHER THAN TRAFFIC" id="nontraffic"style="display: none; border-style: solid;">
<label for="nontraffic" class="violation">VIOLATION OTHER THAN TRAFFIC</label>
<input type="radio" name="reasonforstop" value="PRE-EXISTINGKNOWLEDGE(IE:WARRANT)"id="warrant"style="display: none">
<label for="warrant" class="violation">PRE-EXISTING KNOWLEDGE<br>(IE:WARRANT)</label>
<input type="radio" name="reasonforstop" value="MOVING TRAFFIC VIOLATION" id="moving traffic violation"style="display: none">
<label for="moving traffic violation" class="violation">MOVING TRAFFIC VIOLATION</label>
<input type="radio" name="reasonforstop" value="VEHICLE TRAFFIC VIOLATION" id="vehicle traffic violation"STYLE="DISPLAY: NONE">
<label for="vehicle traffic violation" class="violation">VEHICLE TRAFFIC VIOLATION</label>
</div>
<div class="location col-lg-12" onClick="MM_DW_effectHighlight($(this),'show','highlight','#99DDFF',1000)">
<h4>LOCATION OF STOP</h4>
<input type="radio" name="locationofstop" value="CITY STREET" ID="city street"style="display:none"><br>
<label for="city street" class="location">CITY STREET</label><br>
<input type="radio" name="locationofstop" value="US HIGHWAY" id="us highway"style="display:none">
<LABEL FOR="us highway" CLASS="location">US HIGHWAY</LABEL>
<input type="radio" name="locationofstop" value="COUNTY ROAD" id="county road"style="display:none">
<LABEL FOR="county road" CLASS="location">COUNTY ROAD</LABEL>
<input type="radio" name="locationofstop" value="PRIVATE ROAD" id="private road"style="display:none">
<LABEL FOR="private road" CLASS="location">PRIVATE ROAD</LABEL>
<input type="radio" name="locationofstop" class="location" value="OTHER LOCATION" id="other location"style="display:none">
<label for="other location" class="location">OTHER LOCATION</label>
</div>
</div>
<div class="search col-lg-2" onClick="MM_DW_effectHighlight($(this),'show','highlight','#99CDFF',1000)">
<input type="radio" name = "reasonforsearch"class="search" value="SEARCH CONDUCTED" style="display:none">
<label for="search conducted" class=search>SEARCH CONDUCTED</label>
<div class="SEARCH">
<h4>REASON FOR SEARCH</h4>
<input type="radio" name="reasonforsearch" value="CONSENT" id="consent"style="display: none">
<label for="consent" class="search">CONSENT</label><br>
<input type="radio" name="reasonforsearch" value="CONTRABAND EVIDENCE IN PLAIN VIEW" id="contraband evidence" style="display: none">
<label for="contraband evidence" class="search">CONTRABAND<br>EVIDENCE</label>
<input type="radio" name="reasonforsearch" value="PROBABLE CAUSE" id="probable cause reasonable suspicion"style="display: none">
<label for="probable cause reasonable suspicion" class="search">PROBABLE CAUSE<br>REASONABLE SUSPICION</label><br>
<input type="radio" name="reasonforsearch" value="INVENTORY" id="inventory"style="display: none">
<label for="inventory" CLASS="search">INVENTORY</label><br>
<input type="radio" name="reasonforsearch" value="INCIDENT TO ARREST WARRANT" id="incident to arrest warrant"style="display: none"><br>
<label for="incident to arrest warrant" CLASS="search">INCIDENT TO ARREST<br>WARRANT</label>
</div>
</div>
<div class="contraband col-lg-2" onClick="MM_DW_effectHighlight($(this),'show','highlight','#99D7FF',1000)">
<input type="radio" name="contraband"class="contraband" value="CONTRABAND" style="display:none">
<label for="contraband" class="contraband">CONTRABAND</label>
<h4>DESCRIPTION OF CONTRABAND</h4>
<input type="radio" name="contraband" id="illegal drugs drug paraphernalia" value="ILLEGAL DRUGS DRUG PARAPHERNALIA"STYLE="DISPLAY: NONE">
<label for="illegal drugs drug paraphernalia" class="contraband">ILLEGAL DRUGS <br>DRUG PARAPHERNALIA</label>
<input type="radio" name = "contraband"class="contraband" id="currency"value="CURRENCY" STYLE="display: none"><BR>
<label for="currency" class="contraband">CURRENCY</label><BR>
<input type="radio" name="contraband" value="ALCOHOL"id="alcohol" style="display: none">
<label for="alcohol" class="contraband">ALCOHOL</label>
<input type="radio" name="contraband" value="STOLEN PROPERTY" id="stolen property" style="display: none">
<label for="stolen property" class="contraband">STOLEN PROPERTY</label>
<input type="radio" name="contraband" value="OTHER" id="other"style="display: none">
<label for="other" class="contraband">OTHER</label>
<input type="radio" name="contraband" value="WEAPONS" id="weapons"style="display: none"><BR>
<label for="weapons" class="contraband">WEAPONS</label>
</div>
<div class="arrest col-lg-2" onClick="MM_DW_effectHighlight($(this),'show','highlight','#99D7FF',1000)">
<input type="radio" name = "arrest"class="arrest" value="ARREST" STYLE="display: none">
<label FOR="ARREST" class="arrest">ARREST<br>RESULT OF <br>STOP/SEARCH</label>
<h4>ARREST BASED ON</h4>
<input type="radio" name="offensecharged" id="violation of penal code"value="VIOLATION OF PENAL CODE"style="display:none">
<label for="violation of penal code" class="violation of penal code">VIOLATION OF<br> PENAL CODE</label>
<input type="radio" name="offensecharged" id="violation of traffic law"value="VIOLATION OF TRAFFIC LAW"style="display:none">
<label for="violation of traffic law" class="violation">VIOLATION OF<br> TRAFFIC LAW</label>
<input type="radio" name="offensecharged" value="VIOLATION OF CITY ORDINANCE" id="violation of city ordinance"style="display:none">
<LABEL FOR="violation of city ordinance" CLASS="arrest">VIOLATION OF<br> CITY ORDINANCE</LABEL>
<input type="radio" name="offensecharged"value="OUTSTANDING WARRANT" id="outstanding warrant"style="display:none">
<label for="outstanding warrant" class="arrest">OUTSTANDING<BR> WARRANT</label>
</div>
<div class="force col-lg-2" onClick="MM_DW_effectHighlight($(this),'show','highlight','#99DFFF',1000)">
<label for="FORCE USED" class="force">FORCE USED</labeL>
<h4>FORCE USED</h4>
<input type="radio" name= "forceused"class="force" value="BODILY INJURY" id="bodily injury"style="display: none">
<label for="bodily injury" class="force">BODILY INJURY</label>
<input type="radio" name="forceused"class="force" value="WRITTEN WARNING AS A RESULT OF STOP" id="warning" style="display: none">
<label for="warning" class="force">WRITTEN WARNING<br> AS A<br> RESULT OF STOP</label>
<input type="radio" class="force" value="WRITTEN CITATION AS A RESULT OF STOP" id="written citation as a result of stop"style="display: none"/>
</div>
<nav class="style-nav col-lg-offset-0 col-lg-8" onClick="clear form" onMouseOver="MM_callJS('clear form');MM_goToURL('parent','file:///W|/Racial_Profiling/1849sb-sandra-bland-act/racial-profiling');MM_popupMsg('SUBMITTED');MM_popupMsg('SUBMITTED');MM_goToURL('parent','file:///W|/Racial_Profiling/SBACT/Racial_Profiling');return doc
rproffitt 2,662 "Nothing to see here." Moderator
May want to take care on topic title vs. the question. I think you want to change the border of a field which you might change with code.
Example ideas at https://stackoverflow.com/questions/21127083/js-validation-highlight-input-field-red-green
BinaryDigit 0 Newbie Poster Team Colleague
Ditch Dreamweaver! I'd recommend using vanilla Javascript or JQuery and read this post:
https://stackoverflow.com/questions/8766084/how-to-highlight-the-clicked-navigation-item
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.