Remove Link Using Execcommand()?

Oct 8, 2010

I want to remove link. How to do that using execCommand()

View 1 Replies


ADVERTISEMENT

Insert A Link Using ExecCommand That Prompts Users For A Title First?

Apr 7, 2009

I am having a problem with my wysiwyg editor for my site, users dont like the fact that you have to select text before you create a link and I was wondering if it was possible to prompt the user to add title text before you use the execCommand('createlink') and use that has the select text that they made from the prompt. Instead of the old way where you must select text first to use execCommand('createlink') to create a link. kind of like Sitepoint's insert link function but instead prompts the user for the title and doesn't insert bbcode but a anchor tag?

View 7 Replies View Related

IE ExecCommand Inserthtml Workaround - Insert A Youtube Video Into A Content Editable Div With Execcommand Inserthtml

Apr 3, 2011

im working with execCommand and trying to make a function to insert a youtube video into a content editable div with execcommand inserthtml. Now this works with every other browser except, OMG IE. now i am trying to use pasteHTML(), found that some people have gotten it to work, for its part but for some reason it is not working

[Code]....

View 3 Replies View Related

Remove Referer When Clicking Link?

Mar 18, 2005

I have a pages with list of sites and when I click on links to other domains, the other domains will see the referer where I clicked from. How can I avoid the referer when clickin on links on my page? (I don't want to click new IE browser and paste the url).

View 3 Replies View Related

Remove/add Link Class When Clicked?

Mar 8, 2007

I am on a tight deadline with none of my Javascript books around to reference ... Can anyone help me with this script:

View 13 Replies View Related

JQuery :: Add Remove Link After Drag And Drop?

Jan 10, 2011

I'm finally getting around to try the drag and drop functionality of jquery. I am working with the Shopping Cart example. Everything is working great but I would like to add a remove link to the dropped item so it can be deleted from the shopping cart.

Needless to say I haven't even gotten to the code to actually remove the link cause I can't even append the link...haha

This results in nothing: $('<a href="#">remove</a>').after(ui.item);

This results in duplicate entry of the dragged element with the bullet point: $('<a href="#">remove</a>').after.ui.item;

View 5 Replies View Related

JQuery :: Remove Link From List Element?

Jul 11, 2010

I would like to achieve the following... I have the following list:

<ul class="menu">
<li><a href="something.html">First main</a></li>
<li><a href="something.html">Second main</a>
<ul class="sub-menu">

[Code].....

Now, I'd like to remove the link from the "Second main" because it has a submenu. I know that I can get that exact item using $("ul.sub-menu").parent() but how do I unwrap the link in it?

View 2 Replies View Related

Remove Mouseover From All Link On Click Event

Jun 8, 2009

This is just a page swapping images on the mouseover event, but i want to remove the mouseover events from all links when the the on click function is triggered,

This is the html code:

Code:

This the javescript code, the swapping image is working fine, but not the removeMouseover function,

Code:

View 2 Replies View Related

Remove Form Element Via Href Link

Jul 21, 2010

The code below ADDS a new EMAIL field to the form via an href link. here modify the code to REMOVE an EMAIL field? or point me in the right direction?

[Code]..

View 1 Replies View Related

ExecCommand

Sep 28, 2006

Can I use execCommand to save just the contents of a textfield as a PHP file on a users computer? I've been searching for an hour and can't figure out how to do it.

View 2 Replies View Related

Onclick Change Class, Remove When Next Link Clicked?

Dec 3, 2007

I have a side menu that I have added an onclick statement to, which will change the css class for that item to "selected" so that I can apply styles for the selected link. Here is what I have:


HTML Code:
<style type="text/css">
<!--
.selected {[code]....

How can I modify this so, after one selection is clicked, and you click something else, the class gets removed from the first clicked item, and is now applied to the newly clicked item? I only want the class applied to the currently clicked item, and removed when they click on another item.

View 14 Replies View Related

ExecCommand And InsertUnorderedList

Feb 23, 2005

Is it possible to use the command:

document.execCommand("InsertUnorderedList")

to specify what type of unordered list, or to use css to specify, what type of unordered list you want?

View 2 Replies View Related

Use Of ExecCommand() Function?

Jul 18, 2011

Does anybody know what's the use of the execCommand() function?? Also, is it used to add tags in textboxes??

View 6 Replies View Related

How Can I Restrict ExecCommand('undo') To A <div>?

Jul 23, 2005

I am using IE 6.0. On a page, I have placed a contenteditable div
which I want to use as a Rich Text Area. I am using the execCommand method of
the document to control bold, italics, underlining, and undo for this div.

I have placed an input element on the page to. All but the undo, are
restricted to working only on the div. How can I restrict the undo to
working on only the div?

Below is the complete page so you can see what I am talking about.
Just paste it into an htm file and traverse to it via your browser.
Type something in the div and the input and then try the buttons. Code:

View 3 Replies View Related

Custom Tags With ExecCommand

Jul 20, 2005

Does anyone know of a way to wrap custom tags around selected text
using execCommand or otherwise?

I am developing a rich text editor for use in a web site and while
there are a few decent ones already floating around I need to
implement a few extra bits of functionality. Specifically tool tips.
Idealy I'd like to wrap custom tags around selected text using
execCommand. Ie "Selected Text" becomes:

"<a title='User inputed tooltip'>Selected Text</a>".

Any ideas?

View 1 Replies View Related

ExecCommand Not Working In IE, Fine In FF?

Jul 4, 2010

I'm (experimenting) writing my own RTE in JavaScript, I'm doing pretty good until it comes to the commands, the execCommand method. Here's what I have so far:

function get(editid) {
// IE
if(document.frames[editid].document) return document.frames[editid].document;
else return document.getElementById(editid).contentDocument;
}

[Code]....

The xC (execute command) function is not working! I've tried so much.

View 2 Replies View Related

Problems With ExecCommand On FontName

Aug 17, 2003

I am attempting to write a wysiwyg text editor to use in back-end site administration forms. It's working pretty well, aside from one error: when I hilight a large block of text and change the font, the change only applies to portions of the text selected (which appears to be random portions). Here is the javascript I'm using:

Code:function applyFont() { document.all.rtEditor.focus(); document.execCommand(fontname, false, document.all.fontNameSelector.value);}Where am I going wrong?

View 3 Replies View Related

When The User Clicks The Remove Link It Properly Adds A New Option To The Dropdown?

Mar 19, 2011

When the user clicks the remove link it properly adds a new option to the dropdown however it adds it 3 times meaning 3 option tags. Why is that?

Code:
// Add a click handler to each anchor tag in the characterList <ul> element
$('#characterList a').click( function(evt) {
evt.preventDefault();[code].....

View 1 Replies View Related

Changing Location.href - Push The Pdf Generator To A Slightly Different Url Which Would Remove The Offending Link

Apr 28, 2011

I'm using a service to remotely create a pdf - it creates a pdf of the page you're on. Unfortunately that includes the link as well. I'd like to push the pdf generator to a slightly different url which would remove the offending link. The link I have is:

[Code]....

but it is not fooled! It seems I need to edit location.href but I don't know how to do it!!

View 2 Replies View Related

JQuery :: HasClass / RemoveClass Bug - Set Add / Remove A Class Called 'active' To / From A Link That Is Clicked Within A DIV

Sep 12, 2011

I have a link as such:

[Code]...

In a nutshell, I need to set add/remove a class called 'active' to/from a link that is clicked within a DIV. So if the link has the class 'active' already assigned I need to remove it and vice versa however the issue I am having is that I have to double click the link in order for it to work!!

View 6 Replies View Related

ExecCommand - HTML Page With One Section Having Editable Content ?

Dec 21, 2010

I'm using an HTML page with one section having editable content. Nothing overly complicated. All other execCommands are working fine, but I cannot get Paste to work. The function is called from this button:

And, here's the Javascript function:

When I use the Copy or Cut buttons the selected text is loaded into the clipboard. If I press Ctrl+V to paste, it works fine. But clicking the Paste button either has no visible effect (if no text is selected) or just deletes any selected text. I've used the Paste command before from VB without any problem, but it's been awhile since I've used JS.

View 1 Replies View Related

Remove Mouseover Event From All Link On Click Event

Jun 9, 2009

This is just a page swapping images on the mouseover event, but i want to remove the mouseover events from all links when the the on click function is triggered, this is the html code,

View 3 Replies View Related

ExecCommand With "CreateLink" Not Working In Firefox But Ok In IE

Sep 10, 2009

I'm using this code I got from an example:

<head>
<TITLE>Creating a link</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function createLink()

[Code]....

It's working ok in IE, but in Firefox (3.5.3 I'm using), I get the following error:

Quote ... uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/america/editora/simple2.html :: createLink :: line 11" data: no]

Line 0 I have googled for this error but seems nobody is having problems with it? Any help much appreciated, I'm a rookie in javascript.

(line 11 is the CreateLink line)

View 3 Replies View Related

JQuery :: Remove() Doesn't Remove Html Tag And Text Inside

Dec 12, 2011

This time I have a trouble with remove(). Here is my code :

$.each(val.produitsIds,
function (j, val2) {
if($('#chk_' + i).prop("checked")){
//$('#' + val2).prepend("<div>liste des tailles</div>");
$('#' + val2).prepend("<div>" + $('#chk_' + i).attr("value") + "</div>");
}
[Code]...

View 2 Replies View Related

JQuery :: Remove A Specific Box When Click On The Remove Button In That Box?

May 12, 2009

I want to remove a specific box when i click on the remove button in that box. I have a lot of boxes on a page but when i click on the remove btn it removes all the boxes. I just want to remove the box where i click on the delete btn.

This is the js code:
$(".del").click(function() {
$('div.floating-box').remove();
});

[Code].....

View 3 Replies View Related

IE .execCommand("Copy") Not Working

Nov 26, 2010

For some reason this code to copy to the clipboard isn't working anymore in IE

$("#holdtext").innerText = '#' + $("#check").val() + '#';
Copied = document.getElementById('holdtext').createTextRange();
Copied.execCommand("Copy");

basically nothing is copied to the clipboard

View 4 Replies View Related







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