JQuery :: How To Make Text Selectable When Using IE Browser

Sep 18, 2009

We recently had our site redeveloped by a professional firm. We originally requested that users not be able to copy and paste text from our site. This has created an outcry and we would like to have text be selectable. I see that they achieved this by using jquery which I am not familiar. I believe that I have found the snippet of code that turns this ability off/on but I do not know how to write the correct code to allow selection of text. This is an IE specific issue, not a problem in Firefox. I have done some investigation online and found this: [URL]. It looks cut and dry but placing this solution in the js file does nothing.

View 3 Replies


ADVERTISEMENT

JQuery :: Make A Div A Selectable Hyperlink?

Jan 18, 2010

I use this code snippet when I want to make a div a selectable hyperlink.

$('myDiv').click(function(){
window.location = $('this').attr("mylink.html") ;
});

It is simple and it works.But repeating it seems wasteful. I have a navigation menu that consists of an ordered list containing a group of list elements. This is a very common design pattern for navigation. Lets say that I want each list item to contain a div, and I want each div to be clickable.Yes, I know there is a usability issue there: relying on js to create hyperlinks is an ugly sin. But its easy enough to put an anchor element inside the "link div" for user agents without javascript. So here is our html:

<ol>
<li> <div> <a> </a> </div> </li>
<li> <div> <a> </a> </div> </li>

[code]....

So back to my problem:I want to make each div clickable. I could replicate my above js snippet for each one of the divs. But I know just enough about programming for that solution to seem kinda wrong.

View 1 Replies View Related

JQuery :: Mutually Exclusive Selectable Items?

Feb 9, 2009

My problem mostly stems out of not knowing how to implement my problem, maybe someone in the jquery world can help. I need a grid to show a list of events. Think for example soccer matches. So for each you can pick the home team, draw or away team. The choice must be mutually exclusive for each match. My current solution has an extra column with a dropdown for your result.

I would like the actual items to be selectable. Im not forced to use a grid. A repeater would work too. The data source which is an object has the home and away team logo's, a match ID which is hidden from the user and a boolean value for home, draw and away. The latter boolean values are mutually exclusive.

So in essence I'd like to have a solution where you can click the home team logo and it will check the home boolean value and highlight the home team logo or select it in some way. The user should only see Home Team Logo, Draw and Away team logo and click on his pick. If he changes his selection then his old selection should be de-selected.

View 3 Replies View Related

JQuery :: Selectable Plugin Prevents Click Event?

Mar 2, 2009

I've recently started working with jQuery. Using v1.3.1 and UI v1.6RC6. I created an accordion with another accordion nested within it. I've set both to selectable. Things seemed to be working fine until I noticed that IE and FF were behaving differently. IE allowed me to open the accordion tab that contained the nested accordion, and then allowed me to open up the nested accordion. In FF, I could not open the nested accordion. I managed to get it working in FF by setting the cancel property to li element (which contained the nested accordion). Questions:

1) I traced through the code and didn't see where jQuery unbound the click event that should have been caught by the accordion headers. The only thing that I can see is that the selectable items catch the mousedown event, and when caught create a helper div element at the same position that the mousedown occurred and at z-index 100. I've read elsewhere that a browser registers a click only if the mousedown and mouseup occurred on the same element. Does adding this element fool the browser into thinking there wasn't a click?

2) Following #1. I've read that event bubbling follows the DOM hierarchy - from child to parent, However, is it correct to assume that the target element initially determined by the element with the highest z-index (assuming all different)? Once triggered then event would bubble up ignoring z-index?

3) If #1 and #2 are fairly accurate, does anyone have any idea why IE would seem to still register a click event? Maybe it ignores the fact that another element with a higher z-indez was added and simply compares mousedown/up coordinates?

View 2 Replies View Related

JQuery :: Make The Web Page Fit The Mobile Browser

Jan 20, 2011

I know jqm can do it, but it's also force to add many template and format to the page, all I want is a simple web site structure, how to do that?

View 2 Replies View Related

Get Selected Values From Multiple Selectable Listbox Using JS?

Oct 1, 2010

I have a multiple selectable listbox in which I can select maximum 5 data

I have 5 textboxes

