NetTalk Central

Author Topic: To Frame or not to frame  (Read 5385 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1875
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
To Frame or not to frame
« on: March 04, 2014, 11:44:35 AM »
Hi, I know not to frame is better.
My site needs advertisment and I put it on a right frame, this allow me to choose what kind of advertisment depending on the user. (see image)
How can I do it without frames?
Thanks


[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: To Frame or not to frame
« Reply #1 on: March 05, 2014, 09:54:39 AM »
create a <div>, typically with class="nt-right"
NT7 has this facility built-in on the NetWebPage NetWebSource procedure.

cheers
Bruce
« Last Edit: March 05, 2014, 10:03:38 AM by Bruce »

Alberto

  • Hero Member
  • *****
  • Posts: 1875
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: To Frame or not to frame
« Reply #2 on: March 05, 2014, 09:56:45 AM »
But can I do that with browses and forms?
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: To Frame or not to frame
« Reply #3 on: March 05, 2014, 10:02:52 AM »
yes, because you make the <div> part of the _header_... the fact that it's on the right is incidental - if you make it part of the header procedure it can still appear on the right - just like some menus in the header appear on the left.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1875
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: To Frame or not to frame
« Reply #4 on: March 05, 2014, 10:58:04 AM »
ok, Ive tried with ex 2
I add a div at priority 500 in the PageHeaderTag proc

  p_web.DivHeader(loc:divname,Choose(p_web.IsMobile(),'',' ui-widget-header ui-corner-top'),,,' data-role="header"')
!----------- put your html code here -----------------------------------
! Start of "Processed Code"
    do SendPacket
  If (not p_web.IsMobile())
    Do pc
    do SendPacket
  End
  If (p_web.IsMobile())
    Do mob
    do SendPacket
  End

! [Priority 500]
  packet = clip(packet) & '<div class="nt-right"><!-- Net:f:PropGynecology_spa.html --></div>'
  do SendPacket

  p_web.ClearBrowse('PageHeaderTag')

and when NT generates a form it overrides the div.
see image please


[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: To Frame or not to frame
« Reply #5 on: March 05, 2014, 10:36:40 PM »
I suspect you need to add a specific width and height to your div. If you inspect it in FireBug I think you'll see the "div" is very small. Remember a div doesn't just "grow" to wrap around all it contains.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1875
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: To Frame or not to frame
« Reply #6 on: March 06, 2014, 02:49:22 AM »
Itried to add width and height...

    packet = clip(packet) & '<div id="id_prop" class="nt-right" style="width:10%;height=100%"><!-- Net:f:PropGynecology_spa.html --></div>'


with and withot style, and nothing...same result
You mean modify the NT DIvHeader width?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: To Frame or not to frame
« Reply #7 on: March 06, 2014, 09:50:18 PM »
experiment in firebug till you get what you want.

Alberto

  • Hero Member
  • *****
  • Posts: 1875
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: To Frame or not to frame
« Reply #8 on: March 07, 2014, 01:34:20 PM »
Ok, I got it but I dont know how to do it, didnt find any embed to do this.

I need to :
-add my div just before the </body> which close the <body class="PageBody"> of every page
-and modify the div class after PageBody class to be nt-left

Example of my code in bold font.

<html class=" no-js">
  <head>
    <body class="PageBody">
      <div class="nt-left" width="90%">
      <div id="menuwin_div">
      <div id="menu_div" class="chromemenu">
       </div>
   <div class="nt-right" width="10%">
    <br>
    wwwwwwwwww
    </div>
 </body>
</html>

How can I do it?
Thanks
« Last Edit: March 07, 2014, 01:41:32 PM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: To Frame or not to frame
« Reply #9 on: March 07, 2014, 08:55:03 PM »
Add new div via XHTML tab. Set CSS of other div using template settings.

Alberto

  • Hero Member
  • *****
  • Posts: 1875
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: To Frame or not to frame
« Reply #10 on: March 09, 2014, 04:25:29 AM »
Is there any XHTML tab for all the procs?
Or must I do it proc by proc?
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: To Frame or not to frame
« Reply #11 on: March 09, 2014, 05:18:54 AM »
if you are reusing xHTML then put it in a NetWebSource, and "add" that as a tag to the places where it needs to go. eg
<!-- Net:SomeSource -->

cheers
Bruce