Removing an INLINE Spreadsheet Object (OWC) with JavaScript

Posted on 2004-11-30
Last Modified: 2012-05-05

I have an HTML page with 3 INLINE spreadsheet objects (corresponding to 3 different office versions) (Office Web Component) created using <OBJECT> tag. I check the office version installed while loading. Once i determine the version i need to remove the OTHER unwanted stale spreadsheet objects. How can i do this with Javascript at the client side?

Thanks in advance.

-- dp
Question by:dtbiju
    LVL 63

    Expert Comment

    Put all three objects every in its own <div> section with an id for the div.
    Assign the innerHTML of the two unneeded divs to empty string.
    That will remove the embedded objects from the page.

    Author Comment

    I did try that. But when i see the View Source, i still see all the 3 objects.

    -- dp
    LVL 63

    Accepted Solution

    You cannot see the dynamic created source in ViewSource; you see always only the initial source together with the script.
    But if you realy want to see the generated source, then write this into the browser address bar:

    LVL 63

    Expert Comment

    Why the grading B!

    Author Comment

    Hi Zvonko,

    I'm sorry....i didn't mean anyhing bad.
    i decided not to create 3 objects and try to remove 2. Intead, i now create only the one i want.

    Thanks a lot for your help anyway.

    LVL 63

    Expert Comment

    Ok, the main goal is to solve your problem.
    But the grading system is more to tell how good the support was for you.
    The grading explanation is a bit missleading because it suggest Good is good enough as B.
    But at the moment are nearlly all gradings A, that mean Excelent!
    So does B mean that you was dissappointed by the support.

    If you like, then you can let change your grading to A by posting a request to this topic area:



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Specialist

    HTML5 development skills are critical to all developers. HTML5 is the foundation to almost any development process. That's why business, design studios, development shops and other organizations need HTML5 developers. Get your foot in the door as a HTML5 specialist.

    Suggested Solutions

    Title # Comments Views Activity
    SharePoint JSOM error 7 32
    JavaScript - Chessboard 36 31
    How do I interpret the HTTP accept header? 5 26
    Table append 4 12
    The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
    JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now