Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

David P
Javascript global replace. How to replaced multiple items.?
I'm have a small snippet of code that is using javascript to replace some text.
that code is:
NotesGrab = NotesGrab.replace(/;/g,"br /");
Therefore everything it seems a semicolon (;) it replaces it with a line break.
My questions is how to I do this for multiple things? Such as a semicolon, a exclamation point or a > or < sign.
2 AnswersProgramming & Design8 years agojavascript not working. Can you please help? Can't add null value .?
function getCustomer()
{
var CustomerGrab = document.getElementById("CustomerName").…
CustomerGrab = CustomerGrab.replace(/;/g,";
");
document.getElementById("CustomerNameR… = CustomerGrab;
}
<label for="CustomerName">Customer Name: </label><input type="textbox" id="CustomerName" />
<input type="button" value="Create Notes" id="CreateNotes" onClick="getCustomer()" />
<div id="CustomerNameResults></div>
Getting an error saying "can not set property of innterHTML to null".
but in my textbox I have a value. What am I missing?
1 AnswerProgramming & Design8 years agoWhy doesn't this javascript work? Error saying can't display null value.?
function getCustomer()
{
var CustomerGrab = document.getElementById("CustomerName").value;
CustomerGrab = CustomerGrab.replace(/;/g,";<br />");
document.getElementById("CustomerNameResults").innerHTML = CustomerGrab;
}
<label for="CustomerName">Customer Name: </label><input type="textbox" id="CustomerName" /><br />
<input type="button" value="Create Notes" id="CreateNotes" onClick="getCustomer()" />
<div id="CustomerNameResults></div>
Getting an error saying "can not set property of innterHTML to null".
but in my textbox I have a value. What am I missing?
1 AnswerProgramming & Design8 years agoPulling Data from MS Access with a MS Access Form. How?
I'm very new to Access forms, but what I'm trying to do is pull data that's already in a table I created using the form. Basically having a few textboxes that I manually fill in and have it run a query.
Example Query: Select UserName from MyTable where UserName like "*Smith*";
But I want to pull the data using a form and a submit button. I'm very new to this and don't know where to begin. From what I'm reading I see that you can enter data from a form to insert it into the table but I'm trying to do it the other way around.
any help would be great.
Thanks,
2 AnswersProgramming & Design9 years agoHow to enter a LineBreak "<br />" when a semicolon is entered in Javascript?
What I'm doing is wanting to create a textarea in javascript, but have javascript look at the text entered and where there is a semicolon (;) have javascript treat it as a line break. Then I will post this result within a "<div>" but I have no idea how to have javascript basically read the text entered in the textarea.
Any thoughts would be great.
Thanks,
1 AnswerProgramming & Design9 years agoCisco CCNA pretest - Can't figure out answer. Can you help? It's UTP types.?
I am stuck on one question in the cisco CCNA pretest.
the question is:
which category wires can use 100BASE-TX speeds?
Answers are (you must pick four of them)
Catoregory 1
Cat 2
cat 3
cat 4
cat 5
cat 6
cat 7
cat 8.
I've choosen C,D,E,F and well basically many combinations. the only wire that I can see that actually does use 100base-tx is cat 5. But its saying I have to pick four. I tried picking one and that doesn't work either.
Any thoughts?
4 AnswersComputer Networking9 years agoHTML text area to span. Keep formatting. How?
I created a "to do list" that uses HTML5 local storage to save my tasks. However, in my text area what I type (with spaces, line breaks) aren't kept when I hit the save button.
For example this is what I write:
Hello,
How are you.
But this is what comes up in the <span> field I create:
Hello, How are you
How do I write this so if I hit enter or something to line break that it keeps formatting once it's saved.
4 AnswersProgramming & Design9 years agoHTML mailto: with attachment. Is this possible?
I'm trying to write a simple web where I can put in fields such as "To" "CC","Body" etc. But I want the ability to add an attachment. But the below code finds the message as null. Is there a way to create a MAILTO: attribute that includes an attachment. Below is my code and thank you in advance.
<html>
<head>
<script type="text/javascript">
function SendFile()
{
var SavedFile = document.getElementById("FileLocation").value;
var To = document.getElementById("SendTo").value;
var CC = document.getElementById("CopyTo").value;
var Body = document.getElementById("Body").value;
var Message = '<a href="mailto:' + To+ '?subject=' + "Attachment" + '&body=' + Body + '&attachment=' + SavedFile + ' ">email</a>'
}
</script>
</head>
<body>
<input type="file" id="FileLocation"/>
<input type="textbox" id="To" />
<input type="textbox" id="CC" />
<input type="textbox" id="Body" />
<input type="button" value="Send Email" onClick="SendFile()" />
</body>
</html>
2 AnswersProgramming & Design10 years agoCutting Baseboard, outside corners and chipping issues.?
I'm cutting baseboard in my basement and I'm having two issues.
Issue 1 Cutting outside corners.
I'm trying alot of things and making mistakes, I can't figure out the "right" way to cut a outside corner. I'm trying two to three times before I finally get it right. What is the right way to cut a outside corner.
Issue 2 chipping.
This isn't a new saw, but only used a hand full of times. The blade is "fairly new" but at the top of the baseboard I'm getting chips. Is there a way to stop this? The issue I'm thinking is because my small Miter Saw only cuts at 45 degrees one way. So in order to get the other cut I need to flip the board to the other side. Could that be the reason?
Any kind of help or advice would be great. Thank you in advance.
4 AnswersDo It Yourself (DIY)10 years agoHTML - Javascipt using outlook as email client. How to have OUTLOOK use HTML.?
I created a email form for my work. Basically we have a "canned" email to go out that we would copy and paste. I created the form so we can click an option, then click "send email" and the message will appear with in an email from outlook. Here is my code below. The issue is that outlook isn't rendering the body of the email in HTML. How do I fix this? I have links and line breaks in there that I would like to use.
Thanks,
<!doctype HTML>
<HTML>
<HEAD>
<TITLE>Emails</TITLE>
<SCRIPT type="text/javascript">
function CaptureInstallInfo()
{
var ToInfo = document.getElementById("ToBox").value;
var CCBox = document.getElementById("CCBox").value;
var Install = "~~Main Order Contact~~<br /> Thank you for your order. We are currently processing the order referenced below. A Solution Delivery Coordinator will be assigned to manage the deployment of the requested services and will conduct an initial introduction within 2 Business Days.<br /><br /> Order: ~~ORD#~~<br /><br />CWP ~~CWP#~~<br /><br /> In the meantime, please contact <a href=mailto:someone@someone.net>Service Engagement</a> with any questions. <br /><br />Regards,<br />Service Engagement.";
document.getElementById("To").innerHTML = "<br />" + ToInfo + " " + CCBox + " " + Install;
}
function CaptureRenewalInfo()
{
var ToInfo = document.getElementById("ToBox").value;
var CCBox = document.getElementById("CCBox").value;
var SubjectBox = "Renewal Order";
var Renewal = "~~Main Order Contact~~<br /> Thank you for your renewal order. We are currently processing the order referenced below. A Solution Delivery Coordinator will be assigned to manage the edployment of the requested services and will conduct an initial introduction within 2 Business Days.<br /><br /> Order: ~~ORD#~~<br /><br />CWP ~~CWP#~~<br /><br /> In the meantime, please contact <a href=mailto:someone@someone.net>Service Engagement</a> with any questions. <br /><br />Regards,<br />Service Engagement.";
var RenewalEmail = "~~Main Order Contact~~%0A%0A<br /> Thank you for your renewal order. We are currently processing the order referenced below. A Solution Delivery Coordinator will be assigned to manage the edployment of the requested services and will conduct an initial introduction within 2 Business Days.%0A%0A<br /><br /> Order: ~~ORD#~~<br />%0A%0A<br />CWP ~~CWP#~~<br />%0A%0A<br /> In the meantime, please contact <a href=mailto:someone@someone.net>Service Engagement</a> with any questions. <br /><br />%0A%0ARegards,<br />Service Engagement.";
document.getElementById("CC").innerHTML = "<br />" + ToInfo + " " + CCBox + " " + Renewal + "<br />";
document.getElementById("BodyOfEmail").innerHTML = "If the above is correct, Please send this as an " + '<a href="mailto:' + ToInfo + '?subject=' + SubjectBox + '&cc=' + CCBox + '&body=' + RenewalEmail + ' ">email</a>';
}
</script>
</head>
<body>
<input type="textbox" id="ToBox" /> <label for="ToBox">To:</label><br />
<input type="textbox" id="CCBox" /> <label for="CCBox">CC:</label><br />
<input type="button" value="Install" onClick="CaptureInstallInfo()" /><br />
<input type="button" value="Renewal" onClick="CaptureRenewalInfo()" /><br />
<span id="To"></span><br />
<span id="CC"></span><br />
<span id="BodyOfEmail"></span><br />
</body>
</html>
1 AnswerProgramming & Design10 years agojavascript getElementById issues.?
I'm trying to gather some text (a string) from a textbox.
I'm then trying to put the textbox results in an array, then randomize that array.
But for some reason I'm getting errors that are coming up saying that the textbox is null. I'm not sure why.
where is what I have.
Array.prototype.ShuffleNames = function ()
{
var i = this.length, j, temp;
while ( --i )
{
j = Math.floor( Math.random() * (i - 1) );
temp = this[i];
this[i] = this[j];
this[j] = temp;
}
};
var Player1 = document.getElementById('P1');
var Player2 = document.getElementById('P2');
var Player3 = document.getElementById('P3');
var Player4 = document.getElementById('P4');
var Player5 = document.getElementById('P5');
var Player6 = document.getElementById('P6');
var Player7 = document.getElementById('P7');
var Player8 = document.getElementById('P8');
var Player9 = document.getElementById('P9');
var Player10 = document.getElementById('P10');
var VariableList = document.getElementById('VariableName');
var Variable_Name = [Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Player9, Player10];
function VariableShuffle()
{
Variable_Name.ShuffleNames();
document.getElementById('VariableName').innerHTML = Variable_Name.join('<br />');
}
<input type="textbox" id="P1" /> Team One<br />
<input type="textbox" id="P2" /> Team Two<br />
<input type="textbox" id="P3" /> Team Three<br />
<input type="textbox" id="P4" /> Team Four<br />
<input type="textbox" id="P5" /> Team Five<br />
<input type="textbox" id="P6" /> Team Six<br />
<input type="textbox" id="P7" /> Team Seven<br />
<input type="textbox" id="P8" /> Team Eight<br />
<input type="textbox" id="P9" /> Team Nine<br />
<input type="textbox" id="P10" /> Team Ten<br />
<input type="button" value="VOrder" onClick="ShowMeAll()" />
<span id="VariableName"></span>
4 AnswersProgramming & Design10 years agoJavascript Shuffle with names - how to slightly alter.?
Below is my code for a Javascript Shuffle. It works just fine, however, I wanted to alter this just a little bit but i can't figure out how.
This is for a random names for fantasy football draft. This does the random just fine, but what I want to add is either before the name or after the name, put a static phrase. My example is:
PICK 1 - "random name"
PICK 2 - "random name 2"
etc. The pick 1 and pick 2 are static but the names are not. Here is my code.
<!doctype HTML>
<HTML>
<head>
<title>Javascript Shuffle</title>
<script type="text/javascript">
Array.prototype.SortMe = function()
{
this.sort(function()
{
return Math.round(Math.random()) - .05;
});
};
var Array_Names = ['David', 'Jerry', 'Jeff P.', 'Dan', 'Jeff F.', 'Frank', 'James', 'Greg F.', 'Scott T.', 'Shaun G.'];
var Array_Numbers = [1,2,3,4,5,6,7,8,9,10];
function counting()
{
var i = 0
var Timing = setTimeout("i++",1000);
document.getElementById('ShowNum').innerHTML = Timing;
}
function PerformSort()
{
Array_Names.SortMe();
document.getElementById('Printout').innerHTML = Array_Names.join("<br />");
}
var counter = 0;
//window.onload = function() {PerformSort();}
</script>
</head>
<body>
<span id='Printout'></span><br />
<input type="button" Value="Perform Sort" Onclick="PerformSort()" Onclick="counter++" /><br />
<input type="button" value="Increase" onClick="counting()" />
<span id='ShowNum'></span>
</body>
</html>
Also, just to keep a counter I added another button (which I plan to incorporate in the first button to show how many times I ran the app. But how I did the counting for some reason it doesn't start unless I put a timeout in there. And with the time out it starts at 2. I am not sure why. Any thoughts?
Thanks,
1 AnswerProgramming & Design10 years agoVBA in Excel - Or best way to perform delete action on certain rows.?
I have a large list 1000+ rows that I copied and pasted from multiple emails. One of the rows (which repeats but not at a consistent basis) has two stars in front of it. I did a text to columns to remove the "**" but for some reason it kicked over the rest of the data two rows to the right. So I'm looking for a VBA action to be able to automatically remove all extra columns to the left so all rows start in the A column. Not sure how to handle this at all.
1 AnswerProgramming & Design10 years agojavascript MATH.RANDOM() function. - How to use without getting duplicate results.?
I have code where have an array where I have names. I am using the math.random() function to randomly choose the names, but they keep coming up duplicated. How can I get the following code to NOT show duplicates?
Thanks,
<html>
<head>
<title> JavaScript array random </title>
<script type="text/javascript">
var arrName = new Array(10);
arrName[0] = "David P;
arrName[1] = "Jerry P";
arrName[2] = "Jeff P";
arrName[3] = "Jeff F";
arrName[4] = "Dan L";
arrName[5] = "Scott T";
arrName[6] = "Greg F";
arrName[7] = "Shaun G";
arrName[8] = "James L";
arrName[9] = "OPEN 2";
var firstP = (Math.round((Math.random()*8)+1))
document.write("<b>West:=</b>" +arrName[firstP]+ "</br>");
var secondP = (Math.round((Math.random()*8)+1))
document.write("<b>West:=</b>"
+arrName[secondP]+"</br>");
var thirdP = (Math.round((Math.random()*8)+1))
document.write("<b>West:=</b>"
+arrName[thirdP]+"</br>");
var fourthP = (Math.round((Math.random()*8)+1))
document.write("<b>West:=</b>" +arrName[fourthP]+"</br>");
var fifthP = (Math.round((Math.random()*8)+1))
document.write("<b>West:=</b>" +arrName[fifthP]+"</br>");
var sixthP = (Math.round((Math.random()*8)+1))
document.write("<b>East:=</b>"+arrName[sixthP]+"</br>");
var seventhP = (Math.round((Math.random()*8)+1))
document.write("<b>East:=</b>"+arrName[seventhP]+"</br>");
var eighthP = (Math.round((Math.random()*8)+1))
document.write("<b>East:=</b>" +arrName[eighthP]+"</br>");
var ninthP = (Math.round((Math.random()*8)+1))
document.write("<b>East:=</b>" +arrName[ninthP]+"</br>");
var tenthP = (Math.round((Math.random()*8)+1))
document.write("<b>East:=</b>" +arrName[tenthP]+"</br>");
</script>
</head>
<body>
<form>
<h2><font color="blue">JavaScript array Random Example</font></h2>
<input type="submit" value="Refresh"/>
</form>
</body>
</html>
4 AnswersProgramming & Design10 years agoHTML 5 connection to an local database such as MS Access. Is this possible?
I know you can use local or session storage for HTML5, but is there a way to connect a HTML 5 document to a MS Access database? I'm wanting to use this locally only and not on a public website. But I prefer to use ACCESS to have a little more flexibility than local storage.
Thanks,
3 AnswersProgramming & Design10 years agoJavascript HTML5 LocalStorage. Not sure why doesn't work.?
What I'm trying to do is get a list of players on a baseball team that I type in, This is just the first part, saving to local storage, when I save them, I try to pull one of the names, so I can see that it works, but it doesn't. Thoughts? Thank you.
<!doctype HTML>
<html><head><script type="text/javascript">
function PlayersAll(){var player1 = document.getElementById("Play1").value; var player2 = document.getElementById("Play2").value; var player3 = document.getElementById("Play3").value;
var player4 = document.getElementById("Play4").value; var player5 = document.getElementById("Play5").value;
var player6 = document.getElementById("Play6").value;
var player7 = document.getElementById("Play7").value;
var player8 = document.getElementById("Play8").value;
var player9 = document.getElementById("Play9").value;
var player10 = document.getElementById("Play10").value;
var player11 = document.getElementById("Play11").value;
var player12 = document.getElementById("Play12").value;
var player13 = document.getElementById("Play13").value;
var player14 = document.getElementById("Play14").value;
document.getElementById("ShowPlayers1").innerHTML = player1 + "<br />";
document.getElementById("ShowPlayers2").innerHTML = player2 + "<br />";
document.getElementById("ShowPlayers3").innerHTML = player3 + "<br />";
document.getElementById("ShowPlayers4").innerHTML = player4 + "<br />";
document.getElementById("ShowPlayers5").innerHTML = player5 + "<br />";
document.getElementById("ShowPlayers6").innerHTML = player6 + "<br />";
document.getElementById("ShowPlayers7").innerHTML = player7 + "<br />";
document.getElementById("ShowPlayers8").innerHTML = player8 + "<br />";
document.getElementById("ShowPlayers9").innerHTML = player9 + "<br />";
document.getElementById("ShowPlayers10").innerHTML = player10 + "<br />";
document.getElementById("ShowPlayers11").innerHTML = player11 + "<br />";
document.getElementById("ShowPlayers12").innerHTML = player12 + "<br />";
document.getElementById("ShowPlayers13").innerHTML = player13 + "<br />";
document.getElementById("ShowPlayers14").innerHTML = player14 + "<br />";
if(localStorage)
{
if(localStorage.TeamP1)
{
localStorage.TeamP1 = player1;
}
if(localStorage.TeamP2)
{
localStorage.TeamP2 = player2;
}
if(localStorage.TeamP3)
{
localStorage.TeamP3 = player3;
}
if(localStorage.TeamP4)
{
localStorage.TeamP4 = player4;
}
if(localStorage.TeamP5)
{
localStorage.TeamP5 = player5;
}
if(localStorage.TeamP6)
{
localStorage.TeamP6 = player6;
}
if(localStorage.TeamP7)
{
localStorage.TeamP7 = player7;
}
if(localStorage.TeamP8)
{
localStorage.TeamP8 = player8;
}
if(localStorage.TeamP9)
{
localStorage.TeamP9 = player9;
}
if(localStorage.TeamP10)
{
localStorage.TeamP10 = player10;
}
if(localStorage.TeamP11)
{
localStorage.TeamP11 = player11;
}
if(localStorage.TeamP12)
{
localStorage.TeamP12 = player12;
}
if(localStorage.TeamP13)
{
localStorage.TeamP13 = player13;
}
if(localStorage.TeamP14)
{
localStorage.TeamP14 = player14;
}
}
else
{
document.getElementById("Show").innerHTML = "You need a browswer that supports HTML5! Google Chrome!";
}
}
</script>
<script type="text/javascript">
function ShowAllPlayers()
{
if(localStorage.TeamP14)
{
document.getElementById("Remember").innerHTML = localStorage.TeamP14;
}
else
{
document.getElementById("Remember").innerHTML = "Something is wrong";
}
}
</script>
</head>
<body>
<input type="texbox" id="Play1"><label for="Play1">Player One Name</label></input><br />
<input type="texbox" id="Play2"><label for="Play2">Player Two Name</label></input><br />
<input type="texbox" id="Play3"><label for="Play3">Player Three Name</label></input><br />
<input type="texbox" id="Play4"><label for="Play4">Player Four Name</label></input><br />
<input type="texbox" id="Play5"><label for="Play5">Player Five Name</label></input><br />
<input type="texbox" id="Play6"><label for="Play6">
3 AnswersProgramming & Design10 years agoSQL questions. Finding the last name that is listed multiple times.?
What I'm trying to do is in a table I have a list of names, FirstName, LastName, Email, etc.
What I'm trying to do is provide myself a list where the last name is listed multiple times.
So I'm thinking
SELECT FirstName, LastName
From TABLE
HAVING count(LastName) > 1;
But this doesn't work for obvious reasons. But I'm stuck on how to do that. Seems easy enough. but I guess I'm dumb tonight.
Thanks for the help.
2 AnswersProgramming & Design10 years agoJavascript - Why can't I get this Javascript as a number? It's coming up NAN?
I can't get this into a number. What am I doing wrong? I know probably something simple... :)
Thanks for helping.
This is part of the code I can't get into a number result is NAN.
total = "$" + parseFloat(original - (original * percentdiscount));
TotalFloat = parseFloat(total);
FinalTotal = Math.round((TotalFloat) * 1000)/1000;
Here is my entire code.
<!doctype HTML>
<HTML>
<head>
<title>Discount Calc</title>
<script type="text/javascript">
function Calc()
{
var original = parseFloat(document.getElementById( "originalamount").value);
var percentdiscount = parseFloat(document.getElementById( "discountpercent").value);
//discounted price
var discount = document.getElementById("discountamount");
var total;
var difference;
if(isNaN(original) || isNaN(percentdiscount))
{
alert("That is not a number");
return;
}
total = "$" + parseFloat(original - (original * percentdiscount));
TotalFloat = parseFloat(total);
FinalTotal = Math.round((TotalFloat) * 1000)/1000;
//difference = Math.round(orgnl - dscnt)/1000;
//Putting Result back into FinalPrice textbox
discount.value = total;
document.getElementById("WriteItHere").innerHTML = "Your final amount is " + FinalTotal;
/*
document.getElementById( "final1").innerHTML = "$" + difference;
document.getElementById("Orig1").innerHTML = "$" + orgnl;
document.getElementById("Disc1").innerHTML = "$" + dscnt;
*/
}
</script>
</head>
<body>
<table border="2" cellpadding="5" cellspacing="10">
<tr>
<th style="color:red">Find a Discounted Price</th>
</tr>
<tr>
<td>
<p>
<input type="text" id="originalamount" />
<label for="originalamount" >Original Amount </label>
</p>
<p>
<input type="text" id="discountpercent" title="example: 10% = .10" />
<label for="discountpercent" title="example: 10% = .10">Discounted Percent</label>
</p>
<p>
<input type="button" id="calculate" value="Click To Calculate" onClick="Calc()" />
</p>
<p>
<input type="text" id="discountamount" />
<label for="discoutamount">Discounted Amount</label>
</p>
<div id="WriteItHere"></div>
</td>
</tr>
</table>
<br>
</body>
</HTML>
4 AnswersProgramming & Design10 years agoJavaScript 2 deciamal places. I can't seem to get it to work.?
I'm writing a HTML page with Javascript and calculating cost per mile. Everything is working fine, but I'm trying to get the values to only go to two decimal places and I can't get it to work. Also when I put let's say $3.60 as a gas price the zero always drops off and doesn't show. not sure how to fix that as well. Any thoughts?
Thanks
<html>
<title>Driving Costs</title>
<style type="text/css">
</style>
<script type="text/javascript">
function MileCost()
{
//Pulling Values from textboxes
var GasPrice = document.getElementById("Gas");
var MilesPer = document.getElementById("Miles");
var DriveTotal = document.getElementById("Driven");
//Converting String values (above) to Float variables
GasPrice = Math.round(parseFloat(GasPrice.value)*100)/100;
MilesPer = Math.round(parseFloat(MilesPer.value)*100)/100;
DriveTotal = Math.round(parseFloat(DriveTotal.value);
//performing Math to figure out cost per mile driven
var CostPerMile = parseFloat((GasPrice/MilesPer)*DriveTotal);
document.getElementById("Results").innerhtml = "When Gas is $" + GasPrice + " it will cost you $" + CostPerMile + " per mile." + GasPriceFinal;
}
</script>
</head>
<body>
<form id="MyForm">
<input type="textbox"id="Gas"/><label for="Gas"> Enter Price per gallon of Gas</label><br />
<input type="textbox"id="Miles"/><label for="Miles"> Enter miles per gallon of your vechile</label><br />
<input type="textbox" id="Driven"/><label for="Driven"> Enter total miles of your trip</label><br />
<input type="button" value="Calculate Cost per Mile" onClick="MileCost()"/>
<div id="Results"></div>
</form>
</body>
</html>
1 AnswerProgramming & Design10 years agoJavascript strikethroughs and onmousedown events. Seem to be clashing. How to fix this.?
What I have here is a list of notes. When I walk through them at work and complete each line item I click on the note and it strikes through. I do this via a onmouse event. And I remove it via a dblclick event.
However I would like to clear the strike throughs via a button. But the two are clashing, when I use the mouse event to strike through, I can't clear it. Or if I use a button to strike through, I can't dblclick clear it.
I tried to make all of the id's the same and that doesn't work either.
thoughts?
<!DOCTYPE HTML>
<html>
<head>
<title>Notes </title>
<style type="text/css">
ol li:hover
{
background-color: yellow;
<!--#A9A9A9-->
}
b:hover
{
background-color: lightgrey;
}
a:hover
{
color: green;
}
#bold:hover
{
font-weight:bold;
}
</style>
<script type="text/javascript">
function LineMe()
{
document.getElementById("txt").style.textDecoration="line-through";
}
function ClearMe()
{
document.getElementById("txt").style.textDecoration="none";
}
</script>
</head>
<body>
<ol>
<h2>Vantive OP Notes</h2><br />
<span id="txt">
<li id="clear" onmousedown='this.style.textDecoration = "line-through"' ondblclick='this.style.textDecoration = "none"'>One</li><br />
<li id="clear" onmousedown='this.style.textDecoration = "line-through"' ondblclick='this.style.textDecoration = "none"'>
Two </li><br />
<li id="clear" onmousedown='this.style.textDecoration = "line-through"' ondblclick='this.style.textDecoration = "none"'>
Three </li><br />
<li id="clear" onmousedown='this.style.textDecoration = "line-through"' ondblclick='this.style.textDecoration = "none"'>
Four</li><br />
<li id="clear" onmousedown='this.style.textDecoration = "line-through"' ondblclick='this.style.textDecoration = "none"'>
Five </li><br />
<li id="clear" onmousedown='this.style.textDecoration = "line-through"' ondblclick='this.style.textDecoration = "none"'>
Six </li><br />
<li id="clear" onmousedown='this.style.textDecoration = "line-through"' ondblclick='this.style.textDecoration = "none"'>
Seven</li><br />
<li id="clear" onmousedown='this.style.textDecoration = "line-through"' ondblclick='this.style.textDecoration = "none"'>Eight</li><br />
</span>
</ol>
<button type="button" onclick="ClearMe()" >Clear Strike Throughs</button>
<button type="button" onclick="LineMe()" >Line me</button>
<div id="input"></div>
<br />
<a href="file://C:\Documents and Settings\david.pagell\My Documents\Personal\Study Guide\StudyGuide.html">Go Back</a>
</body>
</html>
Thanks,
2 AnswersProgramming & Design10 years ago