Solved

Display title of Page ASAP using Document.title

Posted on 2001-07-26
4
214 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I   ajax html table  rows? 20 64
Need to click button twice to get results 2 34
.php tree directory? 5 57
A form to still have contents even if some are wrong 10 47
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses how to create an extensible mechanism for linked drop downs.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now