×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    7

    XHTML crashes browser

    Hi,

    I've a servlet sending to the mobile browser the following XHTML MP page:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
    "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    <head>
    <title>
    TIM
    </title>
    <link href="routeAssist.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
    <p>
    <img src="./images/logo.png" alt="Logo" />
    </p>
    <h5> Configure </h5>
    <form action="logic" method="post">
    <table>
    <tr>
    <td class="headingCell">
    <b> Start: </b>
    </td>
    <td class="headingCell">
    <p>
    <input name="startDate" value="02-12-2005-15.44" size="7" class="town" />
    </p>
    </td>
    </tr>
    <tr>
    <td class="headingCell">
    <b> Days: </b>
    </td>
    <td class="headingCell">
    <p>
    <input type="radio" value="0" name="setOfDays" checked="checked" />Week<br />
    <input type="radio" value="1" name="setOfDays" />Weekend
    </p>
    </td>
    </tr>
    <tr>
    <td class="headingCell">
    <b> When: </b>
    </td>
    <td class="headingCell">
    <p>
    From: <input name="startHour" value="7.00" class="town" size="3" /> <br />
    To: <input name="endHour" value="20.00" class="town" size="3"/>
    </p>
    </td>
    </tr>
    <tr>
    <td class="headingCell">
    <b> What: </b>
    </td>
    <td class="headingCell">
    <p>
    <input type="radio" value="TrafficWebCam"
    id="allEvents" name="mode" checked="checked" />All<br/>
    <input type="radio" value="TrafficWebCam_"
    id="closeEvents" name="mode" />Close
    <input name="radius" class="cap" value="3"
    size="3" /> Km.
    </p>
    </td>
    </tr>
    <tr>
    <td colspan="2" align="center">
    <p>
    <input type="submit" value="OK" />
    <input type="hidden" name="action" value="6"/>
    </p>
    </td>
    </tr>
    </table>
    </form>
    <p>
    <a href="./index.jsp">Back</a>
    </p>
    </body>
    </html>

    and this sometimes causes the browser to crash (6680, 6630), sometimes it does not display properly (I cannot check check boxes) and when I hit submit the browser crashes. This usually happen if a reach the page after a few navigation steps rather than directly.

    Does anyone has any idea about this behaviour?

    Thanks

    Paola

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    1

    Re: XHTML crashes browser

    If you would check your xhtml in a validator, you would easily see that you have the <html> tag missing at the beginning of the document, which IMHO is probably the cause for this bug.
    A good validator would be http://validator.w3.org/
    Just feed it your file in it will spout out all the incorrections in you html.

    Yeci-Hell.

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    7

    Re: XHTML crashes browser

    I've put the missing <html> tag and checked my document with the validator you suggested and it was actually valid XHTML.
    I've also changed the <form> method attribute value to "get" and the situation seem to be more stable.

    Thanks

  4. #4
    Regular Contributor
    Join Date
    Jun 2004
    Location
    Hong Kong
    Posts
    59

    Re: XHTML crashes browser

    I used the following DOCTYPE to replaced XHTML Mobile, it works fine.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    7

    Re: XHTML crashes browser

    That's an idea, but are sure that XHTML Transitional DTD is supported by the mobile browser?

  6. #6
    Regular Contributor
    Join Date
    Jun 2004
    Location
    Hong Kong
    Posts
    59

    Re: XHTML crashes browser

    I sure that is.... most. Cheers!

Similar Threads

  1. which Mobile Browser Simulater can show Chinese (xhtml)
    By hukaiming in forum Browsing and Mark-ups
    Replies: 3
    Last Post: 2005-12-03, 03:50
  2. Browser Emulator - xhtml rendered as text
    By papasosa in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2004-05-11, 16:38
  3. XHTML support in 7650 browser
    By anantakinchan in forum Symbian
    Replies: 0
    Last Post: 2003-07-22, 07:27
  4. N3650 crashes on XHTML
    By semljire in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2003-03-31, 13:25

Posting Permissions

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