Thanks. But how i can set the code that you gived my to one button, not 2 buttons:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<form action="">
Enter Your Email: <input type='text' id='emailid'/>
<input type='submit' onClick="this.value = 'please wait...'; emailValidator()" value='Submit' />
</form>
<p>Text <b id='boldStuff'>change</b> </p>
<script type='text/javascript'>
function changeText(){
document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';
}d
function myFunction()
{
document.getElementById('changer').value = "please wait...";
setTimeout(function(){document.getElementById('changer').value = "The label";},3000);
window.setInterval("someFunction()", 5000);
}
function emailValidator(){
var emailvalid = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if(document.getElementById('emailid').value.match(emailvalid))
{
alert("Email Validation: Successful.");
return true;
}else{
alert('This is Not a Valid Email');
element.focus();
return false;
}
}
</script>
</body>
</html>
I have added the javascript that you gived my to one line.
You can see the text "Text Change". So if i click on "Submit" then the text button change to "Please wait..." After 3 seconds, it change the text down to "text Changed" (example) and the text that still stands on the button should change back to submit.
Thats all what i needed.
Code for change the text down:
Code:
<script type="text/javascript">
function changeText(){
document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';
}d
</script>
<p>Welcome to the site <b id='boldStuff'>dude</b> </p>
<input type='button' onclick='changeText()' value='Change Text'/>
The code that you gived my:
Code:
function myFunction()
{
document.getElementById('changer').value = "please wait...";
setTimeout(function(){document.getElementById('changer').value = "We cannot lanch the file, please see the file.";},3000);
window.setInterval("someFunction()", 5000);
}
I place this all to one javascript but i not work.