SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Feb 2003
    Location
    Las Vegas
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fValidate and htmlArea conflicting with one another?

    I've been using the excellent fValidate library to validate my forms and I just came across and intersting problem. I have cause to use htmlArea on one of my forms that uses fValidate. It seems that there is some conflict when both htmlArea and fValidate are working on the same page/form.

    I can use one or the other independantly, and each will function without flaw, however when I try to set them up to both act on one of my forms, I get the following:

    When I have both htmlArea and fValidate on the same page I seem to get 3 popup errors for each htmlArea dropdown items (in this case, the font and font size selectors):

    First box:
    ------------------------------
    ERROR [createSelect]:
    Can't find the requested dropdown definition

    OK
    ------------------------------

    Second Box:
    ------------------------------
    FIXME: Unknown toolbar item:
    function(b, e) {
    var a = new Array();
    var count =0;
    for (var i = b; i < this.length - e; i++) {
    a[count++] = this;
    }
    }

    OK
    ------------------------------

    Third Box:
    ------------------------------
    FIXME: Unknown toolbar item:
    function() {
    var a = new Array();
    for (var i=0; i < this.length; i++) {
    a.push("" + this + "");
    }
    return a.toString();
    }

    OK
    ------------------------------

    After pressing OK on each of those boxes, the page renders normally and the htmlArea textarea doesn't seem to be affected in any way.

    Does anybody have any experience using both of these great tools on one form? I'm quite the novice when dealing with javascript, so any help is appreciated! Thanks

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Elwood,

    Indeed, fValidate is extremely well done. beetle, the author, is a mentor here at SPF. I'm sure he'll be around soon.


  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Elwood. Which version of fValidate are you using?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  4. #4
    SitePoint Member
    Join Date
    Feb 2003
    Location
    Las Vegas
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi There!

    Using version 5.00b.

    I can't tell you how much I love your work, by the way. It's a godsend. Thank you for any help you can lend.

  5. #5
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Elwood. I've thought about this a bit and I'm not really sure what the problem is offhand. All those errors you show are coming from the htmlArea script.

    Check my namespace page to make sure there are no namespace conflicts with htmlArea.

    Let me know if you find anything.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  6. #6
    SitePoint Member
    Join Date
    Feb 2003
    Location
    Las Vegas
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, all the errors are from htmlarea. I've now tried both the version 3 beta and the stable version 2.03 - both come up with errors.

    I did narrow it down to the fValidate.core.js file - it is the 2nd file I include after the fValidate.config.js. Removing fValidate.core.js and leaving fValidate.config.js results in no errors popping up.

    I have posted a message to the htmlarea support forums, but haven't gotten any responses yet, and being extremely green with javascript, I'm unable to try and diagnose this myself :/

    Will post again if I find out what's going on, thanks again!

  7. #7
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you check into the namespace issue? I really can't think of what the problem is. fValidate does nothing onload and there are only four global variables.

    Can you link me to a page online that shows this?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •