SEO | Link Popularity | Search Engine Consulting | SEO Tutorial | SEO Tools | SEO Forum
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-20-2006, 10:34 AM
banaax banaax is offline
SEO Junior and a half
 
Join Date: Oct 2005
Posts: 42 banaax is on a distinguished road
Javascript within an editable iframe

I'm trying to make an advanced text editor on the web, I think my best option is an iframe (a text area like this forum uses isn't sufficient since you can't decorate text within the textarea). I'm working with something very simililar to the editor on http://devedge-temp.mozilla.org/vie...1/index_en.html.

My problem (also a problem on site above), when you type something in IE and click outside of what you typed (like the middle of the iframe), the cursor goes to the end of the text, exactly what I want, this doesn't happen in mozilla, you have to click next to the text to get the cursor to move to the end of the text. One solution I was thinking about is adding an onclick event to the area of the iframe that moves the cursor to the end of the text, but since the iframe is not an html element (something like that) you can't add javascript functions, and since the iframe is in designMode any javascript I add in the iframe source doesn't work that (does when designMode is off). Any help is apprechiated.
Reply With Quote
  #2  
Old 09-20-2006, 08:39 PM
banaax banaax is offline
SEO Junior and a half
 
Join Date: Oct 2005
Posts: 42 banaax is on a distinguished road
Okay I figured out my click problem, the solution was to add a textarea inside the iframe with height and width of 100%, I still need to use javascript within the iframe though. One thing I want to to do is syncronize the iframe scroll with a div outside of the iframe.
Reply With Quote
  #3  
Old 09-22-2006, 02:58 PM
banaax banaax is offline
SEO Junior and a half
 
Join Date: Oct 2005
Posts: 42 banaax is on a distinguished road
nevermind solved that problem too
Reply With Quote
  #4  
Old 09-22-2006, 10:05 PM
Paz's Avatar
Paz Paz is offline
SEO GUY Moderator
 
Join Date: Sep 2004
Location: Antalya, Turkey
Posts: 4,112 Paz has a spectacular aura aboutPaz has a spectacular aura about
LOL... sorry banaax, I gave up on all but the most basic javascript a long time ago!

Glad you sorted it out!
__________________
10.3 million entries for Hotels in Turkey but I'm still chipping away.
Reply With Quote
  #5  
Old 09-24-2006, 02:39 PM
BSolveIT's Avatar
BSolveIT BSolveIT is offline
SEO
 
Join Date: May 2005
Location: England, UK
Posts: 621 BSolveIT has a spectacular aura aboutBSolveIT has a spectacular aura about
Send a message via MSN to BSolveIT
banaax - sorry, I have to ask as it seems like you want to reinvent the wheel. Are you just trying to create some kind of inline editor? If so, why don't you just use one of the many that are around that you could download? Some are better than others, to be sure, so I guess it depends on your needs. Ultimately, what are you trying to achieve?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Login/Register
User Name
Password
Remember Me?

Forum Links
Forum Home
SEO Forum
Internet Marketing Forum
Web Design Forum
Web Hosting Forum
Programming Forum
SEO Chat

Quick Links
Forum Home
New Posts
Mark Forums Read
Open Buddy List
User Control Panel
Edit Avatar
Edit Profile
Edit Options
Miscellaneous
Subscribed Threads
My Profile

Search Forums

Advanced Search
All times are GMT -8. The time now is 06:44 PM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.