Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Page loading error method #363

Closed
toddparker opened this issue Nov 3, 2010 · 10 comments
Closed

Page loading error method #363

toddparker opened this issue Nov 3, 2010 · 10 comments

Comments

@toddparker
Copy link
Contributor

The same way the framework expose a pageLoading method, it would be great if it could make available a page loading error method. That way any error feedback that have to be made by the application could use the framework.

Based on the code already existing, this wouldonly mean some minor changes changes :
New method :

function popErrorMessage(errorMessage){
jQuery("

" + errorMessage + "

")
.css({ "display": "block", "opacity": 0.96, "top": $(window).scrollTop() + 100 })
.appendTo( $pageContainer )
.delay( 800 )
.fadeOut( 400, function(){
$(this).remove();
});
}

This function could be used by jquery mobile in ajax page insertion :

error: function() {
pageLoading( true );
removeActiveLinkClass();
popErrorMessage("Error Loading Page");
}

And made available to all :
jQuery.extend({
pageLoading: pageLoading,
changePage: changePage,
hideBrowserChrome: hideBrowserChrome
popErrorMessage: popErrorMessage
});
This is only a small change and would be very usefull I think.

@stefanschweizer
Copy link

I would like to vote on this, too

@toddparker
Copy link
Contributor Author

I think this is a good idea too. I've bumped this up on our priorities to high.

@martinkou
Copy link

I've issued a pull request for this in #1122.

@D1plo1d
Copy link

D1plo1d commented Feb 25, 2011

+1 - this is exactly what i need!

@martinkou
Copy link

#1122 was rejected coz it was kind of hacky. I'll be writing a Growl-like widget for this the coming weekend and make another pull request shortly.

@martinkou
Copy link

I've issued a new pull request in #1158.

@scottjehl
Copy link

Added pageLoadErrorMessage option. Defaults to "Error Loading Page". Documentation included. Closed by 4a45d8d and Closed by 4a45d8d

@swrobel
Copy link

swrobel commented Apr 6, 2011

This "fix" doesn't really close this out. It allows you to customize the error message, but not display our own arbitrary notifications when our apps need to.

@toddparker
Copy link
Contributor Author

That would be a new feature. Please add here:
https://github.com/jquery/jquery-mobile/wiki/Feature-Requests

brandonwoo pushed a commit that referenced this issue Apr 18, 2011
@apdarshan
Copy link

thank u folks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants