View Single Post
Old 01-02-2013, 03:03 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,383
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
1. When talking IE it is best to give ver number as they all work differently. I check the below code in IE8 and it works for me.
2. We are in the dark and have to guess if code is not supplied.
3. java servlets is for a different language, java not javascript.

What I check:
Code:
<!DOCTYPE html>
<html>
<body>
<p>Click the button to display a confirm box.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction()
{
var x;
var r=confirm("Press a button!");
if (r==true)
  {
  x="You pressed OK!";
  }
else
  {
  x="You pressed Cancel!";
  }
document.getElementById("demo").innerHTML=x;
}
</script>
</body>
</html>
4. Such things as confirm boxes, prompt boxes, and alert boxes are not used much in programming anymore except for testing purposes.
sunfighter is offline   Reply With Quote