Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Iron Speed
 
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:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old June 17th, 2002, 04:48 AM
tim tim is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 62 tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 9 sec
Reputation Power: 6
Send a message via ICQ to tim
Can't get html editor to work properly

I am having some rather strange problems with the WYSIWYG editor. What I did was, split the stylesheet information to a separate file, link it in (e.g. link rel....) and split the rest of the javascript code to another file to be called in...

And in my php code, I 'required' the file with only the tables and the select boxes,........ altogether, 3 major components being called in. Everything works fine except when i try to change some text's heading, there was a javascript error saying selFont is undefined. However, the text managed to change without problems. (?).........and when i try toggling to html source code, the same error occurs. The worst part is, I can't toggle back to normal WYSIWYG mode! Everytime i try doing that, my actions added some ;gt, amp; lt; tags to the original content.

I have been figuring this over the past 2 days. Please help...thank you

Reply With Quote
  #2  
Old June 17th, 2002, 02:44 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 6
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
Exclamation

What editor are you using?

Reply With Quote
  #3  
Old June 17th, 2002, 06:03 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Hey Tim,
If you're referring to our WYSIWYG tutorial, then it wasn't built to handle CSS/PHP. It was just to show the basics of browser-based WYSIWYG editing. There is alot of manipulation that needs to go on for this to happen. For a demo, see www.webedpro.com. They do it extremely well and might be able to give you some ideas.

Reply With Quote
  #4  
Old June 17th, 2002, 06:04 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
First of all, make sure u have IE 5.5 or above, double check it, you never know? apart from that, try the article without spliting it into multiple pages, if that works, bit by bit, remove the ccs and javascript into your other files, if that causes the problems, then you have copied it wrong or something

Reply With Quote
  #5  
Old June 17th, 2002, 09:19 PM
tim tim is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 62 tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 9 sec
Reputation Power: 6
Send a message via ICQ to tim
*stress out*...NOpe Ben, doesn't work even after i carefully copied them ALL in one page!And I mean really 'carefully'. Am using IE 6. Coding in VI, for your info. Another thing is, whenever i access the page that holds this editor, IE always asks me this:

This page contains both secure and nonsecure items....do you want to display the nonsecure items?

Any ideas? IF i click yes, everything would be fine, otherwise, the word 'Navigation Canceled' would be in my iFrame box.

I even desperately tried changing my .php file(the one that holds this editor) to html thinking it might help but to no avail....One last thing........It all just doesn't makes sense. Other editing functions are working BUT except for toggling and heading insertion...Sigh, wonder why?

Reply With Quote
  #6  
Old June 17th, 2002, 11:15 PM
tim tim is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 62 tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 9 sec
Reputation Power: 6
Send a message via ICQ to tim
Anyway, for the toggling and heading insertion problem, i have commented them out currently as a temporary solution until you guys can help me out....

As for the 'grabbing the html code out of iFrame' to be saved into Database, i have tried that and it worked successfully.

BUT, how do i pump it back out to iFrame? I tried something like assigning the php variable to the innerText property but it doesn't work. Hope you can show me how to pump this back out because i need it for editing function

thank you

Reply With Quote
  #7  
Old June 18th, 2002, 07:54 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
ok, dont worry about those other 2 fucntions for the moment, im guessing by that last post you want to be able 2 edit something from a database

what you need to do is this

in the iframe tag add this line

src="edit.php?id=<?php echo $id; ?>"

the create a edit.php which takes the id or whatever you want and graps that data from the database, and displays it just like a normal page, the only thing is you can edit that data now to your needs

Reply With Quote
  #8  
Old July 1st, 2002, 02:39 PM
fcmaster fcmaster is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 1 fcmaster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi tim, how did you send the HTML to your database? I'm having problems sending the iView contents to another JSP, attempting to send it to an MSSQL database.

Any help would be great, thanks!

Reply With Quote
  #9  
Old July 1st, 2002, 09:33 PM
tim tim is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 62 tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 9 sec
Reputation Power: 6
Send a message via ICQ to tim
Sending it to the database for adding or editing?..... If editing, the following......

what i did was sending in an id to the src attribute of the iFrame tag.
<iframe..................src="buffer.php?ID=<?=$nID?>">

In buffer.php(or whatever name you wish to choose) there will be some sql statement in it to pull out all the information to be displayed in the iFrame box.

Both adding and editing uses the GrabHTML function shown by Mytch in one of his article.In the Javascript function, you grabbed the contents and assigned it a hidden value tag. THis is the name/value pair to be sent across for processing.

By the way, is your toggling function working correctly?

Reply With Quote
  #10  
Old July 2nd, 2002, 07:08 AM
dgibson dgibson is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Urbana, MD, USA
Posts: 66 dgibson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Getting the value back in the IFRAME was tricky for me, but here's what I came up with. None of that SRC stuff worked, because I'm not writing out a static file. Since you're pulling from a DB, assign the dynamic value you pull down to the INPUT type-hidden variable (see other comments above, I use Cold Fusion, not PHP, so I'm no help there), then use the following line (altered to work with your naming, etc) to pull the value of that hidden form field into your IFRAME at the end of the init() funciton:

setTimeout('WYSIWYGpane.document.body.innerHTML=do cument.formname.hiddenfield.value;', 0);

I don't know why this works. I thought there was some delay in loading the IFRAME body, so I used a setTimeOut with a higher number, and it worked. Then I kept lowering it to zero and it still worked... go figure.

Reply With Quote
  #11  
Old July 2nd, 2002, 08:54 PM
tim tim is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 62 tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 9 sec
Reputation Power: 6
Send a message via ICQ to tim
Doug, is your toggling function working correctly? (please view my previous posts)

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Can't get html editor to work properly


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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

Iron Speed




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