We help IT Professionals succeed at work.
Get Started

When to use javascript or <object> tag

markschenkel asked
Last Modified: 2012-05-05
I have an application which dynamically creates jpeg based charts which can embedded into other web sites.  I need to make available a script or code snippet which web publishers can copy and paste into their code.  This code will then pull the graphic from my site when their page is served.  It is more or less how Google Adsense works.

I have been able to successfully get it to work using the object tag (see sample below).

Would using some sort of javascript be a more robust solution?  I ask because I notice that Google Adsense uses javascript instead of a simple object tag.  If I use the object tag method, is there a better chance my content will be blocked by firewall security programs?
<OBJECT DATA="http://www.mysite.com/getjpeg" TYPE="image/jpg">

Open in new window

Watch Question
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE