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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:32:28+00:00 2026-06-05T13:32:28+00:00

What should be done to avoid a server request for the pdf? I have

  • 0

What should be done to avoid a server request for the pdf? I have tried visibility=hidden and width=0.

<object class='pdfClass' data='"+conventionId+"/showPdf.html' width='100%' height='600'></object>

function toggleConv() {
    if (...) {
        document.getElementById(conventionId).style.display = 'none';
    } else {
        document.getElementById(conventionId).style.display = ''; //causes a refresh
    }
}
  • 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-05T13:32:29+00:00Added an answer on June 5, 2026 at 1:32 pm

    EDIT:

    After testing, I found out that the following works in Firefox 13 without reloading:

    <object id="test" class='pdfClass' data='https://web3.unt.edu/riskman/PDF/Guidelines_on_Staphylococcal_Infections-Athletics__Revised__06-22-06.pdf' width='100%' height='600'></object>
    
    function toggleConv(o){
        var test = document.getElementById('test');
    
        if (o == true){
            test.style.width = 0;
            test.style.height = 0;
        } else {
            test.style.width = '100%';
            test.style.height = '600px';
        }
    }
    

    http://jsfiddle.net/userdude/KnEYC/2/


    Original response. Note that the height and width of the element also need to be toggled down to little or nothing to prevent it continuing to taking up the same space.

    One technique would be to hide it from view by placing it way off screen:

    #test {
        position: relative;
    }
    
    function toggleConv(o){
        if (o == true){
            document.getElementById('test').style.left = '-10000px';
            document.getElementById('test').style.top = '-10000px';
        } else {
            document.getElementById('test').style.left = '';
            document.getElementById('test').style.top = '';
        }
    }
    

    http://jsfiddle.net/userdude/KnEYC/

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

Sidebar

Related Questions

I'm trying to start unit testing on my application (should have done so from
I have a huge server Subversion repository which I should move to an external
I'm still trying to wrap my head around how things should be done in
I've curious how this should be properly done. I ran a page im working
I'm a newcomer to Python but I understand that things should not be done
Can this be done? It seems like this should be possible. In general, I
As given here str_replace() count parameter should stop if certain replacements are done. Right?
In your opinion, should the documents listing what further needs to be done on
Should I use using? Private Sub btntest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
I have done extensive client-side validation through the help from jQuery. Now come to

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.