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

  • SEARCH
  • Home
  • 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 9238855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:51:26+00:00 2026-06-18T07:51:26+00:00

I’m having a problem on our site where the google maps is not showing

  • 0

I’m having a problem on our site where the google maps is not showing anymore as of a couple of days ago.

Here’s two links to the pages in which it’s not working:

link 1 – A project detail page

link 2 – A project category page

They all work from the same type of code and were working great until a day ago.

Last time it didn’t work was because someone didn’t insert the correct number type on the lat long coordinates section.

Here’s the code that did it in case anyone runs into the same problem. Please see answer below (thank you Jonathan Kuhn!)

<script type="text/javascript">
  Shadowbox.init({
    // let's skip the automatic setup because we don't have any
    // properly configured link elements on the page
    skipSetup: true
  });
  <?php
    session_start();
    if (empty($_SESSION['count'])) {
      $_SESSION['count'] = 1;
    }
    else {
      $_SESSION['count']++;
    }
  ?>
  window.onload = function() {
  // open a welcome message as soon as the window loads
  <?php
    if ($_SESSION['count'] == 1) {
  ?>
  Shadowbox.open({
    content:    '<div id="welcome-msg"><p style="padding:4px 30px; margin:4px; color:#fff;">Awesome stories, photos, news, and more on our projects, straight to your inbox.</p><p style="padding:4px 30px; margin:4px; color:#fff;">Enter your e-mail and click Submit to join.</p><form method="post" name="newsletter" action="include/newsletter_submit.php" onsubmit="return validateForm_newsletter()" style="padding:10px 30px;"><input type="text" name="email_address" class="newsletter_textbox"> <input type="submit" name="button" class="newsletter_button" value="Submit" style="margin-top:10px;"><p style="padding:18px 15px; margin:4px; color:#fff;">You can also enter your e-mail at the bottom of our homepage.</p></form></div>',
    player:     "html",
    title:      "Get our friendly updates!",
    height:     250,
    width:      350
  });
<?php } ?>
};
</script>
  • 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-06-18T07:51:27+00:00Added an answer on June 18, 2026 at 7:51 am

    I believe you are overwriting the body onload that usually runs your initialize function with a window.onload that runs an empty function. Viewing the source of the first link, right around line 69 you have:

    window.onload = function() {
    
        // open a welcome message as soon as the window loads
    };
    

    which I think is overwriting the onload in the body tag. in firebug console if you run document.body.onload.toString() it shows that empty function, comment and all.


    edit to add example wrapper function:

    //make a temporary empty function
    var tmp=function(){};
    //check if there is an onload function already
    if(window.onload && typeof window.onload == 'function'){
        //make tmp the onload function
        tmp=window.onload;
    }
    window.onload=function(){
        //call the original onload function
        tmp.apply(this, arguments);
    
        //do something else for shadowbox
    }
    

    essentially what I do is check if there is a window.onload already and if there is, save that function to a temp variable. then assign a new window.onload that calls the temp function. I use Function.apply to pass in any arguments that window.onload recieves which might differ based on the browser but this assures that the temp function will get all the same arguments that the original function would get.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I've tracked down a weird MySQL problem to the two different ways I was
I'm making a simple page using Google Maps API 3. My first. One marker
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.