Results 1 to 3 of 3
  1.    #1  
    If I want to find an image inside my app's package, how would I do that? What's the URL?
  2.    #2  
    What am i doing wrong? It won't do anything. This code is run when a button is pressed but nothing ever seems to happen. "handleContent" is never called and the failure method doesn't run either. (NOTE: showDialogBox simply calls this.controller.showAlertDialog)

    Code:
    var url = "file:///var/usr/palm/applications/com.mystuff.hello/images/test.jpg";
        
        new Ajax.Request(
        	    url,
        	    {
        	    	    method: 'get',
        	    	    onComplete: {},
        	    	    onSuccess: function(transport)
        	    	    {
        	    	    	    this.handleContent( transport.transport.responseText );
        	    	    },
        	    	    onFailure: function(failure)
        	    	    {
        	    	    	    this.showDialogBox( "failed", failure );
        	    	    }
        	    }
        );
  3.    #3  
    I figured out the issue. it's the "this" object and the context. Instead I added this line before the Ajax call:

    var thisObject = this;

    and then changed the lines inside the Ajax call to use "thisObject" instead of "this".

Posting Permissions