HTML - Disable Char/word Highlight
Hi all,
I have a very simple html file with table rows/columns. I implemented a feature where if you click once anywhere in a row, the row becomes 'highlighted' (modify the background color). The problem, and the thing I want to eliminate, is that the specific character/word that you click on also becomes highlighted. How can you keep the system from highlighting words/characters that you click on? I hope this is an easy one. Thanks, Bill HTML Code: <html> <head> <script type='text/javascript'> var currentRow=-1; function SelectRow(newRow) { for (var i = 1; i < 4; i++) { var cell=document.getElementById('cell_'+newRow+','+i); cell.style.background='#AAF'; if (currentRow!= -1) { var cell=document.getElementById('cell_'+currentRow+','+i); cell.style.background='#FFF'; } } currentRow=newRow; } </script> </head> <body> <table border=1> <tr> <td onclick='SelectRow(1)' id='cell_1,1'>cell1_1</td> <td onclick='SelectRow(1)' id='cell_1,2'>cell1_2</td> <td onclick='SelectRow(1)' id='cell_1,3'>cell1_3</td> </tr> <tr> <td onclick='SelectRow(2)' id='cell_2,1'>cell2_1</td> <td onclick='SelectRow(2)' id='cell_2,2'>cell2_2</td> <td onclick='SelectRow(2)' id='cell_2,3'>cell2_3</td> </tr> Similar TutorialsHi Can any one tell me is there any difference if a user enters '\n' (by typing) and by pressing ENTER key in an HTML form? Are both internally represented in a same way? Hi, I'm getting an error with a template I downloaded. The page is Flash but it's encased in an index.html file, which I've kept the same as the original template file. The error I'm getting is: Line 5, Char 4, Object Required. The link is: http://www.seimone.com/npessoa and here are the opening few lines: -------------------------------- html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=koi8-r" /> <title>test</title> <script language="javascript" type="text/javascript"> <!--Hide script from old browsers function newWindow(newContent) { winContent = window.open(newContent, 'nextWin', 'right=0, top=20,width=350,height=350, toolbar=yes,scrollbars=yes, resizable=yes') } //Stop hiding script from old browsers --> </SCRIPT> </head> <script src="active.js" type="text/javascript"></script> <script src="resize.js" type="text/javascript"></script> <script language="JavaScript" src="active.js" type="text/javascript"></script> <body bgcolor="#ffffff" background="bbg.jpg" style="background-position:left; background-repeat:repeat-y" marginheight="0" marginwidth="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr> <td> ------------------------------------------ FIRST - Yes, I've read about DOCTYPES, and I realize there ISN'T one. I tried adding the one for xhtml, but when I did that, the page didn't load at all! The js files in bold, active.js and resize.js, are exactly where they were in the original template - I found it strange that they were below the <head>, but I left them there just in case. The other js file is something I added on my own - it specifies the size of a pop-up window with audio samples in a different section of the site. I don't get why there's an error for Line 5, though, unless it's referring to something in the original .js files and not index.html itself. Is this a DOCTYPE issue? I have tried deleting the 3rd JS script (in case of a conflict), moving all scripts above the </head> tag, etc., and so far nothing has worked! Any ideas? Advice greatly appreciated!! My task is to say "welcome" to diferent language users on a html page by their own languages. so the page needs to display multiple languages - just for "welcome". for safety reason, I hope all language characters are recorded with char values. actually I can not input "true words" of all languages, but I have thier values. i.e. Chinese "welcome" are 2 words with hex values of 226B and CE8F, and so on for Japanese, Korean, France language etc. I tried following code for Chinese language <p xml:lang="zh-Hans" lang="zh-Hans"> ≫ 캏 </p> but it is not working at all. could you help me with code to display multiple languages with char values on a single htmp page? Thanks . . Hello, I have a webpage with several html anchors. The anchor part works ok, but when I click on the links, I only goto to the part of the page with all the anchors (all anchors are gathered low in the page) and I wanted to know if there is any way of highlighting the specific anchor that the user has clicked on. Thank you. I have an <a> tag which when you hover has the background turn grey, but it only highlights the section around the text but I would like it to be a bigger area around it. Like having text centered in a table cell and whe you hover the background turns grey. Any ideas? Hello everyone. I have a spry accordion menu in a table and as you well now when it is clicked you get a highlight around the edge of the spry object, i'm on a mac so mine is grey and when I look at it on my friends PC it is blue. Is there any way to simply get rid of this highlighting effect? Thanks Thecaia23 HI, Greetings, I would like to put a link at webpage A, eg Code: <a href="http://www.example.com"> HUHULALA </a> then when someone clicks on it, then it will link to webpage B and the page will display and highlight all the words, HUHULALA. Can we actually do that? thanks. I am doing a simple calendar. I managed to do the table with days etc. I have a problem I wish to highlight a number and the cell automatically according to the date of the day. Can Someone help please? Thanks & best regards I have a Web Page with the following HTML code: <div id= "BlockA" > <div style="position:absolute;left:31.82px;top:79.70px" class="cls_005">Text 1</div> <div style="position:absolute;left:340.70px;top:79.70px" class="cls_005">Text 2</div> <div style="position:absolute;left:31.10px;top:92.90px"> <span class="cls_005">Text 3</span> <span class="cls_002">Text 4</span></div> <div style="position:absolute;left:105.02px;top:92.90px" class="cls_005">Text 5/div> </div> "BlockA" is usually displayed without highlighting. However, under certain circumstances (as controled by my Web App), I would like to highlight (e.g. with backgroundcolor = "yellow") "Block A" when the Web page is displayed. The highlight should not change the classes in the div and span within "BlockA". Can anyone suggest how can I do this? Thanks in advance. sg2000 Hi all, I don't exactly know what to call it, apart from the explanation to what I want to do. Basically, I have a HTML page. On their, I have a text box and a search button and some text in a table. What I want to do is, when typing something in the box, clicking search will then jump to a part of the page and 'highlight' what is typed into the box. Ideally, the page will run in either HTML but I can use ASP. Unfortunately I cannot use PHP. Could anyone please help or give me some advise on this? Ok, you know how you can drag the mouse over any amount of normal text and the text gets that blue border around it. Try doing the same with an input box and you can only highlight the text of one input box at a time. How can I highlight the text from multiple form input boxes at once? Hi All, I was able to Highlight in yellow a sentence. But it doesn't work on the Option / Drop Down Menu sentence. Please HEEEELLLLP me find my mistake(s) BELOW: Code: <!DOCTYPE html> <head> <title> Yellow Hightlight </title> </head> <body bgcolor="#00CCFF"> <script type="text/javascript"> window.onload=function() { document.getElementById('NewsletterList').onchange=function() { window.location=('http://www.example.com/'+this.value+''); } } </script> <select id="NewsletterList"> <option value=""><P> <FONT style="BACKGROUND-COLOR: yellow"> PLEASE SELECT THE FOLLOWING: </FONT> CLICK This Box and Select!</P> </option> <!--this option takes you to your home page--> <option value="xxxxx">yyyy</option><!--this option takes you to . . . . . </body> </html> There has to be like a 1-line-of-code process for this...anyone know how to do it? Ok I need to dis-able a sign up button for right now, what can I do to it to just disable/remove from everyones view? </tr> <tr class="button"> <td style="text-align: center;" colspan="2"> <div class="buttons" style="font-size: 18px; padding: 15px 10px; margin-left: 10px;"><a href="/sign_up.html" title="Click here to Sign Up Now!">Click here to Sign Up Now!</a></div> </td> 1. I am having the JSP page which uses some css files . 2. i just want to avoid the scroll bar if content of my page is more . 3. How can i do that? this might be a stupid question, but what would the coding be to disable right click on my page? thanks. hello I have the following code in the same html Code: <script language="JavaScript" src="..........111........."></script> <script language="JavaScript" src="...........222.........."></script> they bot have onclick links, i would like to disable only the first one link. How can i do that ? Thank you watz wrong i want to choose the radio box and enable the text box otherwise it should be disabled Code: <html> <head> <script> function ena(){ if (document.yes.base[0].checked) {document.yes.one.disabled=false;} if (document.yes.base[1].checked) {document.yes.two.disabled=false;} } </script> <form name="yes"> <INPUT TYPE="radio" name="base" ><font color="red" onclick=ena();> *SUPREME* Pepperoni, spicy beef, mushrooms, green peppers and red onions. </font> <p> <INPUT TYPE="radio" name="base" ><font color="Green" onclick=ena();> *Vegetarian Hot One* Double green chillies, green peppers, red onions and tomato chunks. </font> <p> <input type=text name="one " disabled> <p> <input type=text name="two" disabled> </form> </html> </head> Is there anyway to disable hotlinking on a windows based server? |