Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within IDEs and Version Control
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Other IDEs, Version Control
Back ground sound is not working in netbeans.Is there any alternative?
naveen joyce
Greenhorn
Posts: 6
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
Here is the script which i am using in netbeans
<script> var sound = "E:/Testing/web/images/hell.mp3"; function sivamtime() { now=new Date(); hour=now.getHours(); min=now.getMinutes(); sec=now.getSeconds(); if (min<=9) { min="0"+min; } if (sec<=9) { sec="0"+sec; } if (hour>12) { hour=hour-12; add="pm"; } else { hour=hour; add="am"; } if (hour==12) { add="pm"; } if (hour==00) { hour="12"; } document.hours.clock.value = (hour<=9) ? "0"+hour : hour; document.minutes.clock.value = min; document.seconds.clock.value = sec; document.ampm.clock.value= add; setTimeout("sivamtime()", 1000); } function alarm() { note = document.arlm.message.value; if (note == '') {note = 'ALARM!!';} hrs = document.arlm.hr.value; min = document.arlm.mts.value; apm = document.arlm.am_pm.value; if ((document.hours.clock.value == hrs) && (document.minutes.clock.value == min) && (document.ampm.clock.value == apm) && (document.arlm.music.checked == true)) { musicwin=window.open("","","width=200,height=50") if (navigator.appName=="Microsoft Internet Explorer") musicwin.document.write("<bgsound src=" + sound + " loop='infinite'>" + note) else musicwin.document.write("<embed src=" + sound + " hidden='true' border='0' width='20' height='20' autostart='true' loop='true'>" + note) musicwin.document.close(); return false; } if ((document.hours.clock.value == hrs) && (document.minutes.clock.value == min) && (document.ampm.clock.value == apm) && (document.arlm.music.checked == false)) { alert(note); return false; } if (hrs == '') {alert('The Hour field is empty'); return false} if (min == '') {alert('The Minute field is empty'); return false} if (apm == '') {alert('The am/pm field is empty'); return false} if (hrs.length == 1) {document.arlm.hr.value = '0' + hrs} if (min.length == 1) {document.arlm.mts.value = '0' + min} if (hrs.length > 2) {alert('The Hour is wrongly typed.'); return false} if (min.length > 2) {alert('The Minute is wrongly typed.'); return false} if (apm != 'am' && apm != 'pm' ) {alert('The am/pm is wrongly typed.'); return false} setTimeout("alarm()", 1000);} </script>
back ground is working fine in html file but it is not working in netbeans.Can anybody suggest me alernative?
Could you hold this kitten for a sec? I need to adjust this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
onkeydown before onchange event
Storing field value in java properties file.
Input parameter check function ??
increment a number with onmousedown
World Clock Problem
More...