NetTalk Central

Author Topic: XHTML Tags Automatically Closed  (Read 4915 times)

nanabite

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
XHTML Tags Automatically Closed
« on: December 17, 2008, 09:04:26 PM »
Hi All,

I am trying to apply our site's default style to a NetTalk application and have run into a hurdle. I am including a "header" and a "footer" file in the PageHeaderTag and PageFooterTag's respective Web Borders (please let me know if there is a more elegant way to do this).

The problem I have though is that I want to span a DIV element across the form content, but it is always being closed before presentation.

For example:

Header file:

<div id="wrapper">
<div id="header">
 <!-- Header Content -->
</div>

Footer file:

<div id="footer">
  <!-- Footer Content -->
</div>
</div>

Final output:

<div id="wrapper">
<div id="header">
 <!-- Header Content -->
</div>
</div>

<div id="footer">
  <!-- Footer Content -->
</div>
</div>

Any help would be greatly appreciated.

- Adam

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: XHTML Tags Automatically Closed
« Reply #1 on: December 17, 2008, 11:36:55 PM »
Hi Adam,

I think you'll need to post a small example, If you are adding your own open-div then it certainly wouldn't "automatically" close it for you.

Cheers
Bruce

nanabite

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: XHTML Tags Automatically Closed
« Reply #2 on: December 18, 2008, 01:41:15 PM »
Hi Bruce,

In my WebServer procedure I have the NetTalk extension configured to use '<!-- Net:PageHeaderTag -->' as the "Generic Page Header Tag" and '<!-- Net:PageFooterTag -->' as the "Generic Page Footer Tag".

My PageHeaderTag procedure's NetTalk Web Border Extension then has the following XHTML in it:

Code: [Select]
<!-- Net:f:custom/template/PageHeader.html -->
Besides the Web Border Extension, there is only a Web Menu Extension and WinEvent Alert Windows Messages extension included in the PageHeaderTag.

The contents of PageHeader.html:

Code: [Select]
<div class="wrap">
<div id="header">
<div id="logo-graphic">
<h1><!-- SNIP --></h2>
</div>
</div>
<div id="mbar">
<div id="navmenu"><!-- SNIP --></div>
</div>
<div class="clear">&nbsp;</div>

(Please note, I have tried both including a file and putting it directly into the XHTML text area in the extension, however I am using the include because it is easier to maintain.)

My PageFooterTag procedure's NetTalk Web Border Extension then has the following XHTML in it:

Code: [Select]
<!-- Net:f:custom/template/PageFooter.html -->
The contents of PageFooter.html:

Code: [Select]
<div id="footer">
<div class="ftr-right">&nbsp;</div>
<div class="ftr-left">&nbsp;</div>
<p><!-- SNIP --></p>
</div>
</div>

Finally, when I Make and Run my application and access it using Firefox or Internet Explorer, the output looks like this (The </div> that shouldn't be there in just above the <!-- NetTalk Web Menu Extension --> comment):

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<!-- SNIP -->
</head>
<body class="PageBody" onload="javascript:bodyOnLoad();" >
<div id="oPageHeaderTag2" class="">
<div class="wrap">
<div id="header">
<div id="logo-graphic">
<h1<!-- SNIP --></h1>
</div>
</div>
<div id="mbar">
<div id="navmenu"><!-- SNIP --></div>
</div>
<div class="clear">&nbsp;</div>

</div>

<!-- NetTalk Web Menu Extension -->
<!-- Other Rendered Content -->

  <div id="oPageFooterTag2" class="headingouter">
<div id="footer">
<div class="ftr-right">&nbsp;</div>
<div class="ftr-left">&nbsp;</div>
<p><!-- SNIP --></p>

</div>
</div>
</div>


<script>bodyOnLoad();</script>
</body>
</html>

If you need some more specific informationm, let me know.
« Last Edit: December 18, 2008, 01:44:04 PM by nanabite »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: XHTML Tags Automatically Closed
« Reply #3 on: December 18, 2008, 10:28:41 PM »
Hi Adam,

I appreciate the detailed info, but can't you rather just send me a small app example? It takes time to re-create an app from the description below, and there's no guarantee I'll do it exactly the way you did. If I then _don't_ get the same effect as you, then I'm left wondering if the bug is fixed, or I've done it differently...

Cheers
Bruce



ozejohn

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • Email
Re: XHTML Tags Automatically Closed
« Reply #4 on: December 18, 2008, 11:05:15 PM »
Hi Bruce,

Here is an example of the problem based on the Nettalk Web Server example 1 application.



[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: XHTML Tags Automatically Closed
« Reply #5 on: December 21, 2008, 10:18:17 AM »
Hi John / Adam,

In this example you are putting your header, and footer code inside the NetTalk web border extension.

This is already wrapping the header in 2 divs - if you browse to a page, and then right-click source, you'll see..

  <div id="oPageHeaderTag2" class="headingouter">
    <div id="iPageHeaderTag2" class="headinginner">

<div id="wrap">
<div id="header">
<h1>Example App Header</h1>

</div>
    </div>
  </div>


since your code contains an unmatched <div> there's gonna be a problem.

So I guess you should probably not use the "web border" extension, but rather move your html to the plain xHtml tab.

Cheers
Bruce