Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 15th, 2005, 05:00 PM
Techno-Freak Techno-Freak is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 28 Techno-Freak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 5 m 43 sec
Reputation Power: 0
Exclamation WYSIWYG editor file opening (only try and answer if you know about the fso in js)

hi, I'm building a WYSIWYG editor with an iFrame, the file open feature wont work though, here is my code (and the richify and scriptify functions just switch modes)
Code:
var fso = new ActiveXObject("Scripting.FileSystemObject")
function readFile(file)
{
     var fileObj = fso.OpenTextFile(file, 1)
     var fileText = fileObj.ReadAll()
     if (type == "w")
     {
          iFrame.document.close()
          while (!fileObj.AtEndOfStream)
          {
               document.iFrame.document.write(fileObj.ReadLine())  
          }
          scriptify(); richify();
     }
     if (type == "s")
     {
          richify();
          readFile(file);
          scriptify();
     }
     fileObj.close();
}

when you call the richify function, the type turns to "w" and the mode goes into WYSIWYG editing mode, scriptify changes type to "s" and changes the mode to HTML edit, there's nothing wrong with the richify and scriptify functions because i see them working well when i do this function, what goes wrong with the function??

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > WYSIWYG editor file opening (only try and answer if you know about the fso in js)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT