Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Jesdisciple

  • Rank
    Invested Member
  • Birthday 05/17/1989

Previous Fields

  • Languages

Contact Methods

  • AIM
  • MSN
  • Website URL
  • ICQ

Profile Information

  • Location
  • Interests
    apologetics & theology, programming, philosophy, bicycling, games
  1. I've never done it myself, but I've paid attention to others interested. You need to use a textarea for the HTML, to capture keyboard events. Then you lay an iframe over the textarea via CSS. When the user edits the textarea (which they don't know is there), you clean the HTML up and put it in the iframe. (Accessing the iframe's document involves a small but rather complicated technique, at least AFAIK.)
  2. Looks like it's not remotely cross-browser to me... http://www.google.com/search?hl=en&q=c...ditable+mozilla
  3. I did try it, although I haven't read it yet. (I'm probably not familiar enough with JQuery to make sense of it.) I did notice that the Link button replaces my selection with "undefined" rather than wrapping it.I can't seem to find the thread with either the forum's search or Google, but someone suggested recently that an XML document be used to keep track of a WYSIWYG's HTML. This would help abstract tasks like finding an italic element within an italic element (italic.getElementsByTagName('i')), finding adjacent italic elements and fusing them, and unwrapping an element.BTW, I hope you kn
  4. I'm a nitwit; I didn't keep the frame after looking its ID up, so I was making properties on a string. The simplest bugs are often the most formidable. (And a fresh look is often their only solution.) <html> <body> <iframe id="frame" src="about:blank"></iframe> <script type="text/javascript"> function loopFrame(frame, steps, delay){ if(typeof frame === 'string') frame = document.getElementById(frame); if(typeof delay !== 'number') delay = 10000; var i = 0; iterate(); function iterate() { if(i < steps.length){ if(type
  5. My bad... I just found my stupid mistake. Use the lone slash as your path and replace the last code box (for test1.html and test2.html) with this one: <html> <head> <title>Titled Document</title> <script type="text/javascript" src="Cookie.js"></script> <script type="text/javascript"> var cookie = new Cookie('back'); (function (){ // will execute immediately var limit = 10; var back = parseInt(cookie.get()); if(!isNaN(back)) if(back < limit){ cookie.set(back + 1); history.back(); }else cookie.erase(); })();
  6. The code I posted in the other thread is still broken, but I found a workaround. If you know the folder which the HTML pages are contained in, you can attach all cookies to that folder. It's not as easy as it would ideally be, but it works. In the code below, replace /to/HTML/ with your path. Do not include any domain; the beginning slash specifies the root directory and no domain is present in the path which is causing the problems.Cookie.js function Cookie(name, value, days){ this.name = name; if(typeof value !== 'undefined') this.set(value, days);}Cookie.prototype = { set: function (v
  7. That's a very weird bug. I wish I had tested while building that version, but it's too late now. Do you want to work on it with me?
  8. Ignore what I said about the else block; I was thinking of my intermediate structure. Notice that, while I named the iterate function (and it's a good thing because now I need to reference it twice), I'm passing this new function directly to setTimeout - just because I'm not sure what to name it. I'm also not assigning the return value to a variable because I don't need to clear the timeout.Also, if you keep refusing to try, that will make my purpose impossible and helping won't be worth my time. <html> <body> <iframe id="frame" src="about:blank"></iframe> <scri
  9. On the last call to iterate (in an else block), set a 16-second timeout for a function A. Inside A, change the iframe's URL and set a 19-second timeout for another function B. Inside B, change the iframe's URL.I want you to try again before I give any more effort. For me, the purpose of this thread is that you gradually learn to code on your own.
  10. That's the best answer in the absence of PHP, although I hope we don't run into this problem again. (And I would think this e-commerce website would have the shopping cart already set up server-side...)
  11. JS shouldn't be used if it's not needed. The target attribute is by far more widely recognized than JS. (Plus inline event handlers are poor practice.)
  • Create New...