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

  • Home
  • SEARCH
  • 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 4113832
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:22:37+00:00 2026-05-20T22:22:37+00:00

I have a piece of PHP code that loops through to display all the

  • 0

I have a piece of PHP code that loops through to display all the banners that are stored in a database. If the code detects that the banner is a swf, it embeds it like this:

swfobject.embedSWF(\"".$banners->banner_url."\", \"flash_ad_con".$count."\", \"".$dimens['w']."\", \"".$dimens['h']."\", \"9.0.0\", false, false, false, {class: 'flash_ad_con'});

This works fine on all browsers except any version of Internet Explorer. If I remove the optional attributes that I add (in this case ‘class’) like this:

swfobject.embedSWF(\"".$banners->banner_url."\", \"flash_ad_con".$count."\", \"".$dimens['w']."\", \"".$dimens['h']."\", \"9.0.0\", false, false, false);

It then works on Internet Explorer but obviously doesn’t have the class applied and is therefore out of alignment. I can’t set the alignment using the ID as it’s dynamic and I want to avoid changing the stylesheet to PHP if possible.

I think the reason it doesn’t work in IE is that ‘class’ is a reserved word, but I’m using it within a JSON object so I didn’t think it would be affected.

Does anyone have any workarounds or alternate ways of doing this? I would add it inline but as the DOM elements are being created at runtime, I can’t really.

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-20T22:22:38+00:00Added an answer on May 20, 2026 at 10:22 pm

    Found the solution – using ‘styleclass’ instead of ‘class’ in the JSON object works across browsers. I couldn’t find that anywhere in the official documentation, I found it under ‘Issues’ under their Google Code site

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

Sidebar

Related Questions

I have a piece of php code that reads values from a database resultset,
I have a piece of C# code that add the values of an enum
I have created a function in PHP that calls a webservice and parses through
I have a piece of code that fetches data by giving it an ID.
I have this piece of code I found on some blog, that's supposed to
I have a piece of code that returns product data including a price. However
I have a piece of code that is working fine in IE, but it
I have a piece of PHP that is trying to do this: 1) given
I have a nice piece of functional and tested Ruby code that I would
I currently have a piece of code in my Android application that picks up

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.