I am writing below code under cfwindow
<audio src="audio1.wav" controls="controls" autoplay="autoplay">
<embed src="audio1.wav" autostart="true" loop="false">
</embed>
</audio>
If html5 is not supported in browser, I am trying to play audio file with default audio player for browser.
Problem is that when I close my cfwindow by clicking 'X' sign on top right, my cfwindow gets closed but audio file still keeps on playing.
Please suggest how to stop music from playing as soon as I close my cfwindow. Thanks!!
When the default close event is fired, all that happens is the generated div is hidden with css. Try disabling the default close (x) button, and using ColdFusion.window.destroy.
Here is the solution
there are two ways to solve the issue
1.keep DestroyOnClose="true" attribute in cfwindow tag
2.Call ColdFusion.window.destroy('WIndow name',true)
Thanks,
Ramakrishna
Related
I created a pop-up page. That pop-up window has a radio button, a text box, and an execute button. I want to work that page working like... when pressing the button, run a update SQL with the values of the radio button and text box, and close itself.
I tried that answer in the following link. But the pop-up page just reloaded and the page stayed open. How to close popup window in Oracle-apex?
If possible, I would like to validate the value of the text box. If it was an incorrect value then break the process with a message. If path that validation, run a update SQL and close the pop-up window.
Thank you for your kindness for read this confusing question.
You should be using a "Close Dialog" process type after your Save Process.
Make sure that you also set the server side condition accordingly so that the dialog only closes after your save process.
I GOT RESOLVED IT!
Not use any close method, redirect util is fine work like this APEX_UTIL.REDIRECT_URL (APEX_PAGE.GET_URL(p_page => 7));
Thank you to all ppl for look this page :)
I have an apex page where I have a button "SAVE & CLOSE" . On click of that button, I first want to save the data and then close the page.
I have a PLSQL code at point "Processing" to save the data.
I have then created a Branch at Point = "After Processing" and Type ="PLSQL Procedure" and written below code to close the window.
Begin
htp.p('<script type="text/javascript" >');
htp.p('window.close();');
htp.p('</script>');
end;
I have added the button's name in server side condition : When button Pressed.
But this doesn't work. When I click on apply, it doesn't close the window. It gives me an error :
"Error: SyntaxError: Unexpected token < in JSON at position 0 "
Can you please help me resolve this error and tell how can I close the window in button click.
Thanks,
Abha
You can use only APEX components and not write a single line of code :)
Set action for your button to "Submit page" - so all items will be submitted to use their values in processing. Image below will help you.
Now, for processing your pl/sql code use process in processing(left side on the picture).
Here you can create a new process and set type to "Close dialog" this process will automatically close the window. Without any javascript etc.. Apex is processing from top to bottom, so if you make this process last, it will always close the window after all processes are done.
You can as well set process server side condition, so it will not trigger every time.
Be careful with javascript - some web browsers are processing them in different way.
Hope it will help. Have a nice day !
Hi I got it working with other method :
Instead of type : PLSQL Procedure" select Type = "Page or URL Redirect"
and give
javascript:window.close()
in the Target.
This works.
What I did was make the page Modal. Then I added a Button called btnClosePage with a Dynamic Action (True Event) that calls "Close Dialog". I am working in Oracle Apex 20.2.
I have a RubyMotion application that is completely portrait (no landscape), but loads BW::Media.play_modal for an external MP4 video URL that I'd like to play in landscape mode.
It's loaded like this using RMQ, PM, and BW:
def on_load
rmq(#object).on(:tap) do
BW::Media.play_modal(#object.video_url)
end
end
I know how to enable autoRotate for an entire screen/controller, but is there a way to force landscape mode only when the modal is played?
Thanks in advance for any help!
Here's how I ended up solving the problem-
I enabled landscape_left and landscape_right throughout the RM app.
I set the should_autorotate method to false throughout the app.
I added a condition using PM's modal? method that set should_autorotate to true when a modal was active.
I used RMQ's rmq.orientation.landscape? method to set the view back to portrait as soon as the modal was exited.
I hope this helps if anyone else has the same problem!
I have a really weird problem. I am trying to create a simple pop-up window in my ColdFusion application using Coldfusion.Window.Create. However, as soon as you click on the link and the pop-up windows appears on the screen, it immediately closes out by itself.
I have even tried making my target page blank with just Hello World text on it and it still closes out. What am I missing here?
Here's my code:
<cfajaximport tags="cfwindow">
<!---Capture New Signature --->
<a href="" onClick="ColdFusion.Window.create('Window1', 'Signature Capture',
'https://#subscriber.hostName#.#subscriber.baseURL#/eztrax/administrator/tickets/templates/signature_popup.cfm?ticket_id=#get_ticket.ticket_id#',
{x:100,y:100,height:300,width:400,modal:false,closable:true,
draggable:true,resizable:true,center:true,initshow:true,
minheight:200,minwidth:200 })">
WindowsDotCreate - Capture New Signature |
</a>
I have a repeater which I bind the data using Bind method from the database. There is a Asp:Button with an onclientclick and onclick event. In OnClientClick I open a new window and onclick I am adding the data to the database. This works perfectly on the first Page load. After first click on any of the buttons in the repeater, the click events stops working on subsequent clicks.
I have spending hours on finding a solution for the same, can any one guide me where i am going wrong what needs to be done.
P.S: My application is AJAX Enabled , using WCF and JQUERY
Thanks & Regards,
Phani...
Never Mind I got it solved my self. For others who are trying to solve the same issue, here is the solution:
The code below opens up a new window with out popup blocker blocking the window
OnClientClick of the button write Javascript like below to open a new window and refresh the parent window (I have to do this as the ItemCommand event was not firing until the page is refreshed)
OnClientClick = "target='_blank'; setTimeout("location.reload(true);", timeout);
Phani...