NetTalk Central

Author Topic: NetWebSource - suppress opening and closing DIV tags?  (Read 3241 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 342
    • View Profile
    • Email
NetWebSource - suppress opening and closing DIV tags?
« on: March 27, 2016, 03:19:48 AM »
Hi,

Is it possible to have a header and a footer without the DIV tags opening and closing

I have created a Source procedure as below, which a stripped down version without the
calls to DivHeader and DivFooter. eg.
p_web.DivHeader(loc:divname,Choose(p_web.IsMobile(),'',''),,,,1)
 p_web.DivFooter(,lower('PageHeaderTag_div'))


But it does not insert the HTML


TVC_Header           PROCEDURE  (NetWebServerWorker p_web) ! Declare Procedure

loc:divname           string(252)
loc:parent            string(252)  ! should always be a lower-case string

packet                  StringTheory
timer                   long
loc:options             StringTheory ! options for jQuery calls


  CODE

  GlobalErrors.SetProcedureName('TVC_Header')
 
  packet.append(p_web.AsciiToUTF(|
    '<<!-- Net:f:tvc_header.htm --><13,10>'&|
    '',net:OnlyIfUTF,net:StoreAsAscii))
  do SendPacket
  GlobalErrors.SetProcedureName()
  Return

SendPacket  routine
  p_web.ParseHTML(packet,1,0,NET:NoHeader)
  packet.SetValue('')




thanks

Johan

JohanR

  • Sr. Member
  • ****
  • Posts: 342
    • View Profile
    • Email
Re: NetWebSource - suppress opening and closing DIV tags?
« Reply #1 on: March 27, 2016, 04:15:08 AM »


Hi,

Ok, got something working

I added the code and created a return statement early to exit the procedure.

thanks

Johan

ramiro

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Email
Re: NetWebSource - suppress opening and closing DIV tags?
« Reply #2 on: June 20, 2016, 12:52:20 PM »
Hello

excuse me for botherinig you, but how in the world did you make it work i do not comprehend which code did you added and where did you put the return tag?

Ramiro

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: NetWebSource - suppress opening and closing DIV tags?
« Reply #3 on: June 20, 2016, 11:52:34 PM »
I've added a switch to 9.12 to allow this.

Bruce

JohanR

  • Sr. Member
  • ****
  • Posts: 342
    • View Profile
    • Email
Re: NetWebSource - suppress opening and closing DIV tags?
« Reply #4 on: June 21, 2016, 12:43:13 AM »


Hi Bruce

thank you!

much appreciated.

Johan