Trussworks in React Open Modal with Image - javascript

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?

Related

jquery iframe modal demo works, downloaded version doesn't

I like this simple iframe modal, I especially like being able to close the modal from inside the iframe, however I can only get that to happen in the demo page at jqueryscript.net; when I download it the close button inside the iframe modal does nothing, I can't figure out why.

Open a Link to another website from within Fancy Box in a new window

Im stumped..... I'm using Fancybox jquery plug in to display some iframes over the top of my page in a lightbox style.... i have it all working but if I try to link to an external website from within the lightbox using the normal somesite
I before you suggest it I have tried target="_blank"with no luck.
it opens in the lightbox not in the original window, I dont mind if it opens in a new tab or windows I just cant have it opening in the lightbox... has anyone else experienced this before?
Just to make sure that I have understood the scenario here -
You have a link that when clicked, opens the content in a fancybox pop-up.
This content has some text and within that, it has a somesite link. You have also tried target="_blank".
When this <a>..</a> is clicked, it should act like a normal link and open in a browser (new tab or window). But it opens the this link in the fancybox pop-up instead.
If that's the case then I tried it and the link opened in a new tab.
Please clarify the above doubt of mine.
Thanks.
Try target="_parent" instead of target="_blank"
See following example:
somesite

hyper link pop up Window in JQuery plugins

I am trying to add pop up window on hyper link but not the default one that is windows.open(). I want a window like Google Compose mail. I did try the Angular.js but can't understand the main concept to produce that. If any one can help me as I did try other JavaScript Libraries like colorbox, fancybox etc. They work fine on button but not on hyper link.

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!

Categories

Resources