mercredi 31 décembre 2014

title bar in javascript pop-up window with div and css instead of table


I am replacing the showModalDialog function in several web applications. A javascript function was made using two overlays: one masks all content on the page, and the other shows pop-up content. Because some pages invoke showModalDialog two or three times, the javascript replacement manages multiple calls by doing new overlays over what is already there. It works well in Chrome, IE, and FF.


But I want the pop up content to be more in the form of a window with a title bar, because I like windowing. It is easy to thread popped-up content. Since underlying content is masked, nothing beneath can be acted upon, and only popped-up content can be acted upon. The javascript function has several parameters such as whether to mask underlying content, whether to use a border, etc. To fully replicate showModalDialog I want the function to return a value in addition to displaying content. I want the function to add a submit button, optionally, but instead of a cancel button I want a title bar with a big X or reverse-color square.


Finally to the question, how do I make a title bar with an X or square at one end, without using a table? We have screen readers and applications need to meet accessibility standards. Tables in a page are more difficult for people using screen readers and should be avoided when possible. The title bar will have the same border color passed to the function as an argument, or black default. Thanks





Aucun commentaire:

Enregistrer un commentaire