0 Favourites

CallJS.ReadExecutionReturn produces an log error

  • Hi all, I am doing a project in which I use pure JS, and execute this by using the CallJS plugin. This went okay for one event sheet, but on the other I always get an error in my console log

    [quote:1374n9ny]CHROME: Uncaught TypeError: Cannot call method 'toString' of undefined

    FIREFOX: TypeError: x is undefined

    I have an export on improvive.net/export_quincy

    In the first text field enter the following string:

    33d-j8ZpFFDdr+QQ4RUWxA

    The following is the code that produces the return value:

    var returnstring;
    function retrieveStorylist(){
    input = prompt('Voer hier het unieke gebruikersnummer in');
    $.ajax({
        type:    'GET',
        url:     'http://ihj.improvive.net/view/'+input+'/',
        success: function() {
    	   setting = window.open('http://ihj.improvive.net/view/'+input+'/');
    	   setTimeout(function(){setting.close()}, 1000);
    	  	  $.ajax({
    			type:	'GET',
    			url:	'http://ihj.improvive.net/view/'+input+'/list',
    			xhrFields: {
    				withCredentials: true
    				},
    			success: function(text){
    				if (text === ''){
    					alert('Er is iets fout gegaan .... Meldt dit bij Improvive (Roel, Quincy of Tariq).');
    					exit();
    				}
    				else {
    					/*text = JSON.parse(text);*/
    					numlist = text.length;
    					var inb = {
    						'c2array': true,
    						'size': [text.length, 3, 1],
    						'data': text.map(function(frame){
    							return [
    								[frame.id],
    								[frame.title],
    								[frame.shared]
    							];
    						})
    					};
    				returnstring = JSON.stringify(inb, null, 4);
    						   };
    									},
    								error: function(){
    									alert("Er is iets fout gegaan, controlleer het nummer en probeer het opnieuw");
    									}
    								});
    					}
    	   }
    )
    return returnstring;[/code:1374n9ny]
    
    What goes wrong? :c
    
    (I chose not to include an capx because the event sheet is basically
    ON LAYOUT START: 
    CallJS.Execute("retrieveStorylist()");
    returnvalue = CallJS.ReadExecutionReturn
  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
157 24,862
NetOne's avatar
NetOne
Unread hot topic
0 Favourites
Keep me logged in.
66 5,730
grigrizljac's avatar
grigrizljac
Unread hot topic
0 Favourites
Quasar Dev-Log
44 4,596
igalencar's avatar
igalencar