Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I hide only certain parts of a page

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
GB
Hello,

How can I hide only certain parts of a page ?

eg. when loading show text saying loading, then once it has loaded hide that text ?

at present I use this, but it hides my crystal rpeort aswell ?

<SCRIPT Language=Javascript>
function HideHourGlass(){

if (document.all(&quot;StatusIE&quot;)){
document.all(&quot;StatusIE&quot;).style.visibility = &quot;hidden&quot;;
}
}

</SCRIPT>

<BODY onLoad=&quot;HideHourGlass()&quot; bgcolor=&quot;#ffffff&quot; link=&quot;#c0c0c0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot;>
<Div ID=&quot;StatusIE&quot; ><LAYER>
<center> Generating Report, Please Wait... </center>
<CENTER><IMG style=&quot;WIDTH: 270px; HEIGHT: 4px&quot; height=4 alt=&quot;&quot; src=&quot;./knightrider.gif&quot; width=307 ></CENTER></LAYER></Div>
 
Cheers, but thats very similar to what I use now.
problem is it works apart from it also hides my crystal report, ( which isn't in the <Div id=&quot;hidepage&quot;> ).

do you know of any other ways of hiding text ?
 
OK, here's a Please Wait.. Loading that floats in the page.

Try this.. thread215-152691

ToddWW
 
thats pretty good, but still doens't work no my page ?


here is my full page, prolly make it easier for you to work out whats going on...


<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>
<title>A001</title>

<%

reportname = &quot;A001.01 Admissions Extract.rpt&quot;

%>

<SCRIPT Language=Javascript>
function HideHourGlass(){
szNavVersion = navigator.appVersion // Hide the 'retreiving records' display
if (szNavVersion.indexOf (&quot;4.&quot;) >= 0 || szNavVersion.indexOf (&quot;5.&quot;) >= 0) {
if (navigator.appName == &quot;Netscape&quot;){
document.layers[&quot;StatusText&quot;].visibility=&quot;hide&quot;
}else{
if (document.all(&quot;StatusIE&quot;)){
document.all(&quot;StatusIE&quot;).style.visibility = &quot;hidden&quot;;
}
}
}
}
</SCRIPT>
<BODY onLoad=&quot;HideHourGlass()&quot;>
<DIV ID=&quot;StatusIE&quot;><LAYER ID=&quot;StatusText&quot;><center>Generating Report, Please Wait... </center></LAYER></DIV>


<%

If Not IsObject (session(&quot;oApp&quot;)) Then
Set session(&quot;oApp&quot;) = Server.CreateObject(&quot;Crystal.CRPE.Application&quot;)
End If


Path = Request.ServerVariables(&quot;PATH_TRANSLATED&quot;)
While (Right(Path, 1) <> &quot;\&quot; And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend


If isObject(session(&quot;oRpt&quot;)) then
set session(&quot;oRpt&quot;) = nothing
End If

Set session(&quot;oRpt&quot;) = session(&quot;oApp&quot;).OpenReport(path & ReportName, 1)


Set oRptOptions = Session(&quot;oRpt&quot;).Options
oRptOptions.MorePrintEngineErrorMessages = 0
session(&quot;oRpt&quot;).DiscardSavedData
%>


<%

userid = &quot;ed&quot;
password = &quot;ed&quot;


'session(&quot;oRpt&quot;).MorePrintEngineErrorMessages = False
'session(&quot;oRpt&quot;).EnableParameterPrompting = False

' Set the location
set crtable = session(&quot;oRpt&quot;).Database.Tables.Item(1)
crtable.SetLogonInfo &quot;Holding&quot;, &quot;Holding&quot;, cstr(userid), cstr(password)

%>

<%

On Error Resume Next
session(&quot;oRpt&quot;).ReadRecords
If Err.Number <> 0 Then
Response.Write &quot;An Error has occured on the server in attempting to access the data source&quot;
Else

If IsObject(session(&quot;oPageEngine&quot;)) Then
set session(&quot;oPageEngine&quot;) = nothing
End If
set session(&quot;oPageEngine&quot;) = session(&quot;oRpt&quot;).PageEngine
End If

%>


<HTML>
<HEAD>
<TITLE>Seagate ActiveX Viewer</TITLE>
</HEAD>

<script>
parent.resizeTo(800, 600);
</script>




<input type=&quot;button&quot; value=&quot; Close Report &quot; OnClick=&quot;document.location='./Default.htm';return false;&quot; id=button1 name=button1>

<BODY BGCOLOR=C6C6C6 LANGUAGE=VBScript ONLOAD=&quot;Page_Initialize&quot;>

<OBJECT ID=&quot;CRViewer&quot;
CLASSID=&quot;CLSID:C4847596-972C-11D0-9567-00A0C9273C2A&quot;
WIDTH=100% HEIGHT=95%
CODEBASE=&quot;/viewer/activeXViewer/activexviewer.cab#Version=2,2,4,28&quot;>
<PARAM NAME=&quot;EnableRefreshButton&quot; VALUE=1>
<PARAM NAME=&quot;EnableGroupTree&quot; VALUE=1>
<PARAM NAME=&quot;DisplayGroupTree&quot; VALUE=1>
<PARAM NAME=&quot;EnablePrintButton&quot; VALUE=1>
<PARAM NAME=&quot;EnableExportButton&quot; VALUE=1>
<PARAM NAME=&quot;EnableDrillDown&quot; VALUE=1>
<PARAM NAME=&quot;EnableSearchControl&quot; VALUE=1>
<PARAM NAME=&quot;EnableAnimationControl&quot; VALUE=1>
<PARAM NAME=&quot;EnableZoomControl&quot; VALUE=1>
</OBJECT>

<SCRIPT LANGUAGE=&quot;VBScript&quot;>
<!--
Sub Page_Initialize
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject(&quot;WebReportBroker.WebReportBroker&quot;)
if ScriptEngineMajorVersion < 2 then
window.alert &quot;IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site.&quot;
CRViewer.ReportName =&quot;rptserver.asp&quot;
else
Dim webSource
Set webSource = CreateObject(&quot;WebReportSource.WebReportSource&quot;)
webSource.ReportSource = webBroker
webSource.URL = &quot;rptserver.asp&quot;
webSource.PromptOnRefresh = True
CRViewer.ReportSource = webSource
end if
CRViewer.ViewReport
End Sub
-->
</SCRIPT>

</BODY>
</HTML>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top