To Play a sound-file inside HTML
<script>
function playOkay(){
$("body").append("<embed src='sliit_std_mng_sounds/all_okay.mp3' autostart='true' loop='false' width='2' height='0'></embed>");
}
</script>
Reload web-page after a certain time period
<script>
function autoRefresh1()
{
window.location.reload();
}
function timeRefresh()
{
setInterval('autoRefresh1()', 5000); // this will reload page after every 5 secounds
}
</script>
Redirect to another page after a certain time
<script type="text/JavaScript">
function timedRefresh(timeoutPeriod){
setTimeout("window.location.href = '#';",timeoutPeriod);
}
</script>
A script to change another input box as per for the input
(eg. when entered discount percentage, showing total fee)
function getdiscount() {
var txtFirstNumberValue = document.getElementById('txt1').value;
var txtSecondNumberValue = document.getElementById('txt2').value;
var result = parseFloat(txtFirstNumberValue) * parseFloat(txtSecondNumberValue/100);
if (!isNaN(result))
{
document.getElementById('txt3').value = result;
getfullc_fee();
}
}
</script>
<script>
function getfullc_fee()
{
var txtFirstNumberValue = document.getElementById('txt1').value;
var txtdis = document.getElementById('txt3').value;
var fullfee = txtFirstNumberValue - txtdis;
//display the result
document.getElementById('totalPrice').value = fullfee;
}
</script>
Subscribe to:
Post Comments (Atom)
Implemting Google Drive File Uploader using OAuth
Implementing Google Drive Text File Uploader using OAuth 2.0 Creating Project and Registering your API with Google In this part we wil...
-
What it is? AngularJS is a very powerful JavaScript Framework. It is used in Single Page Application (SPA) projects. It extends HTML DOM ...
-
Technology today is so evolving. The purpose of keyboard keys fulfilled by bananas. https://youtu.be/3LmaCkczLcU
-
Implementing Google Drive Text File Uploader using OAuth 2.0 Creating Project and Registering your API with Google In this part we wil...
No comments:
Post a Comment