troubleshooting Question

if-else in body tag...

Avatar of fskilnik
fskilnikFlag for Brazil asked on
JavaScriptASPHTML
25 Comments3 Solutions1709 ViewsLast Modified:
Hi there!

To avoid reaching server´s "idle" time, every 4min (without the user´s action) a javascript routine "refreshes" the page this (logged in) user is, so that he/she will not need to re-login. This works as expected.

My problem: some specific pages (where there are videos to be seen) should NOT be refreshed (ever), and I thought I could create something like this:

<% If "there-is-video-in-this-page" Then %>
  <body>
 <% Else %>
  <body onLoad="timeout_routine();">
<% End If %>  

But it seems as the onLoad attribute is happening with or without the existence of videos. The conditional "there-is-video-in-this-page" works as expected in other parts of the code, by the way...

Could you please explain to me why it does not work as expected and, of course, how to fix that?

Thanks a lot,
fskilnik
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 3 Answers and 25 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 25 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros