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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

length of a web page in pixels 1

Status
Not open for further replies.

dorling

Technical User
Mar 25, 2004
80
0
0
GB
is there a way of finding out how long a web page is in pixels???

i need this to be in a script on a page

thanks in advance

Jonathan D
 
Ahh, so you're asking us to get an [red]A[/red] for you?

*cLFlaVA
----------------------------
Breaking the habit...
 
no coz i do not get a mark as it is for the school web site

thanks in advance

Jonathan D
 
1. Your iframe tag:

[tt]<iframe id="myframe" src="page2.html" scrolling="no"></iframe>[/tt]

2. Put this between your [tt]<head></head>[/tt] tags:

[tt]<style type="text/css">
iframe {
height:expression(frames("myframe").document.body.scrollHeight);
}
</style>[/tt]

3. Change the question again, to something else.


:)

*cLFlaVA
----------------------------
Breaking the habit...
 


[red]Note:[/red] Think about how much time could have been saved had you, in your original question, stated your intent...

*cLFlaVA
----------------------------
Breaking the habit...
 
do i put all that code in page1.asp

thanks alot

thanks in advance

Jonathan D
 
Oh...man...

This should all go in the page that has the iframe in it. Not the actual page that is loaded into the iframe.








Anyone have some excedrin?

*cLFlaVA
----------------------------
Breaking the habit...
 
i create it work lovely. But there is an error on the page??

the error is

error.jpg




untitled.asp

Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
iframe {
    height:expression(frames("myframe").document.body.scrollHeight);
}
</style>

</head>

<body>

<iframe id="myframe" width="600" src="page2.asp" scrolling="no" frameborder="1"></iframe>

</body>
</html>

page2.asp

Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>


<p>ash;odj as[d</p>
<p> ad]=</p>
<p>s #fpsd</p>
<p> g le]dso,g </p>
<p>sed    </p>

</body>
</html>


thanks in advance

Jonathan D
 
Remove this line:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

Also, out of curiosity, what in the world is this:

<p>ash;odj as[d</p>
<p> ad]=</p>
<p>s #fpsd</p>
<p> g le]dso,g </p>
<p>sed </p>

*cLFlaVA
----------------------------
Breaking the habit...
 
i have Remove this line:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

but i still have the problem!! Any think else you can think of?

if you take out the lines below the error does not happen but you need this for it all to work!!

<style type="text/css">
iframe {
height:expression(frames("myframe").document.body.scrollHeight);
}
</style>




the lines you have curiosity over is just some text for me to test it with!

<p>ash;odj as[d</p>
<p> ad]=</p>
<p>s #fpsd</p>
<p> g le]dso,g </p>
<p>sed </p>

thanks in advance

Jonathan D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top