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 926149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:38:16+00:00 2026-05-15T19:38:16+00:00

I am hoping that there is someone that can help me. I am using

  • 0

I am hoping that there is someone that can help me. I am using the google.code visualization tools and jquery on the same page.

I am calling the $(document).ready function on the document but suspect the problem lies with calling the google.setOnLoadCallback(drawVisualization); function.

Which still loads after the document.ready function and then does not apply the lightbox effect onto the table

<script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
        $(".gallery a[rel^='prettyPhoto']").prettyPhoto1({theme:'facebook'});
    });
    </script>

Any ideas on how to apply the lightbox effect to a link in the table, after the google visualization table has loaded?

I have also added the complete script as I have it now should this help in finding the problem.

    <script type="text/javascript">
      google.load('visualization', '1', {packages: ['table']});
    </script>
<script type="text/javascript">
    function drawVisualization() {
      // Create and populate the data table.
      var data = new google.visualization.DataTable();
      data.addColumn('string', 'No');
      data.addColumn('string', 'Page URL');
      data.addColumn('string', 'EDIT');
      data.addRows(10);
      <% while ((Repeat1__numRows-- != 0) && (!rs_page_1.EOF)) { %>
      data.setCell(<%= Repeat1__index %>, 0, '<%=(rs_page_1.Fields.Item("g_page_no").Value)%>');
      data.setCell(<%= Repeat1__index %>, 1, '<a href="<%=(rs_page_1.Fields.Item("g_page_site").Value)%><%=(rs_page_1.Fields.Item("g_page_url").Value)%>"><%=(rs_page_1.Fields.Item("g_page_site").Value)%><%=(rs_page_1.Fields.Item("g_page_url").Value)%></a>');
      data.setCell(<%= Repeat1__index %>, 2, '<span class="gallery clearfix"><div class="btn_newsite"><a href="/application/functions/preview.asp?g_sites_no=<%=(rs_page_1.Fields.Item("g_sites_no").Value)%>&amp;g_page_no=<%=(rs_page_1.Fields.Item("g_page_no").Value)%>&amp;iframe=true&width=100%&height=100%" rel="prettyPhoto1[iframes]" title="View">Edit</a></div></span>');
      <%
  Repeat1__index++;
  rs_page_1.MoveNext();
};
%>
      // Create and draw the visualization.
      visualization = new google.visualization.Table(document.getElementById('table'));
      visualization.draw(data, {'allowHtml': 'true'}, {'showRowNumber': 'true'}, {'firstRowNumber': '1'});
    }
    google.setOnLoadCallback(drawVisualization);
    </script>
<div id="table"></div><script type="text/javascript" charset="utf-8">
        $(document).ready(function(){
            $(".gallery a[rel^='prettyPhoto']").prettyPhoto1({theme:'facebook'});
        });
        </script>

Thanks

  • 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-15T19:38:17+00:00Added an answer on May 15, 2026 at 7:38 pm

    Edit for this specific Google Visualization API:

    The .draw() method isn’t immediate, it still has some work to do and it doesn’t do it in the current thread (since it may need to retrieve an image from a server, etc). They offer an event listener though, you can use it to listen for the ready event, like this:

    google.visualization.events.addListener(visualization, 'ready', function() {
      $(".gallery a[rel^='prettyPhoto']").prettyPhoto1({theme:'facebook'});
    });
    

    Add this code between these two lines so it’s sure to fire:

    visualization = new google.visualization.Table(document.getElementById('table'));
    visualization.draw(data, {'allowHtml': 'true'}, {'showRowNumber': 'true'}, {'firstRowNumber': '1'});
    

    This will ensure the .prettyPhoto1() runs after all the elements are loaded and ready to go, including the ones in the visualization. Still leave out the document.ready in this case, only run the plugin once.

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

Sidebar

Related Questions

I am hoping that someone can help me. I have found this jquery script
I am hoping that there is someone that can help me and many others
I am hoping that someone can help me, I am using Javascript and asp
Hoping that someone can help clear up this very annoying situation I find myself
I'm hoping that someone can help me with this issue. I've been racking my
Hoping someone can help me design this correctly. In my TCP code, I have
While learning to crawl with DI tools, I am hoping someone can help me
I am hoping that someone can help me. I am not exactly sure how
I'm hoping (and pretty sure that) someone out there is much better at MySQL
I'm hoping someone can help me with this annoying little problem I'm having. I'm

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.