browser compatibility

Discussion in 'Javascript' started by priyanka67, May 14, 2008.

  1. priyanka67

    priyanka67 Guest

    I have few jsps with images...but they run on internet explorer but
    when i use mozilla firefox i dint get these pages
    properly..........images dont come properly... Can anybody help??
    priyanka67, May 14, 2008
    1. Advertisements

  2. priyanka67

    Erwin Moller Guest


    jsps means Java Server Pages?
    If so: It doesn't matter which language created the html.
    The only thing that matters is the HTML send to your browser.

    So simply view the source, find the imagetags, and try to find out what
    is wrong.

    You might want to validate your HTML too, and make sure it is valid.

    Erwin Moller
    Erwin Moller, May 14, 2008
    1. Advertisements

  3. priyanka67

    priyanka67 Guest

    ya jsp means java server pages.........
    my problem is that image comes fine on IE but on mozilla it comes only
    half..........not full image is displayed..
    my code in jsp is:
    <?xml version="1.0" encoding="UTF-8"?>

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://">
    <html xmlns="" xml:lang="en" lang="en">
    <script language="JavaScript" src="Login.js">
    <!-- Linking of the Style sheet Commonstyle.css -->
    <link rel="stylesheet" type="text/css" href="../css/commonstyle.css">
    <meta http-equiv="Content-Type" content="text/html;
    <title>LOGIN-SNAKE AND LADDER</title>
    <body onload="setFocus()">
    <h2><center><font face="Comic Sans MS" color="green" size=8>Snake And
    <h2><center><font face="Comic Sans MS" color="black"
    <!-- Creating a form with name frm -->
    <form name="LoginForm" action="../LoginServlet" method="post">
    <!-- Creating a Table -->
    <table width="35%" height="45%" align="center" background=".../
    <!-- Inserting values and texfeilds and buttons into the
    table -->
    <td align="center">UserName<span class="mandatory">*</
    <td align="center"><input type="text" name="userName"
    maxlength="11" id="uName"></td>
    <td align="center">Password<span class="mandatory">*</
    <td align="center"> <input type="password" name="password"
    <td align="center"><input type="submit" VALUE="Submit"
    onClick="return fnLoginValidate()"></td>
    <td align="center"><input type="reset" VALUE="Reset"></td>

    <!--Close of table tag -->
    <h1><center><font size="1">Fields marked with * are
    <a href="NewUser.jsp"><center>New User Click Here!<center></
    <!--Close of form tag -->

    priyanka67, May 14, 2008
  4. escribió:
    You haven't followed any of Erwin's recommendations:

    - JSP is JSP, not HTML.
    - The generated HTML does not validate (14 errors so far).

    Even more, despite asking in a JavaScript group you omit the JavaScript

    I can't see any <img> tag but I've replaced the background attribute
    with an actual image and it loads fine. I suggest you go to Tools-> Page
    Properties and check paths in "Media" tab.
    Álvaro G. Vicario, May 14, 2008
  5. priyanka67

    Erwin Moller Guest

    Your keyboard seems to hang on '.'.
    (c) Pointedears

    OK, JSP it is, but we don't care: the browser doesn't care.
    It only sees the HTML generated, be it by Perl, PHP or Java.
    Does FF do this consequent? Or just sometimes?
    If it displays it ALWAYS half, chances are your jpg is not valid, or,
    since you use it as a background, maybe there isn't enough space to
    fully display it?

    I am not sure why you use an xml-tag that says UTF-8 while you instruct
    your Java environment to use ISO-8859-1.
    Not my area of expertise, but that looks strange.

    Stop using language for scripttags.
    Use this:
    Yet again the characterencoding.
    I think the header is used above the metatag, but since they are the
    same, I doubt this will be the problem.

    <snipped the rest>

    You can test if your jpg is valid, and FF can display it, by simply
    typing the full URL of your image in the URL.

    If it displays right --> your table is too small to diplay it completely.
    If it displays half --> Your jpg is probably corrupt.

    Erwin Moller
    Erwin Moller, May 14, 2008
  6. [trimmed atttribution novel]

    How did you get the idea that anyone asked you to dump core here? Acquire
    some manners or go away.

    Thomas 'PointedEars' Lahn, May 14, 2008
  7. priyanka67

    Erwin Moller Guest

    Thomas 'PointedEars' Lahn schreef:
    PointedEars <-- I think I stole the 'broken keyboard' line from you.
    (I hope it was not legally protected.)

    Erwin Moller
    Erwin Moller, May 14, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.