NetTalk Central

Author Topic: Session countdown timer and frames  (Read 4870 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Session countdown timer and frames
« on: November 10, 2012, 09:28:17 PM »
Bruce,
    
     I moved the session countdown timer to my left frame, which contains my TaskPanel Menu system.  It counts down properly but there are two issues.

1.  When the counter times out, I retun to the LoginForm but it is not in a frame.  I set the target frame to my 'left_frame' but that did not achieve the desired result.  

2.  When I select menu items, the timer is not reset.  It only resets when I expand or contract a menu item.  I tried moving the timer script code from the process embed to other embeds but still no good.

Can you suggest a solution....by the way I want to stay with frames here, not ready to convert just yet.

Thanks,

Jeff
« Last Edit: November 11, 2012, 12:48:11 PM by kingja »

Matthew

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • Email
Re: Session countdown timer and frames
« Reply #1 on: November 11, 2012, 11:37:41 PM »
Hello kingja

Try this:
p_web.Script('top.frames.left_frame.location.reload(true)') - this will refresh your frame and also refresh countdown timer. Just add this instruction in properly place.

Regards,
Matthew

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Session countdown timer and frames
« Reply #2 on: November 12, 2012, 09:34:12 AM »
Matthew,

Thanks but I have not had much success with this technique.  I get a message about the ..."web browser needs to resend the information..." and then the left frame is replaced with a standard web error message.

When a menu section is expanded or contracted, the timer is reset.  When I select a menu item in an expanded section, I would expect the timer to reset again.  It does not.  Perhaps Bruce can offer a suggestion on how to make this work when selecting a menu item.

I have tried to convert this app to one without frames but had problems.  Guess I'll try again.

Thanks,

Jeff

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Session countdown timer and frames
« Reply #3 on: November 12, 2012, 06:35:21 PM »
Bruce,

     I decided to finally make the move to a non-frame app.  I first created a new app with the server app wizard, letting it generate everything except browses and forms.  I then copied my browses and forms from the frame-based app.  I had quite a bit of success with this approach.  
     There is one problem however.  The browses fill the entire width of the open app, overlapping the menu on the left and have a very wide header row.  Please see the attached image.  The forms work as they should.  I'm using IE9 and find that if I go to compatability mode, they then fit as expected.  If I use FireFox, the browses are also too big here.
     Seems to me the CSS is not bering applied properly here.  Can you suggest some things to check?

Amendment:  I forgot to mention that I first call a form that has two tabs on it.  Form tab one has the browse, tab two is not currently used.  Thus it seems it is the form page that extends the entire width.  Again, I think I don't have the right CSS applied to this form that contains the browse.

Thanks,

Jeff

[attachment deleted by admin]
« Last Edit: November 12, 2012, 06:57:06 PM by kingja »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Session countdown timer and frames
« Reply #4 on: November 12, 2012, 09:09:34 PM »
Hi Jeff,

not sure if you read this doc?
http://www.capesoft.com/docs/NetTalk6/NetWebTasks.htm#ConvertFrames

This has some CSS tips for the layout you want - specifically step 4 of the Header procedure.

cheers
Bruce

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Session countdown timer and frames
« Reply #5 on: November 13, 2012, 09:58:12 AM »
Bruce,

     I had seen that document but because I created a brand new app I assumed the menu and its css would be already determined properly.  Looking at this new app I see that the menu css was set as 'nt-menuleft'.  So I changed it to 'nt-left', but it had no effect on my issue.
     After a lot of trial and error I found that on forms, replacing 'fdiv' with 'adiv' solved the problem.
     Now just one problem remains.  If I call the NetWebForm procedures as Pop-Ups, they opem as a blank window, with just the "action" in the title bar (ie. change or insert).  No fields, prompts, comments, etc.  Any ideas here?
     Note that this is a brand new template generated app, in which I imported just the browses and forms from my old frame based app. 

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Session countdown timer and frames
« Reply #6 on: November 13, 2012, 10:03:29 PM »
Hi Jeff,

the fact that your forms were still using fdiv makes me think you've carried them forwards from NT4? Ideally the forms should be using the global style settings, at least most of the time. But that's maybe a thought for another day.

If a popup does not populate, it usually means you have invalid xhtml on the page. ie somewhere you have ticked on "allow xHtml" but then your code is not valid xHtml.

This is easy to see in the firebug console (run firefox, with firebug www.getfirebug.com and go to the console tab.)

cheers
Bruce