Solved

Display title of Page ASAP using Document.title

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Open dialog with server side controls in it 3 46
Opening a new tab in IE using Powershell / HTML 2 45
Use Mid in Html 6 21
Add a little space on either side of a table. 12 25
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

762 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