Forum closed. New forum available at http://community.wymeditor.org/

WYM_INIT_DIALOG not defined

Support forum for WYMeditor.

WYM_INIT_DIALOG not defined

Postby ckoehler on Mon Jun 11, 2007 11:58 pm

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
ckoehler
 
Posts: 13
Joined: Thu Jun 07, 2007 1:40 am

Postby jfh on Tue Jun 12, 2007 9:36 am

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.
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby ckoehler on Tue Jun 12, 2007 12:36 pm

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
ckoehler
 
Posts: 13
Joined: Thu Jun 07, 2007 1:40 am

Postby jfh on Tue Jun 12, 2007 12:50 pm

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?
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby ckoehler on Tue Jun 12, 2007 1:07 pm

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
ckoehler
 
Posts: 13
Joined: Thu Jun 07, 2007 1:40 am

Postby jfh on Tue Jun 12, 2007 3:21 pm

Is /Users/christoph/Sites/wec/fileadmin/wymeditor/jquery.wymeditor.js accessible to your browser?
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby ckoehler on Tue Jun 12, 2007 3:34 pm

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!!
ckoehler
 
Posts: 13
Joined: Thu Jun 07, 2007 1:40 am

Postby jfh on Tue Jun 12, 2007 3:43 pm

Glad to hear it :)

Happy to help,
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest