Jump to content

Can't make link go to top


kvnirvana

Recommended Posts

I’ve got this page called index.php

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>SearchCare</TITLE>
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>

</HEAD>

<BODY >
<DIV style="position:absolute;left:0px;top:0px;width:100%;height:100%;z-index:1" align="left">
<TABLE width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<img src="sea.jpg" width="1259" height="170" />

</TABLE></DIV>


<DIV style="position:absolute;center:0px;top:143px;width:100%;height:100%;z-index:1" align="left">
<TABLE  width="100%" height="100%" border="0" cellpadding="0" cellspacing="1">
<TR>
<TD align="left" valign="top" width="122" height="100%"><B><A href="forside.php" target="kasp"><font style="font-size:18px" face="Arial" color="#000000">Forside</B></FONT></TD>
<TD align="left" valign="top" width="122" height="100%"><B><A href="igen.php" target="kasp"><font style="font-size:18px" face="Arial" color="#000000">Søgning</A></B></FONT></TD>
<TD align="left" valign="top" width="160" height="100%"><B><A href="perfekt.php" target="kasp"><font style="font-size:18px" face="Arial" color="#000000">Bedøm behandler</B></FONT></TD>
<TD align="left" valign="top" width="122" height="100%"><B><A href="ordbog.php" target="kasp"><font style="font-size:18px" face="Arial" color="#000000">Ordbog</B></FONT></TD>

<TD align="left" valign="top" width="122" height="100%"><B><A href="forum.php" target="kasp"><font style="font-size:18px" face="Arial" color="#000000">Blog</B></FONT></TD>
<TD align="left" valign="top" width="122" height="100%"><B><A href="kontakt.php" target="kasp"><font style="font-size:18px" face="Arial" color="#000000">Kontakt</B></FONT></TD>
</TR>
</TABLE></DIV>
<DIV style="position:absolute;center:0px;top:165px;width:100%;height:100%;z-index:1" align="left"><TABLE width="100%" height="100%" border="0" cellpadding="0" cellspacing="1"><TR><TD align="left" valign="top" width="100%" height="40"><FONT style="font-size:16px" color="#000000" face="Arial"><B><hr></B></FONT></TD></TR></TABLE></DIV>

<iframe width="100%" id="the_iframe" name="kasp" onLoad="calcHeight();" style="position:absolute;center:1px;top:175px;z-index:2" src="forside.php" scrolling="NO" frameborder="0" height="1"> iframe capable browser is required to view this web site.</iframe>

</BODY>
</HTML>

 

This is the page called ordbog.php

 

<?php require('_drawrating.php'); ?>


<html>


<head>
<link rel="stylesheet" type="text/css" href="noi.css" />
</head>

<body><p>
kjkjkjkj
</p>

<p style='font-family:verdana;font-size:150%;'>

<a  href="?by=A">A</a> | <a  href="?by=B">B</a> | <a  href="?by=C">C</a> |<a  href="?by=D">D</a> | <a  href="?by=E">E</a> | <a  href="?by=F">F</a>| <a  href="?by=G">G</a> | <a  href="?by=H">H</a> |<a  href="?by=I">I</a> | <a  href="?by=J">J</a> | <a  href="?by=K">K</a>| <a  href="?by=L">L</a> | <a  href="?by=M">M</a> |<a  href="?by=N">N</a> | <a  href="?by=O">O</a> | <a  href="?by=P">P</a>| <a  href="?by=Q">Q</a> | <a  href="?by=R">R</a> |<a  href="?by=S">S</a> | <a  href="?by=T">T</a> | <a  href="?by=U">U</a>| <a  href="?by=V">V</a> | <a  href="?by=W">W</a> |<a  href="?by=X">X</a> | <a  href="?by=Y">Y</a> | <a  href="?by=Z">Z</a>| <a  href="?by=Æ">Æ</a> | <a  href="?by=Ø">Ø</a> |<a  href="?by=Å">Å</a> 
</p>



</body>
</html>


<?php

if(isset($_GET['by'])){
$letter=$_GET['by'];
//connect  to the database
$db=mysql_connect  ("localhost", "****",  "****") or die ('I cannot connect to the database  because: ' . mysql_error());
//-select  the database to use
$mydb=mysql_select_db("*****");
//-query  the database table
$sql="SELECT  * FROM fagudtryk WHERE latinsk LIKE '$letter%'";
//-run  the query against the mysql query function
$result=mysql_query($sql);
//-count  results
$numrows=mysql_num_rows($result);
echo  "</p>";
//-create  while loop and loop through result set
while($row=mysql_fetch_array($result)){
$latinsk  =$row['latinsk'];
$ID  =$row['id'];            
//-display  the result of the array
echo  "<ul>\n";
echo  "<li>" . "<p style='font-family:verdana;font-size:150%;'><a  href=\"search.php?id=$ID&latinsk=$latinsk#start\">"   .$latinsk . " </a></li>\n</p>";
echo  "</ul>";
}
}


?>




 

When the user clicks on the link <a href=\"search.php?id=$ID&latinsk=$latinsk\"> "  .$latinsk . " </a>

It show a new page called search.php. But if the link is at the bottom of the page the new window just stays at the bottom instead of going to the top of the website which is the image sea.jpg on the page called index.php.

Link to comment
Share on other sites

The problem is that the page ordbog.php opens in an Iframe. I can make the link when clicked go to the top of the Iframe by putting an anchor on the top of ordbog.php, but I want it to go to the top of the website which is the on the index.php. When I try to put an anchor on the index page it wont work.

Hope I've made myself clear :=)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.