Unwanted Text Selection In MSIE?

Oct 13, 2011

I made up a little test program to grab the mouse X and Y coordinates and plan to use it to allow users to resize a window.

Anyway, the problem I'm having is that in MSIE-8, the mouse down and movement causes text to be selected (which I don't want).

Here's is a screenshot from MSIE:

[URL]

And here is the test program live online: [URL]

Notice that the text in the box is selected... I don't want that to happen.

Of course, it works just fine in Firefox, but not MSIE.

View 4 Replies


ADVERTISEMENT

JQuery :: Unwanted Selection Of Html Element

Feb 15, 2011

This is probably more of an HTML question than anything else, so my apologies if it's out of place.I'm using a series of spans within a div to act as filters (selectors) to hide/show various divs. When the user clicks on the text within the span, the span toggles a "selected" class, and also triggers a function to hide the associated divs. My problem is that occasionally the area around the text (the entire span, it would seem) gets "selected" when clicked on and turns blue, obscuring the text. Here are two screenshots, one showing the word "lambs" correctly, the other showing the same word with the unwanted blue background. Question: is there any way to make this not happen? Should I be using different elements as the selectors?

View 3 Replies View Related

JQuery :: Attribute Selection Not Working In MSIE; Eg $("input[name=name]").val()

Aug 5, 2009

I tried to get values from a input box which works great in Firefox, but not in MSIE;

$("input[name=name]").val();

Is there a workaround for MSIE to get this working or am I just doomed to use id's?

View 11 Replies View Related

Way To Prevent Tab Text Highlight / Disable Tab Text Selection

Apr 21, 2011

Here's a sample form:

Code:
<form action="#" method="post">
Name:<br />

[code]...

View 3 Replies View Related

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 View Related

Possible To Prevent Tab Text Highlight / Disable Tab Text Selection?

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

Add Text To Current Selection

May 14, 2009

I have a function that will add text to the end of my text box. I want to be able to have the text added where it is currently selected.

My current code is :

View 1 Replies View Related

Wrapping A Selection With Text?

Jun 11, 2011

I am working on code to wrap BBCodes around a user selection, then leave the selection selected for possibly adding more BBCodes around the same selection.My problem is that there seems to be several different ways to do it and I can't figure out which one is "the best".Now, I can't use the "standard" way of doing this because I am working with TinyMCE. I know there are countless examples on how to do this with textareas... that is NOT what I need.TinyMCE can give me a selection RANGE, a selection NODE or a selection OBJECT. Note that if I use TinyMCE's range, it internally "normalizes" the range to be a standard W3C range, regardless of browser.I've created a new range, extracted the selection from the user's range, created elements for the open and close BBCode, inserted the elements into the range and finally set the user's selection to the new range. Works fine.

I also tried taking the selection node (which is an element), then simply used "innerHTML" to add the opening and closing tags, then set the node to the modified node. Works fine.I've also used the editor's built in "selection.getContent()" and "selection.setContent()" calls and THIS also works.I've even tried using the DOM "surroundContents()" function, then used a regex to change the < and > into [ and ]. Freaky... but that works too.So, my dilemma is... which method should I use???To recap, here's what I want (blue represents selected text):

This is a test sentence. (user selected some text)
This is a test sentence. (text is wrapped and remains selected).
This is a test sentence. (user clicked another bbcode button).

[code]....

View 6 Replies View Related

Get The Selection Of A Text With The Function?

Mar 27, 2010

im trying to get the selection of a text with the javascript function : window.getSelection();.

The problem is that the result is not like i hope. For example with a structure like this:

<div class="one" id="one">
Im one div
<strong class="two" id="two"> this is strong </strong>
Rest of div

[Code]....

View 1 Replies View Related

How Disable JS In MSIE 6?

Jul 23, 2005

I find I cannot disable javascript in MSIE 6 I've Help'd, Google'd, and searched here to no avail.

<noscript>
You don't have javascript enabled
</noscript>

will not display for me.

View 11 Replies View Related

Unwanted Gap In The Bottom?

Feb 9, 2009

I have used a javascript inside the bottom of the page, I am not able to get why the unwanted gap is coming, can we resolve this without removing the javascript,

View 2 Replies View Related

How Many MSIE Users Have Js On?

Dec 27, 2000

does anyone have a tough idea of what percentage of MSIE users have javascript turned on?
has anyone done a survey?

View 9 Replies View Related

Get Text Selection In FireFox/Mozilla?

Sep 25, 2005

Can anyone give me a Javascript snippet that will get the currently selected
text in a TEXTAREA element? The code I have only works in IE.

View 1 Replies View Related

Display Text From Checkbox Selection?

Sep 25, 2010

Is there a way to display text from selecting checkboxes such that different combinations have different texts?

View 2 Replies View Related

Disable Text Selection And Print Key In IE7

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

Set Selection On Input Type=text In Ie?

Nov 12, 2010

I want to set selection on HTML input type=text.

Here's the code for FF and Chrome:

