NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: markster on July 20, 2014, 04:30:25 PM

Title: Static HTML IndexPage
Post by: markster on July 20, 2014, 04:30:25 PM
I need help including a static HTML IndexPage. The code is contained in the \web folder in an HTM file with dedicated sub folders for the CSS styling/etc. I added the page as a URL, and it displays fine, but without any of my app's header, including the menu I'm using.

So I created a NetWebForm page and added the HTML code as an XHTML routine. This works fine except for the fact that about 1/3 of the page is missing at the bottom when it displays because the template variable containing the HTML text I pasted in is not large enough to hold it all. It gets truncated in the routine that I've created when it reaches this code call: packet.append(p_web.AsciiToUTF([mytext],net:OnlyIfUTF,net:StoreAsAscii))

Are there other options?

Thanks,

Mark
Title: Re: Static HTML IndexPage
Post by: kevin plummer on July 20, 2014, 11:58:11 PM
It's better to just reference the file using a NET tag (refer docs) <!-- Net:f:FileName -->
Title: Re: Static HTML IndexPage
Post by: alan on July 22, 2014, 05:29:16 PM
Here's an example of how I include an html indexpage in the procedure's xhtml routine - it works great:

<!-- Net:PageHeaderTag -->
<!-- Net:f:IndexPageQuestionnaire.htm -->
<!-- Net:PageFooterTag -->
Title: Re: Static HTML IndexPage
Post by: markster on July 23, 2014, 01:52:04 PM
Putting the Net:f tag in the XHTL routine box displayed the static page as the prior responses indicated. Thanks for that help! However because my particular page has references to external jquery scripts and the like, it did not display as it should. I'll keep fiddling with it.

Mark
Title: Re: Static HTML IndexPage
Post by: Bruce on July 23, 2014, 10:04:42 PM
you might find it easier to embed the header and footer directly onto a completely static html file.
to do this add this line as the very first line in the HTML file.

<!-- NetWebServer -->

and then at the appropriate place in the html

<!-- Net:PageHeaderTag -->


Cheers
Bruce