Page 1 of 1

WYM_INIT_DIALOG not defined

PostPosted: Mon Jun 11, 2007 11:58 pm
by ckoehler
Hello,

Everytime I open a link or image popup window, I get the following JS error in Firebug:

Code: Select all
WYM_INIT_DIALOG is not defined
onload(load )


Any idea what might cause that?

Thanks!

EDIT: Just wondering, before the website said jquery 1.1.3 is required and provided a download link. I am still running 1.1.2 and can't find the link now. Just making sure that's not causing these problems.

Christoph

PostPosted: Tue Jun 12, 2007 9:36 am
by jfh
WYMeditor absolutely needs jQuery 1.1.3+ to work. It won't work correctly with 1.1.2.

jQuery 1.1.3a is available at http://code.jquery.com/jquery-1.1.3a.js

Please also check in Firebug -> Script that jquery.wymeditor.js is loaded in the popup.

PostPosted: Tue Jun 12, 2007 12:36 pm
by ckoehler
Thanks for the link! That didn't fix the problem, but you are right, the popup doesn't have any js files included. Is that something I did?

Christoph

PostPosted: Tue Jun 12, 2007 12:50 pm
by jfh
Perhaps. Quoted from the doc:
WYMeditor automagically detects the paths of required CSS and JS files.
You'll need to initialize basePath, cssPath and jQueryPath if you don't use default file names (i.e. jquery.wymeditor.js, wymeditor/skins/{skin name}/screen.css, jquery.js).

What's the SRC of jquery.wymeditor.js in your page?

PostPosted: Tue Jun 12, 2007 1:07 pm
by ckoehler
I didn't have those set, but now I do and no difference:
Code: Select all
$(".wymeditor").wymeditor({
               html: $("#userresume").html(),
               basePath: "/Users/christoph/Sites/wec/fileadmin/wymeditor/",
               cssPath: "/Users/christoph/Sites/wec/fileadmin/wymeditor/skins/default/screen.css",
               jQueryPath: "/Users/christoph/Sites/wec/fileadmin/jquery.js",
               
               postInit: function(wym) {
                 $j("#submit").click( function() {
                  
                   wym.update(); //clean up the HTML and update the textarea value

                  var text = $("#text").val();
                  var html = $.ajax({
                     data: "cmd=setresumetext&text="+text,
                     success: function(msg) {
                        $("#userresume").html(text);
                        $("div#editform").slideUp(500);
                        $("#editlink a").text("Edit Resume");   
                     },
                  });

                   return false; //disable the default behaviour
                 });

               }
            });


Thanks for your support btw, it makes all the difference!

Christoph

PostPosted: Tue Jun 12, 2007 3:21 pm
by jfh
Is /Users/christoph/Sites/wec/fileadmin/wymeditor/jquery.wymeditor.js accessible to your browser?

PostPosted: Tue Jun 12, 2007 3:34 pm
by ckoehler
Of course not ;)
I thought relative path meant relative to the base directory, which would be a subdirectory, and not relative to the server itself. All working now, thanks!!

PostPosted: Tue Jun 12, 2007 3:43 pm
by jfh
Glad to hear it :)

Happy to help,