C
Christiaan
I am trying to create a small javascript to change the button text and
then submit it and do all kinds of form validations.
So I have a button with the value "Save", when the button is clicked
it should change into "Are you sure" and when you then click the
button the form must be submitted. I know this is possible using a
simple dialog box but I want to this it this way. This is what I
already have, if you have any suggestions please reply..
<head>
<script language="javascript">
<!--
function confirmButton(){
if (document.frm1.button1.value = "Save"){
document.frm1.button1.value = "Are you Sure"
}
else if (document.frm1.button1.value = "Are you sure"){
document.frm1.button1.value = "Save")
}
//-->
</script>
</head>
<body>
<form name=frm1 action="blabla.asp">
<input type=hidden>
<input type="submit" value="Save">
</form>
<body>
then submit it and do all kinds of form validations.
So I have a button with the value "Save", when the button is clicked
it should change into "Are you sure" and when you then click the
button the form must be submitted. I know this is possible using a
simple dialog box but I want to this it this way. This is what I
already have, if you have any suggestions please reply..
<head>
<script language="javascript">
<!--
function confirmButton(){
if (document.frm1.button1.value = "Save"){
document.frm1.button1.value = "Are you Sure"
}
else if (document.frm1.button1.value = "Are you sure"){
document.frm1.button1.value = "Save")
}
//-->
</script>
</head>
<body>
<form name=frm1 action="blabla.asp">
<input type=hidden>
<input type="submit" value="Save">
</form>
<body>