SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    0 Post(s)
    0 Thread(s)

    Generating dynamic form with JavaScript: Looks different on IE8 vs Firefox or Chrome.


    I have created with JavaScript code for generating a forum dynamically, primarily using Tables and injecting rows and columns.

    As an initial template, I have created an static HTML file and CSS stylesheet.

    My JavaScript code generates the form just fine and it's structure is exactly the same as the static HTML form, but it looks different on IE-8 from the static HTML document. The generated version has unexplanable extra padding around the rows and columns. When I view same generated form on either FireFox or Chrome, it is exactly as expected with no extra padding.

    I looked at the styling applied through browser dev tools (FireBug and IE Developer Tools), and I can find nothing why this extra padding is occurring.

    Are there other things I could do to determine my problem in viewing on IE-8?


  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Christchurch, New Zealand
    104 Post(s)
    4 Thread(s)
    Quote Originally Posted by jeff00seattle View Post
    Are there other things I could do to determine my problem in viewing on IE-8?
    One of the main scripting issues with tables is adding rows to the table itself, when you need to instead add rows to the tbody element of the table.

    Other than that, take the resulting HTML code and perform a comparison without scripting being involved at all. That will tell you if CSS is the cause of the problem, which leads to all sorts of useful solutions.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts