[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

Removing an INLINE Spreadsheet Object (OWC) with JavaScript

Hi,

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
0
dtbiju
Asked:
dtbiju
  • 4
  • 2
1 Solution
 
ZvonkoSystems architectCommented:
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.
0
 
dtbijuAuthor Commented:
I did try that. But when i see the View Source, i still see all the 3 objects.

-- dp
0
 
ZvonkoSystems architectCommented:
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:
javascript:alert(document.body.innerHTML)

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ZvonkoSystems architectCommented:
Why the grading B!
0
 
dtbijuAuthor Commented:
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.


0
 
ZvonkoSystems architectCommented:
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:
http://www.experts-exchange.com/Community_Support/

Cheers,
Zvonko

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now