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
ADVERTISEMENT
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
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
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
Mar 3, 2009
All Code Working fine in Firefox and Google Chrome, But in IE nothing happened Ajax Function IN MAIN PAGE
<script language="javascript">
var xmlHttp
function showBabyId(str)
{
xmlHttp=GetXmlHttpObject();
[Code]...
View 4 Replies
View Related
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
Feb 6, 2009
The Open Window in Javascript is not working properly in Firefox but is working in IE. What could the reason be?
[Code]...
View 1 Replies
View Related
May 10, 2010
I am working on a Javascript application and i am facing a strange behavior of the application in IE. I am creating a table at runtime using DHTML and registering event for the table row click. When i deploy this application on web server and browse the application, the events fires in firefox and chrome but in IE the events are not fired. If i browse the application from the server with localhost, the application triggers the events and fails when i use machine name.
The following is the source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
[Code]....
View 4 Replies
View Related
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
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
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
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
Oct 8, 2010
I want to remove link. How to do that using execCommand()
View 1 Replies
View Related
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
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
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
Nov 28, 2010
I have are created dynamically buttonset toggle radio button with following code. All is working okay but just I have added onclick function which is doing window.location which is working with FireFox but not working with IE and google chrome.
<script type="text/javascript">
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$(function () {
$('#btnSet').buttonstrip();
[Code]....
View 1 Replies
View Related
Aug 30, 2009
hereis the html file and javascripton click of this button a
[Code]...
View 1 Replies
View Related
May 14, 2010
I have a jQuery code to allow users to login using a lightbox [URL] and immediately start downloading files, without being redirected or having the page reloaded. It's perfectly working in Firefox but Internet Explorer keeps showing the login box until I reload the page
[Code]...
View 1 Replies
View Related
Nov 16, 2009
Suppose,closing the browser through Browser Close Button(Top Right Corner cross(x) button), i have to execute some ASP script , for that, in body onUnLoad Event calling a fucntion called CloseWin(e,frm), it is working in Internet Explorer successfully , But in FireFox not working. how to solve this problem. or any other way to get the co-ordinates of browser close button( code for both IE and Firefox).
code follows
function CloseWin(e,frm)
{
//frm required for my program
var bButtonClicked = false;
[Code]....
View 1 Replies
View Related
Jan 30, 2011
When the select menu is changed, the text in the textarea tag is changed. But after something is typed in the textarea tag, the select change functionallity no longer works under Firefox 3.6.13. Firebug shows it as being changed, and it still works with IE8.Am I doing something wrong? Is there a workaround?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
[code]....
View 2 Replies
View Related
Jul 20, 2010
I'm trying to do up a contact form that after a user submits the information, the drop down contact box will slide back up instead of redirecting to another page. The script works fine in Chrome and Safari, but Firefox and IE keeps redirecting to the php page.
Html form:
Code:
View 2 Replies
View Related
Apr 1, 2009
Inside of $(document).ready(function () I have:
var refre****= setInterval(function(){
$('#mydiv').load("mypage.htm");
}, 9000);
This is working great in IE, it loads mypage.htm into mydiv every 9 seconds. If I change the contents of mypage.htm I can see it in mydiv after 9 seconds with IE, but not with Firefox.
With Firefox I can see the reloading symbol on top of the tab every 9 seconds, but I don't see the page changed.
View 1 Replies
View Related
Apr 28, 2009
I have a numbered image gallery which has a next and previous link which is another way of navigating through the gallery the problem i have that in IE all is fine but doesnt seem to be working in firefox, i would appreciate afew pointers,here is the code
<script type="text/javascript">
var currentImage = 1;
function LoadGallery(picNum, captionText)
[code].....
View 2 Replies
View Related
Jan 28, 2010
After spending hours trying out many different examples that supposedly work with IE and FF, I've decided to post here :)
This is the code I'm using to catch the down arrow:
function is_int(event)
{
var Key = event.keyCode ? event.keyCode : event.which ? event.which :
[Code].....
And called using the following on the text input of a form field:
onKeyDown="is_int(event);"
This works in IE but still not in Firefox (3.5.7). Surprised as it has the .which in there - I thought this is what FF needed?
View 1 Replies
View Related
Jan 27, 2011
I have a function that checks to see the number entered in a textfield and then, if greater than 1, will change a radio button from Single to Multiple and visa versa. The function is called from the textfield with an onkeyup="function()". The problem I am having is that it works in IE just fine, but in Firefox it doesn't seem to be doing anything. I'm not getting any errors and can't seem to see what is the problem.
View 9 Replies
View Related