Forum Activity for @ultrajam

SteveX
@ultrajam
04/01/18 05:58:25AM
2,587 posts

jrCore_page_set_no_header_or_footer breaks javascript added to form in modal


Jamroom Developers

    $html = "
    <script>
    	secondcopyjquery = jQuery.noConflict( true );
    </script>";
    jrCore_page_custom($html);
With that in the forms to appear in the modal everything seems fine :)

The last example on this page is for loading two different versions of jQuery:
https://api.jquery.com/jquery.noconflict/
SteveX
@ultrajam
04/01/18 05:39:13AM
2,587 posts

jrCore_page_set_no_header_or_footer breaks javascript added to form in modal


Jamroom Developers

I've tried every way around.

I think I have found what's causing it though.

If I load the parent page in the browser, then delete the contents of jrCore/js/jquery-1.12.4.min.js and then open the modal everything works fine.

So I think it's the 2nd copy of jQuery 1.12.4 which breaks the modal. I've tried removing everything else one bit at a time, but that's the only thing which makes a difference.

Why it should break the modal but all other js works fine I don't know.

Any idea how I can get around that?

Thanks
SteveX
@ultrajam
03/31/18 02:58:06PM
2,587 posts

Is a chameleon my code buddy?


Off Topic

So, I'm house sitting for friends off on a skiing holiday, they have a chameleon, so I'm chameleon sitting as well :)

I'm working on my VR / 360 video project and that's going great - Jamroom and A-Frame, perfect Easter coding for me :) :) :)

It might be a coincidence, but for the first time in ages (I've been working on this project for at least 3 years) I'm making great progress, feels like everything is coming together.

Chameleons have a 360 degree view of the world (their eyes are amazing), and Charles the chameleon seems to love watching me code and occasionally scroll around a panorama.

I'm wondering if Charles is my 360 code sorcerer's familiar, or if a chameleon is some kind of VR spirit animal.

What do you think? Should I get a chameleon of my own? Or just kidnap this one?

Photos of Charles attached :)
IMG_0570.JPG IMG_0570.JPG - 1.9MB

updated by @ultrajam: 07/01/18 12:53:25PM
SteveX
@ultrajam
03/31/18 04:41:54AM
2,587 posts

jrCore_page_set_no_header_or_footer breaks javascript added to form in modal


Jamroom Developers

That's great, thank you Michael! And the form examples are very useful too.

The problem that I have now is that I can no longer close the modal with $.modal.close();

Using jrCore_page_set_no_header_or_footer() I can close the modal, but not when I use jrCore_page_set_meta_header_only()

Any idea what might be going on there, or possible workaround?

Thanks
SteveX
@ultrajam
03/30/18 12:21:22PM
2,587 posts

jrCore_page_set_no_header_or_footer breaks javascript added to form in modal


Jamroom Developers

I have an item form which loads in a modal window.

If I use jrCore_page_set_no_header_or_footer() in the item form everything looks great but the javascript in the form doesn't work (image upload, chained selects, etc). Inline js such as the help button slider continues to work fine though.

There aren't any errors, I think the javascript just isn't included in the page.

Is there a convenient way to remove the header and footer but for javascript_ready_function form js to still work?

Thanks!
updated by @ultrajam: 06/30/18 12:47:16PM
SteveX
@ultrajam
03/29/18 05:14:24PM
2,587 posts

Setting cross origin on images using jrImage_display


Using Jamroom

Marvellous!!! Thank you Michael!

That's going to save me so much time - My console log is readable again :) now I can see the errors of my javascript ways :(

Thanks man! :)
SteveX
@ultrajam
03/29/18 04:38:07PM
2,587 posts

Setting cross origin on images using jrImage_display


Using Jamroom

Yes, that looks correct :)

If that can be in the next version of jrImage that sure tidies up my console output, but if not and I can achieve the same thing through an img_src listener I'd be happy with doing that as well.

Thanks Michael!
SteveX
@ultrajam
03/29/18 03:46:09PM
2,587 posts

Setting cross origin on images using jrImage_display


Using Jamroom

Thanks Michael. It isn't a need at the moment, the library adds crossorigin="anonymous" to each media element without it and logs the warning that it is missing.

When I used the url everything worked fine until I started testing from uncached browsers. If the images aren't in the cache then the load fails every time with the above jr errors logged. I can reproduce those errors by emptying the browser cache and emptying the jamroom image cache, then I get the error on first load but all is fine on the second. But if I use jrCore_module_function it works fine every time, even the first visit.
  13