Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 232103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:59:20+00:00 2026-05-11T19:59:20+00:00

I am developing a survey invitation that can be embedded in many sites. To

  • 0

I am developing a survey invitation that can be embedded in many sites. To present the invitation I am using Modalbox, a javascript library that shows an animated modal box over a semi-transparent overlay.

This Modalbox library depends on Prototype and script.aculo.us/effects libraries. The invitation will be dynamically embedded in sites that I don’t own and can’t statically modify their markup.

At the load time I check (in JS) if Prototype is loaded like:

if (typeof Prototype == "undefined") {
    document.write('<script type="text/javascript" src="http://mysite.com/lib/prototype.js"><\/script>');
}

if (typeof Effect == "undefined") {
    document.write('<script type="text/javascript" src="http://mysite.com/lib/scriptaculous.js?load=effects"><\/script>');
}

All works well with the majority of sites since they usually don’t load Prototype.js nor script.aculo.us. There are some site which load them and I don’t have to load them and again it works.

HOWEVER… there are sites that already loads them but have OLDER versions (Modalbox requires Prototype 1.6.0 and script.aculo.us 1.8.0) such as 1.4.0 / 1.5.1

How can I dynamically unload/replace prototype and/or script.aculo.us in Javascript? Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:59:20+00:00Added an answer on May 11, 2026 at 7:59 pm

    You may be able to do this technically, but are you willing to risk breaking the rest of the page just so that your plugin works? There could be good reasons why these sites haven’t upgraded — such as compatibility with other plugins that don’t work with newer versions. I’d suggest that you either require the sites that use your code to have the minimum version of Prototype (by examining Prototype.Version) or including it, as you are, when it is not found. Do the same with Scriptaculous.

    This will allow the user of your code to make decisions on how best to proceed. Either they can upgrade their page (most likely, since the older version is probably being used due to inertia) or drop your plugin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Developing a .NET WinForms application: how can I check if the window is in
When developing an application that sends out notification email messages, what are the best
I'm developing an online survey application for my University project. I managed to save
I am developing a very small survey application, likely 3-4 pages web application. so
I'm a noob, development wise and logistically-wise. I'm developing a site that lets people
Developing websites are time-consuming. To improve productivity, I would code a prototype to show
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
Developing a website and just trying to get back into the swing of (clever)
Developing server side code i finally got my eyes X-crossed trying to write -
When developing a desktop application in .NET, is it possible to not require the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.