Prevent Tab Text Highlight / Disable Tab Text Selection?
Apr 21, 2011
Here's a sample form:
Code:
<form action="#" method="post">
Name:<br />
<input type="text" name="name" value="your name" /><br />
[Code].....
When you tab to a text input, the value gets highlighted. How can it be disabled?
View 7 Replies
ADVERTISEMENT
Apr 21, 2011
Here's a sample form:
Code:
<form action="#" method="post">
Name:<br />
[code]...
View 3 Replies
View Related
Apr 21, 2011
Here's a sample form:
<form action="#" method="post">
Name:<br />
<input type="text" name="name" value="your name" /><br />
[code]....
View 1 Replies
View Related
Apr 15, 2010
If you have an anchor and apply the button widget, text selection in the button is still possible.
View 1 Replies
View Related
Feb 21, 2007
I'm trying to disable the text selection and print-key functions on a couple page of my web site using the code below:
View 4 Replies
View Related
Feb 18, 2009
I have a simple form - I want to disable the text field if Choice 2 from the dropdown menu is selected. I have this working with the code below, but for some reason if I go back and select choice 1 after selecting choice 2 the text field remains disabled. I only want it to be disabled if choice 2 is selected.
View 5 Replies
View Related
Sep 10, 2010
Alright, I'm using a Rooh.It WordPress plugin right now, but I don't like the way they do it, so I want to write my own code to do something similar.
I want the user to be able to select the text they want to highlight, and the background color of that text changes to whatever color they have selected.
How can I do this in JavaScript?
View 4 Replies
View Related
Aug 6, 2011
i m using jquery datepicker .it's works fine in all other browser except IE the only problem with IE is that the when i m using datepicker it wont fire my text change events IE.works fine in all other browse . if i remove plugin then IE fires text change .so the only problem with datepicker + IE my page is .aspx and i m using .net
View 2 Replies
View Related
Jun 15, 2010
I have a text area, I want that user's should not be able to enter a charaters in it. I want them to enter only numbers.I have written the code below to do this but it is not working as I think I am not calling the function right way.I am open to new suggestions as well, if I can show some alert to user if they enter character rather than no.
View 2 Replies
View Related
Oct 26, 2002
I am using a calendar control based on the one at Brainjar.com. I have made the text field into which the date is inserted readonly. The problem with this is that if a user attempts to change the date manually by deleting part of the highlighted text, the browser goes back one page.
I want to force the user to use the calendar control and not input text directly into the textfield- readonly is not enough as the text can still be highlighted and then causes problems if the user attempts to delete.
View 9 Replies
View Related
Jul 23, 2005
Is it possible, using Javascript, to highlight (in yellow..) all the occurrences of "number: [0-9]+" (regex) of the document?
View 5 Replies
View Related
Oct 20, 2006
On click of a link , the contents get displayed in an iframe. Is there a way to search some text in the content displayed in the iframe and highlight it.
View 1 Replies
View Related
Jul 14, 2007
Is there a way to selectively highlight text in an OverLib popup? I'd
like to be able to make some text stand out from the rest of the text
that is displayed.
I tried using a one-cell table with background set to yellow, but that
caused the popup not to work at all (this might be a syntax problem -
I haven't been able to find any syntax examples for putting a table
inside an OverLib call)
View 5 Replies
View Related
Oct 25, 2006
I dont know how to make the function, i would like it so that when the user enters the text it searchs the text on the page and hilites behind the text yellow. So its a bit like a "find" function that hilites behind the word that it is asked to find.
View 2 Replies
View Related
May 26, 2009
I have a list of 400+ names I am getting from a mysql database.They are listed out in a table.I would like to have a text box where once you start typing,the more I type the less matches come about
View 6 Replies
View Related
Oct 6, 2011
I have a webpage that has a texbox with states that the user can select using ajax auto complete extender. The states are separated by the ; character. Is it possible to select everything between the ; characters if a user clicks on any of the text between them.
[Code]...
View 1 Replies
View Related
Jul 3, 2010
What I want to do specifically is add a CSS class to strings that start with an @ symbol. I can't seem to find any examples online and I haven't had enough experience with jquery to figure this out on my own.
I want it to highlight either the first word only, or just the line that the @ symbol is found on.
View 8 Replies
View Related
May 11, 2010
I've tried to do it using the funciton below, it cycles through allright, but only highlights each field whilst it is in focus, then loses it when it moves to the next field. The result is that only the last text/textarea within the form is highlighted. My aim is to highlight all fields for subsequent spell checking.
View 13 Replies
View Related
Nov 22, 2002
Highlight a portion of the text and you can search it on the major search engines. The search box can also be used as a conventional search box too....
View 3 Replies
View Related
Dec 20, 2011
I have work thumbnails on one side (meals), ingredients on the other side, what I would like to do is:
1) If I hover over a meal, the ingredients used for that dish are highlighted on the left
2) If I hover over an ingredient, the dishes that used this ingredient are selected
I am just starting out in jQuery, can anyone give me some pointers.
View 5 Replies
View Related
Dec 20, 2007
I need to highlight words in text inside iFrame (target page is actually from another site). Code:
Is it possible to force this script to highlight text inside iFrame? Or probably there is another solution exists?
View 1 Replies
View Related
Dec 11, 2010
I'm working on an educational website for reading strategies where I would like to have the possibilty for the user to highlight text and the possibilty to check their highlighted answers.User task: Mark all the cause and effect connectors (because, so, therefore etc) in the text.Now I want the user to take the mouse and go over the text and mark all these connectors in the text. After marking the entire text the user will get feedback for his correct and incorrect answers and a possibilty to correct his mistakes.If the user marks in the sentence "He got hurt, because he fell of his bike." the word 'because' I would like somewhere else on the page be written that he did this correctly. If he would mark the word 'hurt' I would like the user to get a feedback saying that this answer is incorrect.Is this possible with simple html or do I need something else. If I need something else what do I need and maybe there is already a ready to use script for this.
View 2 Replies
View Related
Jul 23, 2005
I'm working on a JSP application, and wish to define a text-field so
that it becomes marked (highligted) when it obtains focus.
I've tried giving the text-field a value when it obtains focus, but
the value is not marked. So if i wish to alter the value, I have to
manually delete the given 'onFocus' value before I set a new value.
<INPUT TYPE=TEXT NAME=test size=30 want this
to be highlighted!'">
I'm missing something to highlight the text-field text in the code
above.
View 1 Replies
View Related
Oct 15, 2010
I have spent the last week trying to figure out how to do the following: User types some text in a text box. The autocomplete queries a php script that returns JSON of matched values. I have got thedrop down list to show these values but I cannot for the life of me get the matched characters to turn bold. For example, if the user types in "rav" and my list contains:
RAVEN
RAVE
RAVEL
then I want it to appear as
RAVEN
RAVE
RAVEL
My current JS code is as follows (along with HTML):
$(function() {
$( "#query" ).autocomplete({
source: "get_json.php",
[code].....
View 6 Replies
View Related
Jul 9, 2002
People have complained that window.find() doesn't work, and everyone knows Gecko doesn't support IE's proprietary TextRange object, some have assumed you can't do this in Gecko.
On the contrary though:
Node.prototype.findTextMatches = [];
Node.prototype.findText = function(query, ignoreCase) {
this.findTextMatches.length = 0;
if (ignoreCase)
query = query.toLowerCase();
var tw = this.ownerDocument.createTreeWalker(this, NodeFilter.SHOW_TEXT, { acceptNode: function(node) {return NodeFilter['FILTER_' + (RegExp(query, (ignoreCase ? 'i' : '')).test(node.nodeValue) ? 'ACCEPT' : 'REJECT')] } }, true);
var offsets = [];
offsets[-1] = query.length * -1;
var totalMatches, trueOffsetDiff;
var range = this.ownerDocument.createRange();
while (tw.nextNode()) {
totalMatches = tw.currentNode.nodeValue.split(RegExp(query, (ignoreCase ? 'i' : ''))).length - 1;
for (var i = 0; i < totalMatches; i++) {
trueOffsetDiff = offsets[offsets.length - 1] + query.length;
offsets[offsets.length] = tw.currentNode.nodeValue.substr(trueOffsetDiff)[ignoreCase ? 'toLowerCase' : 'toString']().indexOf(query) + trueOffsetDiff;
range.selectNode(tw.currentNode);
range.setStart(tw.currentNode, offsets[offsets.length - 1]);
range.setEnd(tw.currentNode, range.startOffset + query.length);
this.findTextMatches[this.findTextMatches.length] = range.cloneRange();
}
offsets.length = 0;
}
return (tw.currentNode != this);
}
Node.prototype.highlightText = function() {
if (this.findTextMatches.length > 0) {
with (window.getSelection()) {
removeAllRanges();
addRange(this.findTextMatches.shift());
}
return true;
}
else
return false;
}
To search all text in the body, ignoring case, you'd go like:
document.body.findText('search query', true);
That loads up an array full of ranges selecting the text into document.body.findTextMatches.
To selectively highlight next occurences after executing findText:
document.body.highlightText();
// highlights first occurence
document.body.highlightText();
// removes previous selection, highlights second occurrence
// etc
Just calling that method over and over will successfully highlight instances. It returns true if it highlighted something, false otherwise,
Also, since I prototyped Node, it works not just in HTML documents, but can work in XML documents too.
Calling document.findText in an HTMLDocument may cause interesting results, as it searches through all the nodes, including <head>...
View 8 Replies
View Related
Sep 26, 2006
I have an input box of type text. It is a simple onclick text in the box and it becomes blank and you can enter stuff in.
<input type="text" name=number value=999 onFocus="this.value=" >
What I'm wondering is if it is possible that when clicked on a link, the text in the textbox becomes highlighted(background blue, text white)?
View 5 Replies
View Related