Now I want to get the selected items texts from the listbox and populate those into the 5 textboxes when the user finishes selectiong from the listbox

How can it be possible in JavaScript

View 2 Replies View Related

Ajax :: Cannot Fetch Selectable Option By Get Method In IE 7

Aug 4, 2011

What I'm trying to do is fetching Selectable option from my "subcat.php" by get method. It works in Firefox 5.0 and Google Chrome but it doesn't work in IE 7. As far as I know onreadystatechange=function() seems to be not working in IE 7.

<?php
include('include/connect.php');
?>
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "[URL]">
<html xmlns="[URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Browse</title>
</head> .....

View 3 Replies View Related

JQuery :: Make One Of Text Fields Text Area

Mar 3, 2011

I've been following this tutorial (and it works great)URL...Just cannot figure out how to make one of the Text Fields a Text Area with cols="45" rows="5".Every combination I've tried turns off the validation. I've already added completely different text fields from what are shown in the tutorial so I know how to change up the javascript I just can't get the Text Area right.

View 3 Replies View Related

Make Browser Without Toolbars?

Mar 17, 2010

I am building a site for use on a local server and I want it so that when you launch the file it will it automatically remove the toolbars.

View 1 Replies View Related

Make A New Browser Tab To Blink (or) Get Focused ?

Jun 22, 2009

I have a requirement as explained below:

I click on a link...(say facebook) from the current window. It opens up in a new browser tab. Until here i got it working. Now when i get back to my previous window and click on the same link, then the tab already displaying the facebook site should either get focused or at least blink, so as to alert the user.

View 3 Replies View Related

Make Website Browser Independent?

Aug 31, 2010

Am designig a web site i want that sote to be appear same in all browser is their any script which makes my site look same in all browsers

View 3 Replies View Related

Make Semi-advanced Web Browser?

Feb 9, 2010

Can anyone tell how to make semi-advanced web browser?

View 1 Replies View Related

Make Expandable Text Toggle Text Icons Onclick In Place Of Images?

Nov 17, 2009

I am new to javascript, and am having an issue, which I'm sure is elementary.. I found a script for expandable content, it suffices fine. As it stands, the script toggles images onclick. For example, whence the menu is collapsed, it displays "plus.gif" next to it, and when the menu is expanded, it displays "minus.gif" next to it.

Basically, what I would like to know is, thus: how would I change it to display text icons next to it? For example, in place of "plus.gif" I should like it to display "+" as actual text. I've dredged a number of places, however, I've found nothing. Furthermore, I cannot figure out how to do it.

View 1 Replies View Related

JQuery :: Can't Read Text From A Textarea - From A Phone Browser

Oct 21, 2010

Ive created this simple test page with a textarea, a div, and a button. And then this code:

function copytext() {
var temp= $('#TextArea').text();
$('#emptydiv').append(temp);
}

Now in a normal browser (IE, firefox), when i type something in the field, and push the button, the text appends and shows - exactly as it should.

But on a phone (I´ve tried with Iphone and htc), nothing happens. It wont copy the text. I´m using jquery for alot of other stuff on the mobile page which works just fine.

View 2 Replies View Related

JQuery :: Make Text In DIV Scroll?

Jun 15, 2010

I have a div 500 px high with text in it. The text takes up more space the provided and I wanted the DIV or text to scroll up as the mouse neared the bottom of the div.

View 2 Replies View Related

JQuery :: How To Make Text Match Array

Jul 22, 2009

I have string and array:
text = "xxxxxxonexxxx"
array = ["one", "two"]
I need
if (text.match(array)) {...}
But it does not working. How can I check this?

View 1 Replies View Related

Jquery :: How To Make IFrame With Text Inside

Mar 9, 2010

I have code like:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"[URL]">
<html xmlns="[URL]" xml:lang="en" lang="en">
<head><title></title>
<script type="text/javascript" src="javascript/jquery-1.4.1.js"></script>
<script type="text/javascript" src="javascript/jquery.blockUI.js"></script>
</head><body>
<script language="JavaScript" type="text/javascript">

