attempting to use onRequestStart to execute when a specific page is called up. Please help
Hello;
I am trying ot use a little app I have for turning off background music from a dynic web site. It works nice if I reload the page. But I want to pass it off to the application.cfc file and let that file run the code and if a button is clicked, the application should catch it. (If I miss my guess, everytime you click a link in a cf site, the application.cfc is the first page read?) Does that include a page using ajax as a Iframe loader?Anyway. This is my application file code:
<cfcomponent output="false" extends="ProxyApplication">
<cffunction access="public" name="onRequestStart" output="true" returntype="any">
<cfargument name="request" required="true" />
<cfif not IsDefined("cookie.hitbox")>
<embed src='../video/Roller Pop.wav' width="" height="" hidden='true' autostart='true'
loop='true'></embed>
<cfelseif IsDefined("deactivate")>
<cfcookie name="#deactivate#" value="Off" expires="never" domain="myDomain.com"><!--- <cookie defined - stop music> --->
<cfelseif IsDefined("engage")>
<cfcookie name="#engage#" value="On" expires="now" domain="myDomain.com"><!--- <cookie removed music is on> --->
<embed src='../video/Roller Pop.wav' width="" height="" hidden='true' autostart='true'
loop='true'></embed>
</cfif>
</cffunction>
</cfcomponent>
this is part of a larger site. This application file sits in a sub directory pulling the info from the main application.cfc file in the main directory. Now, I want this code to fire every time the page www.mydomain.com/subdirectory/index.cfm file is pulled up.Is this possible this way? If so, how far am I off and can someone help me code this to work?
Thank You!
