Solved

jQuery "loading" modal onclick of href

Posted on 2010-09-08
1
829 Views
Last Modified: 2012-05-10
Hi experts,

I have a HTML/Javascript/CSS mobile webapp that has a link (a href) to an external website. I would like to have a nice ajax-style "loading" modal screen popup when the user clicks the button which remains in place until the external website is loaded. If the website is unavailable, the modal screen should display a friendly error. This is so that if the user's phone connection is slow or unavailable, they are notified.

Any ideas where I could get hold of some sample code for this in jQuery/Javascript?

Thanks

Jon
0
Comment
Question by:Jon Winterburn
1 Comment
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 33625662
you can use the jquery modal dialog box
http://jqueryui.com/demos/dialog/

this can be opened at the click event of an anchor tag also
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now