Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2004, 06:08 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default Complex execCommand() problem

I am working on a project that acts like a text/WYSIWYG editor. So far everything is great except for one thing (some of the buttons don't work on the toolbar through the above link, they're for future stuff)....

My project makes excessive use of execCommand(), a very useful IE-only method that dynamically changes formatting options. The page that I use this on is a frames page. The top frame is a menu that has nothing to do with my problem. The bottom frame contains another frameset. Top frame = toolbar, bottom = editable area (as you can see through the link above).

When I select some text and press a button on the toolbar (i.e. bold) it works absolutely perfect. Same with font, color, size, etc. But when no text is selected, the method is called, but nothing changes. No bold, no font, no nothing. I think this has something to do with how the focus leaves the bottom frame (editable) when the top frame is clicked. For some reason, when something is selected, it retains its focus long enough for the method to be called.

Why on earth is this happening, and is there a way to fix it? Is there some kind of function that allows multiple focus points? Somehow other similar editors get around this, but I can't sift through their jumbled code to any benefit.

Please do not tell me frames are outdated. I know. Frames provided me with a quick way to do exactly as I wanted.

Thanks in advanced.

Snib

<><
__________________
-Snib - http://www.snibworks.com
Where will you be in 100 years?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unsolved Complex C Structure Marshall Problem [email protected] C# 0 November 11th, 2005 06:43 AM
Complex Set problem pankaj_daga SQL Language 0 November 12th, 2003 08:47 AM
complex alternate row coloring problem. enT XSLT 1 October 18th, 2003 03:11 AM
COMPLEX QUERY PROBLEM nikosdra SQL Server ASP 15 August 4th, 2003 06:17 PM
COMPLEX QUERY PROBLEM nikosdra Classic ASP Databases 2 July 28th, 2003 02:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.