PDA

View Full Version : Need Help Modifying Stylized Confirm Box



Jim Weinberg
05-12-2016, 03:23 PM
Some time ago I came across some really nice javascript/css code for a stylized Confirm box. I honestly don't recall where. I've used it a lot and it's really nice. It replaces the standard javascript Confirm box and allows for the specification of a title, body text, and handler to process the results.

Currently, the button labels are defined in the javascript routine. I'd like to modify it so I can pass the labels to the routine. Unfortunately, it's pretty tricky code. I don't mean that in a negative sense, it's just beyond my ability to deal with.

I'm hoping that one of the senior coders can help me out with this.

The javascript and css is a bit extensive, so I'm attaching the files.

5900 5899

This is what I use for testing:


<head>
<link type="text/css" rel="stylesheet" href="screen.css" media="screen,projection,tv">

<script>
function doit(){confirm("title","text",handler)}

function handler(results){
alert(results);
}
</script>
</head>
<body>
<button type="button" onclick="doit()">test</button>
<script type="text/javascript" src="eConfirm.js"></script>
</body>


I'd appreciate any help you can give.

Thanks.

styxlawyer
05-12-2016, 04:42 PM
Try this:

5901

Jim Weinberg
05-12-2016, 05:28 PM
styxlawyer.

I bow to your capabilities. That is exactly what I need. Many thanks.

Jim

styxlawyer
05-12-2016, 05:57 PM
You're welcome.