<input type=text value="01234567890" id=1>
<input type=submit onClick="selectIt()" >
<script>
selectIt=function (){

[Code].....

View 2 Replies View Related

URL Display In Title Bar UNWANTED

Jul 23, 2005

I don't know if it was some kind of "upgrade" in a recent Windows SP but, I now have a problem...When ever I have JavaScript open a new window the URL is displayed in the title bar prior to the title, this is really just an aesthetic problem but seems to be fixed if I set the new window property of location to yes, but I then get an ugly url title bar in my new window. Does anyone know how to disable that "feature" or even what I am talking about. It just annoys me.

View 2 Replies View Related

Removing Unwanted Toolbars

Apr 5, 2006

I just have one index.html page with NO links NO pics. Just a simple
html page.

Whenever I open that page I want to eliminate few things like:


I don't want scroll bar -> I have a solution <body scroll="no">
I don't want status bar -> ? need solution ?
I don't want toolbar bar -> ? need solution ?
I don't want menu bar -> ? need solution ?


I JUST want the title bar, address bar and the IE window.

View 5 Replies View Related

Removing Unwanted Characters

Jul 20, 2005

In a web based form I am able to make sure that there is text in an input field but I want to restrict the user from using such characters as ~ # & '

How can I modify this JavaScript below to enable this ?

if (document.form1.ProjectTitle.value == ""){
alert("Please complete the Project Title: field")
document.form1.ProjectTitle.focus()
validFlag = false
return validFlag
}

When entering the project title into another system it issues an error when those characters are input - hence the need to delete them from the request.

View 1 Replies View Related

Preventing Unwanted Characters

May 7, 2006

Instead of searching and replacing unwanted character in strings using cgi/perl, I would like to prevent some characters from ever being typed in text boxes and textfields. Two characters I would like to stop are "|" (pipe symbol) and the "carriage return". I am not even sure how to search and/or replace a carriage return in a string anyway. This may be a JavaScript function, because what I would really like to do is send an alert to tell the user that it is not allowed.

View 2 Replies View Related

JQuery :: Clear Selection Of Text On Ul Element

Sep 18, 2009

I am trying to get/set only text of list only element text value. But for some reason I can not select it in clear way. List something like:

<ul>
<li id="myid"> Here text that I want to modify
<ul>
<li id="dfdf">i don't want modify this</li>
<li id="dfdf">i don't want modify this</li>
[Code]...

View 1 Replies View Related

JQuery :: Prevent Text Selection In Button?

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

Menu Selection Populates Text Field

May 1, 2009

I have the following code I picked up which tries to fill in a text field with data depending on a user's menu item selection. I place this code in the header:

Code:
var colors = new Array();
colors["apple"] = "red";
colors["grape"] = "purple";
colors["milk"] = "white";
colors["cheese"] = "yellow";
colors["chicken"] = "white";
colors["beef"] = "red"; .....

var groups = new Array();
groups["apple"] = "fruit";
groups["grape"] = "fruit";
groups["milk"] = "diary";
groups["cheese"] = "diary";
groups["chicken"] = "meat";
groups["beef"] = "meat";

function printColorAndGroup(){
var value = document.getElementByName('food').options[document.getElementByName('food').selectedIndex].value;
document.getElementByName('food_group').value = groups[text];
document.getElementByName('food_color').value = colors[text];
}

I then use the following html in the body:
Code:
Food:
<select name="food" onchange="printColorAndGroup()">
<option>apple</option>
<option>grape</option>
<option>milk</option>
<option>cheese</option>
<option>chicken</option>
<option>beef</option>
</select>

Group:
<input type="text" name="food_group">
Color:
<input type="text" name="food_color">
But when I run this nothing happens...
Here's the page [URL]. None of the code above is colored... looks like I'm using the wrong tags here. Which tags should I use to post this stuff correctly?

View 12 Replies View Related

Can't Stop Text Selection When Dragging Object

Jun 16, 2009

I have 2 example/test pages of the issue I'm experiencing. For now, I'm just trying to get it to work in a standards-compliant browser, so view in something other than ie:

[URL]

If you click and drag the orange bar up or down, it works fine on the first page. However, on the 2nd page, if you click the orange bar and drag down too fast, it starts selecting text and then the bar gets all wacky.

My suspicion is that the bar gets messed up because the text is being selected. That occurs because if you scroll too fast, the cursor goes off the orange slider bar and starts selecting. If you scroll very slowly so that the cursor doesn't go off the bar it seems to scroll fine.

I've tried everything I can think of to stop the text from being selected, but I'm not 100% sure if that's the cause of the problem or just a symptom of something else (maybe bubbling or something?). I tried returning false on every mouse event on the lower panel, tried creating an absolutely-positioned mask above the text in the lower panel, tried removing all text from the lower panel, tried stopPropagation(), etc., but nothing seems to work.

If I set the mousedown/over/move on the lower panel to return false, it prevents selecting text normally by clicking the mouse & dragging, but it will STILL select the text if I click on the slider bar and drag down.

View 8 Replies View Related

Display Radio Selection In Text Area?

Oct 23, 2009

I'm attempting to display the output of the radio selection into the textbox.

For example, if the user selects 0-15 then display "Your age group is 0-15 years" in the text area.

i get the basic logic. i just dont understand how to display the value in the textbox. heres what i have so far if it will clarify my issue. code...

View 3 Replies View Related

Wrap A User Selection With Arbitrary Text?

Jun 24, 2011

how to properly add some text content before and after a user's selection?I am working with the TinyMCE editor, and I can get the following from it:

* User's selection as a W3C compatible range
* User's selection as a browser selection object
* User's selection as a node (element) that encompasses the user's selection

I also need the user's selection to remain selected after being wrapped.I've looked all over the web and could find nothing (except running into my OWN previous questions about this).Here's an example of what I'm trying to do:

[URL]

First line is original text, second line a part is selected, third line the selection is wrapped and the selection remains selected.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved