views:

58

answers:

1
+2  Q: 

Alert Box Methods

I just need a little advice on what may be the best method for handling my situation.

I'm in need of placing three buttons in the sidebar of the website I maintain. The website is massive and hard to handle. Currently, it's all HTML files (there are over 10,000 of them believe it or not). We're transitioning to a database website so I don't want to make any sweeping changes that are site-wide, as they may just be scrapped in our re-design process in coming months.

However, these buttons are for an application process. When you click on them, an alert box will need to pop up to give you a bit of information and they either allow you to cancel the action or proceed. The buttons are currently located in the left nav which is included on every page of the website.

Would it be possible to accomplish this using JS or jQuery? I'd be unable to easily add scripts into the tags on all of the applicable pages, but I'd like to avoid the browser driven "http://www...Says: blah blah" message if possible. Any insight is greatly appreciated! Thank you!

+2  A: 

Check out the jQueryUI dialog examples, particularly the modal boxes, although you will have to add the script to every page.

Andy E
Use an editor with global search'n'replace to spread the code on every page. For example, search for `</head>` to add javascript to a page.
Aaron Digulla