473,379 Members | 1,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Why is interstitial page not loading when VB function is called?

I'm currently running a set of pages structured something like this:

1. QUERY FORM: user enters data and clicks 'Go'
2. DATA from FORM is stored in DB, then redirects to INTERSTITIAL page
3. INTERSTITIAL PAGE is loaded and calls VB function
VB function spits out data at intervals onto INTERSTITIAL page (progress bar)
4. When VB function is finished, it redirects to RESULTS page
5. RESULTS page appears
My problem currently is at step 3 where the INTERSTITIAL page never appears in the browser. It waits at the FORM page until the function is finished, then shows INTERSTITIAL page for a split second and finally goes straight to RESULTS.

I used fiddler and noticed that INTERSTITIAL page is called but no data is sent from the server (size=-1).

The INTERSTITIAL page is designed so that the call to the VB function is at the very end so the browser should load the page. The function has Response.Buffer set as False. This all used to work fine until recently. I rolled back to a previous which worked and now it fails as well.

INTERSTITIAL code:

Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
  2. <%
  3. response.Buffer = False
  4.  
  5. function myFunction()
  6. Dim PauseTime, Start
  7.  
  8. PauseTime = 3 'Set Duration
  9. Start = Timer 'Set start time
  10.  
  11. Do While Timer < Start + PauseTime
  12.   'nothing happening
  13. Loop
  14. response.Write("<script>$('p').html('1')</script>")
  15. End function
  16.  
  17. %>
  18.  
  19. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  20. <html xmlns="http://www.w3.org/1999/xhtml">
  21. <head>
  22. <script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
  23. </head>
  24.  
  25. <body>
  26. <p>0</p>
  27.  
  28. <% call myFunction %>
  29.  
  30. </body>
  31. </html>
  32.  
If anyone has any clues as to why this may be I would be greatly indebted.
Jan 19 '11 #1
4 2247
jhardman
3,406 Expert 2GB
It looks like despite unbufferring the script, it still is not sending the page until the script finishes. Try removing the function and just put that code inline at the end. If that resolves it I think I know what's wrong.

Jared
Jan 20 '11 #2
Placing the code inline isn't doing it.
Jan 20 '11 #3
jhardman
3,406 Expert 2GB
I guess I'm not too surprised. I've had very mixed results with the response buffer. I feel confident the page isn't being sent until the script finishes, but I can't tell why.

Have you considered sending the page whole and using javascript or ajax to chart your progress?

Jared
Jan 20 '11 #4
Yes I have. It's not the best process the one I have now but it worked at one point. It's an intermittent issue apparently so I guess it will have to do until I take the whole thing apart and put it back together in a different way.

Thanks for your help.
Jan 20 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Roger Withnell | last post by:
Tearing hair out time! Simple attached page shows the problem. http://www.brilley.co.uk/TestFocusSelect.htm Using a function to test if too many characters have been keyed in to a textarea....
4
by: anonymous | last post by:
Thanks your reply. The article I read is from www.hakin9.org/en/attachments/stackoverflow_en.pdf. And you're right. I don't know it very clearly. And that's why I want to understand it; for it's...
1
by: jam | last post by:
Dear all, I ask some question before and i got some idea, like background thread.... However, I still dun know how could i start implementing this, could someone help me on this and give me some...
6
by: MooreSmnith | last post by:
When I navigate to the next page using Response.Rediect("MyNextPage.aspx") current page Page_Load event is called. What I may wrongly understood is that post back will happen whenever there is any...
3
by: Bala | last post by:
Hi, In my page there is 4 dropdown list boxes.when page loading that time i am loading the nearly 3000 items array. so its taking too much time to load. is it other way fill up the dropdown...
3
by: HK guy | last post by:
How to write a program that can check the web page loading time? Before I have written a browser that use IE as the core, but it does not support frame. Since the documentcomplete event will...
5
by: Tudor Tihan | last post by:
Hi, This is my first post here, so please be kind. I have tryed to make a javascript html page loader by using an invisible <IFrame> and some javascript variable text passing between...
1
by: kelvinweb | last post by:
Hi All, How to calculate web page loading time on client and send back result to server side ? Urgent ! Thanks alot !
3
by: Prabhua | last post by:
Hi, can anyone solve my problem? i want to load or refresh the page from javascript function?how to do it? i.e., on click of anchor tag i am calling javascript function and after some manipulation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.