Solved

Display title of Page ASAP using Document.title

Posted on 2001-07-26
4
225 Views
Last Modified: 2012-06-21
Greetings All;
I am opening a new window using DEWindow.Open

The next window, onload, should display a Document.Title and some page.innertext as soon as possible.

The problem is, I have more script in the page that also needs to run.  What happens is, the window opens fine (without a toolbar and such), but the document.title still has the refering page rather than the value I have called from a common.vbs file and the page.innertext are not displayed until after the page has completely executed it's script.  

Restrictions:
I must use VBSCript to generate the document.title and page.innertext from common.vbs (which I can do, msgboxes confirm i am retrieving the values at the right time).

I cannot program this in the previous (Calling) page.

Possible Solutions tried and failed:
Placing this in a seperate vbscript block at the beggining of the page
Using window_unload function to call this function, then the rest of the script as another function

Any help anyone could provide would be greatly appreciated.

Thanks

0
Comment
Question by:pclaypool
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
a.marsh earned 200 total points
ID: 6324953
What about using a frameset with a hidden frame?

The frameset will load and display the title and then simply load the document (that is currently loaded) in to the "visible" frame.

:o)

Ant
0
 
LVL 10

Expert Comment

by:dij8
ID: 6329604
>>> Placing this in a seperate vbscript block at the beggining of the page

Is that before or after the <body> tag?  Have you tried both?  Immediately after the <body> tag will be the first thing the page generates (sort of).  Code is run in the order of serverside includes, serverside script, clientside script, HTML.  Can you not just have the function called immediately after it is written:
<script language="VBScript">
sub yoursub
  the stuff you do
end sub
yoursub
sub othersubs
  other subs that can be dealt with later.
end othersubs
</script>

>>> msgboxes confirm i am retrieving the values at the right time

Can you not replace the msgbox with just calling the necessary function?
0
 
LVL 1

Author Comment

by:pclaypool
ID: 6329715
for a.marsh,
Thanks for the comment.  I tried this (using framesets) and the same behavoir happened.  This causes me to think that either the call to common.vbs for the page.innertext and the docuent.title is very slow or there is a problem with the layout of my HTML.  I had to change it back, since this is starting to become a Production system.  

I will try dij8's comments to determine how this works.

here's some of the code:

server side script
<HTML>
   <HEAD>
      <TITLE></TITLE>
   </HEAD>
   <BODY>
      <P id="pageText"></P>
   </BODY>
<script language=VBscript>
load the xml
 'Write out the Page Title and Page text of the HTML w/ Lang Support
   document.title = nodeListReportParam.item(0).childnodes.item(6).text
   pageText.innertext = nodeListReportParam.item(0).childnodes.item(7).text
</Script>

<Script language=VBSCript>
another client side script block
</script>

THe way this works now, a user would need to wait for the entire xml to be returned before the page.innertext and document.title would be displayed.  

I have tried calling page.innertext and document.title from common.vbs, which has a function that calls the database and populates an xml string based on the screen ID we have defined.  What this essentialy does is take the two childnodes for page.innertext and document.title out of a "possibly" huge xml string and gives me another xml document that has exactly what I need, right away.  Problem is, even though I have it, the information isn't being displayed untill the second client side script block is finished running.

Thanks again for all your help
0
 
LVL 1

Author Comment

by:pclaypool
ID: 6336221
Frameset seems to have worked along w/ taking out the call for common.vbs (for document.title and page.innertext)

Thanx
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Check input text, Number 7 55
Can't Find the Homepage on my site 4 47
Presenting my portfolio on the web? 11 53
Pass a js value to an html form 5 43
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question