CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Play a sound when getting error

Print topic Send  topic

Author Message
asoaresfil


Posts: 12
Posted: 06/16/2005, 11:44 AM

I would like to play a sound like "ohoh.wav" when the error message appears (for example, when the user submits a form forgetting to fullfill some fields).

Does anybody can give me a tip of how to associate a sound to the error message display???

Thanks in advance
_________________
Alcides Soares FIlho
c2b@clickstobricks.info
Clicks to Bricks
www.clickstobricks.info

View profile  Send private message
gesto


Posts: 42
Posted: 06/17/2005, 4:56 AM

ok, that´s simple...
first add a hidden field inside your form and name it 'AutoStart', then add this code anywhere in the body of your html page:
<embed id="Sound" src="ohoh.wav" hidden="true" autostart="{AutoStart}" enablejavascript="true">

the next step is to add the code bellow in the 'before show' event of your form to change thje value of 'AutoStart' field in case any error is found in the page:

if YourFormName.Errors.Count > 0 then  
YourFormName.AutoStart.value = "true"  
else  
YourFormName.AutoStart.value = "false"  
end if
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.