$(document).ready(function(){
$daemach.debug = true;
$('#loadContent').click(function(){
$.frameReady(function(){
$.blockUI();
$('<div></div>').addClass('box2').appendTo("body").load("ajaxcontent.cfm",$.unblockUI);
},"top.iFrame",
{ load: {type:"script",src:"javascript/jquery.blockUI.js",test: "$.blockUI.impl.install"} },
function(){$(':disabled').removeAttr("disabled");
});});

$('#blockit').click(function(){
$.frameReady(function(){$.blockUI(); },"top.iFrame");
});
$('#unblockit').click(function(){
$.frameReady(function(){$.unblockUI(); },"top.iFrame");
});
});
</script></body></html>

View 1 Replies View Related

Make Text Disappear In Text Input?

Dec 2, 2010

How can I create a text input field which has a value displayed by default and when a use clicks in the filed, it disappears? Similar to a "search..." box - when a use goes to search, the "search..." text disappears.

View 1 Replies View Related

Make A Text In 'text Area' Italics?

Dec 11, 2011

im new to javascript and im working in this function , i can't get it work :(here is my code

<SCRIPT LANGUAGE="JavaScript">
function text(form1) {
var j = document.form1.diary.value;
j = j.italics();
document.form1.diary.value = j ;

[Code]...

View 6 Replies View Related

JQuery :: Make The Text Stop Sliding To The Right On Hover?

Jun 30, 2009

how can i make the text stop sliding to the right on hover?

View 2 Replies View Related

JQuery :: Make Fields Already Preset With Random Text?

Jun 23, 2010

I have a site, im expecting a few hundred colleagues to sign up, they have the chioce to pick a user name and email adress of their choice, but to speed things up a bit I would like set preset usernames and emails in the fields so the user just has to press the enter button.

So for example, my 2 fields will be filled with something like Username: [mysitename]User[randomnumber] Email: [randomnumber]@mysite.com

where my site name is the actual name of the site, and the random number will be different on every visit.

View 1 Replies View Related

JQuery :: Hide Some Text And Make It Appear Whilst Hovering?

May 11, 2011

Ive got the following code which I have posted underneath, and what I am trying to do is hide the text which hasa span class "sp-text". When the userhovers over oneofthe images I want the text associated to that image to appear in the info-text div.

Sosearching through the web and coming across many examples, I thought the followingcode wouldhidebut it doesnt.

<
script type="text/javascript">
$(
function () {

[Code]....

View 16 Replies View Related

JQuery :: Programmatically Set A Text Field Value And Make It Where User Cannot Change It

Sep 15, 2010

I have a form that has multiple text fields but what I'm needing to do is when a dollar amount is added to text field 1 I need to set the opposite amt in text field 2 and then NOT allow the user to make any changes to text field 2 but making it unavailable for change.

Also here is my function:

$(function() {
$("#ARTransferForm\:fromAccountAmt").blur(function() {
var fromAccountAmount = $("#ARTransferForm\:fromAccountAmt").val();
alert("fromAccountAmount " + fromAccountAmount);

[Code]....

View 7 Replies View Related

Script For Menu - Make The Menu To Stay Even We Use The Scrollbar Of The Browser?

Mar 1, 2011

I want to create a menu like the left (as we see that) menu of getitnow.gr.Do you know any script for this?I use prototype framework,is there any script related with prototype? I mean a script that make the menu to stay even we use the scrollbar of the brownser.

View 1 Replies View Related

Loading Text File To Form In Browser?

Oct 1, 2010

Is it possible to get js to load a txt file in your browser (location would be file:///C:/Documents and Settings/article.txt), grab the first line and put it in a form field with id "postingTitleField"? I've been trying to figure this out but I don't see it. I tried to google it but the best I came up with is writing to a text document, and that's not what I am looking for.

View 4 Replies View Related

Modifying Text After The Page Is Displayed By A Browser

Aug 10, 2011

I'm using a Volusion shopping cart and it uses JavaScript to insert code into DIVs with specific IDs. The code that it inserts can't be changed from the backend, so I'm wondering if there is a way to replace it with JavaScript after it's rendered.

Here is my problem specifically: I'm trying to change the wording "Find by Type" to "Sort by Type", but I can't modify it since it's being added in later by JavaScript. The tag I have in my template file is:

Code:
<div id="search_refinement_filters"></div>
but when rendered, Volusion turns it into:

[Code]....

View 7 Replies View Related







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