NetTalk Central

Author Topic: Refresh a browse in other frame, not the entire frame?  (Read 4818 times)

jorgemir

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Email
Refresh a browse in other frame, not the entire frame?
« on: May 07, 2011, 10:09:49 PM »
Hi. How can I acomplish this? I need to refresh a browse in other frame, but refreshing the entire frame is slow. What I really need is numbers and totals should be updated into the browse, but not reload it. Could it be done? If not, how I can get a fast frame reload? I see a delay of more than 10 seconds to get the frame completely reloaded.

Thanks
Jorge

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Refresh a browse in other frame, not the entire frame?
« Reply #1 on: May 08, 2011, 09:59:46 PM »
It's not easy to send an ajax request from one frame and get the reply added to another frame.
This is one reason I've moved away from frames in one of my apps - and it proved to be remarkably easy to do this.

cheers
Bruce

jorgemir

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Email
Re: Refresh a browse in other frame, not the entire frame?
« Reply #2 on: May 09, 2011, 11:07:48 AM »
Ok.. I need the basket everytime at sight. Using no frame behavior, is there is any way to keep this basket form always at one location on the screen as I do with a frame?
Thanks
Jorge

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Refresh a browse in other frame, not the entire frame?
« Reply #3 on: May 09, 2011, 08:53:39 PM »
sure, using CSS.

Without knowing where you want it to go it's hard to be more specific than that.
www.clarionshop.com for example keeps the "cart" stuff at the top-right of the screen in the header.

cheers
Bruce

jorgemir

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • Email
Re: Refresh a browse in other frame, not the entire frame?
« Reply #4 on: May 09, 2011, 11:11:09 PM »
You can see what I want at pollonet.es where the cart is always present at right. In clarionshop there is a menu with the number of items and buttons to show the cart. Is there is the posibility of showing the whole cart as in the frame at pollonet?
Thanks
Jorge

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Refresh a browse in other frame, not the entire frame?
« Reply #5 on: May 10, 2011, 01:00:13 AM »
Hi Jorge,

If you create a pageheader and pagefooter file (in your web folder) you can use a table to simulate the frame approach you have been using.

I've broken it down to be very rudimentary to demonstrate the technique

PAGEHEADER.HTM - should contain

<table>
<tr>
<td valign="top">


PAGEFOOTER.HTM - should contain

</td>
<td width="200" valign="top">
<!-- Net:f:ShoppingCart -->
</td>
</tr>
</table>


Place '<!-- Net:f:PageHeader.HTM -->' in the "Generic Page Header Tag" in your main nettalk object and '<!-- Net:f:PageFooter.HTM -->' in the "Generic Page Footer Tag".

This will load your header and footer at the right time on each page.

<!-- Net:f:ShoppingCart -->  -  means create a table of the contents of your shopping cart (or change the tag to match your existing procedure name). You'll notice the TD is set to 200pixels wide, modify this setting to suit your needs.

I might not have explained this exactly right but its the general approach. Using this technique you can make your nettalk app look very cool and just like mainstream web apps.

This example places the cart at the top right but it could equally be placed in other places. You could also do the formatting via CSS., but using a table like this is similar to using frames (in concept) so I choose this method for that reason.

Regards
Bill

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Refresh a browse in other frame, not the entire frame?
« Reply #6 on: May 10, 2011, 11:41:48 AM »
Hi Jorge,

Bill is right. One way to do it is to wrap the page in a table, creating something similar to frames.
However, there is another way.

If you look at the "menus" example, for example, it's fairly easy to make a "left hand menu" (which is still part of the header tag) and then have the browses and forms etc appear to the right of the menu. I'm doing this at the moment in a couple of apps. Sometime soon I'll write up the process.

Part of the reason I needed to do it was because the menus I'm using are somewhat dynamic. That is, I wanted to be able to change the text on some of the menus, depending on which browse (or indeed browse row) was selected.

Things are a bit hectic right now, but I'll try and write this up sometime soon.

cheers
Bruce