homepage Welcome to WebmasterWorld Guest from 54.227.182.191
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
A little help with javacsript class code.
nelsonm




msg:4461780
 8:38 pm on Jun 5, 2012 (gmt 0)

hi all,

I had a developer write a javascript component made up of a set of classes to create and manage a work order dispatch board (work order calendar). Unfortunately, the developer is no longer available (after being paid) and i'm having some trouble modifying his classes.

The problem is getting the dispatch board to refresh from the work order entry dialog. The class that contains the refresh methods is in one script and the work order entry dialog is in another.


The dispatch board class...

$.declare('window.dispatchBoard',{ 
.
.
constructor: function (arg) {
.
.
}
.
.
refresh: function() {]
.
.
}
.
.
});


I thought i could create a new instance of the class object this way...

dispatch = new window.dispatchBoard();


and call it from the work order entry dialog submit success function...

$('#workorder-window').dialog({ 
.
.
buttons: {
'submit' function() {
.
.
$.ajax({
.
.
success: function(status) {
dispatch.refresh();
}
});
}
.
.
});



But i'm getting the error "window.dispatchBoard is not a constructor" on the "dispatch = new window.dispatchBoard();" line.

What am i doing wrong?

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved