NetTalk Central

Author Topic: xHTML table freezes Browse  (Read 3423 times)

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
xHTML table freezes Browse
« on: October 12, 2012, 12:34:18 PM »
I wish to insert a HTML table  in the sub header of a NetWebBrowse. I checked on the Allow xHTML in sub-heading and entered a normal HTML table. Although the table appears, the browse is effectively dead. Navigation buttons no longer work, etc.  I modified and attached my View01 sample program to illustrate the problem. Compile the example as is and the browse will not work, remove the sub-header and then compile the browse works.  I have tried using the xHTML inserts instead of the sub-header text line, but got the same results. The problem maybe my HTML code,  but the browser do not seem to have any issue with the code. You can see the HTML table code in Firefox firefly or recompiling after  unchecking the “Allow xHTML” in the template.  Is there attribute that I should not use? I tried removing the   but that had no effect.

Thanks Rob Kolanko


[attachment deleted by admin]

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: xHTML table freezes Browse
« Reply #1 on: October 12, 2012, 02:29:23 PM »
Hi Rob,

The problem would normally be not xHTML compliant HTML.

If it displays at first but nothing else works after that, usually means the HTML is not xHTML compliant and therefore all the AJAX is broken and with broken AJAX nothing works until you go to another page.

Firefox and Firebug are best for this as in the Net section there is an XML option, so you can see your ajax. Chances are it will show you exactly what part of your HTML is the problem.

Like a question asked here yesterday an "&" in your data that may be generated into your HTML table will break it, etc.

Regards
Bill

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11266
    • View Profile
Re: xHTML table freezes Browse
« Reply #2 on: October 12, 2012, 11:18:51 PM »
Hi Rob,

ok, as you know the code you enter has to be valid xHtml. The "x" part means that it conforms to xml rules as well as html rules.

Broadly speaking this means 3 things;
a) <, >, & ' and " characters used inside a tag need to be encoded.

b) all opening tags must have matching closing tags. eg <br> is not allowed you must have <br /> or <br></br>

c) all attributes need to be in quotes. eg <table border=1> must be <table border="1">

In your case it's item number (c) which is letting you down.

As Bill says, running the page with the firebug console open (with xml errors option turned on) will highlight the errors.

cheers
Bruce




Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: xHTML table freezes Browse
« Reply #3 on: October 14, 2012, 07:00:46 PM »
Bruce and Bill, thank-you for your help. This fixed my problem and I have tools to detect such errors in the future.. Sorry I was taking my html editor too much for granted.
Rob