• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: prototype.js
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: prototype.js


  • Subject: Re: prototype.js
  • From: Jesse Tayler via Webobjects-dev <email@hidden>
  • Date: Thu, 14 Aug 2025 10:05:35 -0400

I dunno- that sounds like a useful trick to me!



> On Aug 14, 2025, at 10:02 AM, Mark Gowdy <email@hidden> wrote:
>
> Hi..
>
> Dunno if this will help or not, but I added this to my prototype.js file.
> It was to tell it to ignore certain elements when you add the element class
> “noProtoJs” to them
>
> You also need the noConflict added somewhere in <head> (order is probably
> important).
>
> The order I use is:
> * bootstrap.js
> * <script type="text/javascript">jQuery.noConflict();</script>
> * other JS.
>
> and which I call Jquery, instead of using the $(..) , I use the full
> jQuery(..) instead
>
>
> prototype.js
> ----------------
>  *  @markgowdy -
>  *            Contains a minor update to help with an issue with Twitter
> Bootstrap v3+, where certain elements (pop-ups, etc) would disappear after a
> roll-over.
>  *            See the 'hide(element)' function below.
>  *            To use, add 'noProtoJs' to your element's class (if you find
> they disappear for no obvious reason).
>  *            e.g.    <a class = "noProtoJs" data-toggle="tab"
> href="#tab-1">Tab 1</a>
>  *
>  *            TODO: There is certainly a better way to fix this issue, but
> this works for now.
>  *
>  *--------------------------------------------------------------------------*/
>
> …
> …
>   function hide(element) {
>     /*  MG - See intro text at top. This helps with Twitter BootStrap 3+ */
>     if(!hasClassName(element, 'noProtoJs')){
>       element = $(element);
>       element.style.display = 'none';
>     }
>     return element;
>   }
> …
>
> Marl Gowdy
>
>
>> On 14 Aug 2025, at 14:35, Jesse Tayler via Webobjects-dev
>> <email@hidden> wrote:
>>
>> Let me see here.
>>
>> I guess I TURN OFF JQuery by simply wrapping it in a D2W conditional
>>
>> <script src="https://code.jquery.com/jquery-3.3.1.min.js";></script>
>>
>> So, there are times when I have to pick between JQuery and AJAX because of I
>> think two conflicts, one can cause things not to popup because I think the
>> .hidden conflicts or something. You’ll see things like menus breaking and
>> popup help panels etc.
>>
>> It seems I basically just write raw JavaScript when I need to mix — it’s a
>> drag.
>>
>> Somehow I recall a bit of code that helped with the conflict but I cannot
>> seem to locate it…I’ll keep looking and post if I see.
>>
>>> On Aug 14, 2025, at 5:36 AM, Fredrik Lindgren via Webobjects-dev
>>> <email@hidden <mailto:email@hidden>>
>>> wrote:
>>>
>>> If you are willing to share how you "turn it off", it would be nice to try!
>>>
>>> /Fredrik
>>>
>>>> 13 aug. 2025 kl. 16:54 skrev Jesse Tayler <email@hidden>:
>>>>
>>>> I also have had this problem —
>>>>
>>>> I have a weird hack fix that does SOME of the conflicts, but I also have a
>>>> hack to basically “turn it off”
>>>>
>>>> I would LOVE to move to AJAX that has JQuery vs. prototype which conflicts
>>>> and isn’t really used anymore—
>>>>
>>>> Sad because prototype was an amazing idea! It unified JS which was
>>>> intentionally weirdly different on all browsers and honestly, you could
>>>> not get anything done before prototype!
>>>>
>>>>
>>>>
>>>>> On Aug 13, 2025, at 7:55 AM, Fredrik Lindgren via Webobjects-dev
>>>>> <email@hidden> wrote:
>>>>>
>>>>> Yes, we are using that feature in jQuery. However it seems that prototype
>>>>> is overriding some features in native javascript that Quill uses (and
>>>>> other libraries). This brakes those libraries.
>>>>>
>>>>> Ideal would be to update the Ajax-classes to not use prototype, but I
>>>>> realise this is a major effort.
>>>>>
>>>>> There is a framework that might be used to replace the Ajax komponents,
>>>>> that is called htmx (https://htmx.org/). That might be a path forward,
>>>>> but to get the same level of integration as Ajax, there is a lot of work.
>>>>>
>>>>> I can probably use the AjaxUtils.ajaxComponentActionUrl(WOContext) to get
>>>>> the html that should replace a similar update container.
>>>>>
>>>>> Has anyone tried this approach?
>>>>>
>>>>> /Fredrik
>>>>>
>>>>>
>>>>>> 13 aug. 2025 kl. 10:30 skrev Daniele Corti <email@hidden>:
>>>>>>
>>>>>> Hi,
>>>>>> A while ago, I did a project using Ajax framewotk, with Bootstrap, using
>>>>>> jQuery.
>>>>>>
>>>>>> Fortunately, jQuery is distributed with a function called noConflict(),
>>>>>> which is precisely for making jquery work with other javascript
>>>>>> libraries.
>>>>>>
>>>>>> Once I found the right call order, I was able to get both the Ajax
>>>>>> framework and the jQuery and bootstrap functionality working.
>>>>>>
>>>>>> I think the only option is to check if there is a way for prorotypes and
>>>>>> the other js libraries you use to coexist.
>>>>>>
>>>>>> Best regards
>>>>>> D.
>>>>>>
>>>>>> Il Mer 13 Ago 2025, 09:43 Fredrik Lindgren via Webobjects-dev
>>>>>> <email@hidden> ha scritto:
>>>>>> Is there a way to opt out of using prototype.js with the Ajax framework.
>>>>>>
>>>>>> We are having problems integrating for example the quill editor due to
>>>>>> conflicts.
>>>>>>
>>>>>> Anyone have similar problems with a solution?
>>>>>>
>>>>>> /Fredrik
>>>>>> _______________________________________________
>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>> Webobjects-dev mailing list      (email@hidden)
>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>
>>>>>> This email sent to email@hidden
>>>>>
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Webobjects-dev mailing list      (email@hidden)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>
>>>>> This email sent to email@hidden
>>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden <mailto:email@hidden>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden
>> <mailto:email@hidden>)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden <mailto:email@hidden>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >prototype.js (From: Fredrik Lindgren via Webobjects-dev <email@hidden>)
 >Re: prototype.js (From: Daniele Corti via Webobjects-dev <email@hidden>)
 >Re: prototype.js (From: Fredrik Lindgren via Webobjects-dev <email@hidden>)
 >Re: prototype.js (From: Jesse Tayler via Webobjects-dev <email@hidden>)
 >Re: prototype.js (From: Fredrik Lindgren via Webobjects-dev <email@hidden>)
 >Re: prototype.js (From: Jesse Tayler via Webobjects-dev <email@hidden>)
 >Re: prototype.js (From: Mark Gowdy via Webobjects-dev <email@hidden>)

  • Prev by Date: Re: prototype.js
  • Next by Date: Re: Webobjects Facebook Group Needs a New Admin
  • Previous by thread: Re: prototype.js
  • Next by thread: Re: prototype.js
  • Index(es):
    • Date
    • Thread