Bootstrap modal doesn't launch on first click - javascript

I have a bootstrap modal that is loaded via data-remote. In the modal body, I include a jquery library (for example timepicker), followed by a tag that calls functions from the library.
The problem is, the modal doesn't launch on the first click (with firebug error that a function from the library was not available). But the moal launches on the second or later clicks.
What's the best way to fix this?
Thank you

Related

Trussworks in React Open Modal with Image

I'm using Trussworks and React. The code works for opening a modal window using the ModdleToggleButton. I also have a modal opening with plain text using ModalOpenLink.
The problem is that I also need a modal to open when clicking on an image. I have looked at the Trussworks documentation for using modals and do not see anything about being able to use an image to open a modal.
Does anybody have an example of doing this?

Panel window in angular 4

I am used to Adobe flex. In action script, we could create a new panel window by using the new keyword and pop it up using popups. We could customize the window by using the functions provided in the Panel class. Is there any way we can perform the same kind of action in angular 4? I want to have a customised window which i can popup
If you want to show some extra information with pop up in any of your page then angular bootstrap will good for you. It currently supports Angular 5 and Bootstrap 4, but you can give it a try with angular 2/4. Please check below link to install it into your current angular project.
https://ng-bootstrap.github.io/#/getting-started
After successful installation just select Modal from right side or use below link. You can use these Modals to show required information in your angular project.
https://ng-bootstrap.github.io/#/components/modal/examples
If you want to pop out a new window/tab in the browser then you can use below native JS function.
window.open()

Calling a JavaScript function on a CKeditor dialog instead of a popup window

I currently have a custom dialog within the link plugin that launches a popup with all the internal pages on my CMS for the user to pick and it inputs the url into the box
{type:'button',id:'browseInternal',label:i.browseWebsite,filebrowser:{action:'Browse',url:'/admin/pages/links'}}
However, I now use a popup modal window all over my system and would like the same modal style window to be used here. Any ideas on how I can implement it? I dont want to launch a popup window but instead the button needs to call this function
loadPopup( '/admin/pages/links', '', 'destination' );
After gathering my thoughts and a little more help from Google I eventially found the right page on the CKeditor docs see here

Display 2 modal windows with jQuery

I want to display 2 modal windows containing HTML content with jQuery.
But second modal window must be within the first.
So, here is main page, when I click link it opens first modal window, and then when I click a link in this modal window in opens second modal window.
I tried to do this with qTip, but I can't make second modal window.
I will be appreciate if somebody tells me how can I realize this. Thanks.
To me this sounds like an ui failure - modals within modals are not healthy for a user interface, and thus modal frameworks rarely support it.
If i was you I'd find another design rather than solve this problem programatically
I'd recommend the jQuery UI Modal Dialog, it should allow having two dialogs open at the same time.
qTip allows to open modal in modal.
Something is going wrong with your code.
Post it here and i can give you a solution!

javascript not included in colorbox popup window

I am using color box, its really fun, but i am really stucked out by a problem that:
my form is opening in colorbox
i am using jquery for validation in that form
for which i am including validate.js in that page
the problem is that i am not able to see the js file, when i open the page in window it is ok but when that page is opened in colorbox the javascript in not available.
please help me
From the Colorbox Home Page:
JavaScript/jQuery is not working inside of ColorBox.
This is often due
to trying to access an element before
it has been loaded into the document
and can be resolved by moving the
JavaScript into ColorBox's onComplete
callback.
//Example (using jQuery Forms plugin):
$('#login_window').colorbox({onComplete:function(){
$('form#login').ajaxForm();
}});
It looks like you might just need to make use of the "onComplete" callback of the plugin.

Categories

Resources