...

View Full Version : link not working right :-(



chump2877
07-18-2005, 04:41 PM
Can't figure out why I can't get the following link to advance to the next page, to the appropriate <div> on that page:



<a href="upload_image.php#monitor_files">Monitor/Delete Image Files</a>
And the <div> code in upload_image.php:


<div id="monitor_files">

<h2>Monitor/Delete Image Files:</h2>

</div>

The code works in Firefox, but not in IE......And both pages have been validated....

Can anyone see the problem?

Thanks.

_Aerospace_Eng_
07-18-2005, 05:04 PM
Use an anchor tag instead. I think that might be the problem. IE might only understand anchor tags that way.

<div id="monitor_files"><a name="monitor-files" id="monitor-files"></a>

<h2>Monitor/Delete Image Files:</h2>

</div>
Then your link

<a href="upload_image.php#monitor-files">Monitor/Delete Image Files</a>

chump2877
07-18-2005, 05:14 PM
I'm surprised, cause that makes sense, but that didn't do the trick......

Any other ideas?....

Thanks.

_Aerospace_Eng_
07-18-2005, 05:20 PM
Can you give us a link to your page please?

[m] at
07-18-2005, 05:41 PM
I'm surprised, cause that makes sense, but that didn't do the trick......

Any other ideas?....

Thanks.

Did you copy and paste from his post? You're using underscores, he used hyphens.

_Aerospace_Eng_
07-18-2005, 05:43 PM
yeah only because I can't use the same id twice so yeah.

chump2877
07-18-2005, 06:04 PM
Can you give us a link to your page please?


Well, I would, but this code is taken from the back-end of a web site that is still in production....and really only intended for prospective clients to see....

Do you need me to paste more context code? Remember, both pages are validated, so I can;t imagine what the problem is...

_Aerospace_Eng_
07-18-2005, 06:15 PM
I don't need the php code just the parsed html code of the file_upload.php page.

chump2877
07-19-2005, 01:14 AM
Thanks for this....here is the source code of upload_image.php:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html lang=en>

<head>


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


<title>Demo Site Admin</title>


<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">

<META NAME="ROBOTS" CONTENT="NOINDEX">




</head>


<body>


<div id="page_container">



<div id="top_div">

<p>WebUpdate v.1.1</p>

</div>



<div id="main_div">




<h2>Upload an Image File:</h2>

<form method="post" enctype="multipart/form-data" action="file_transfer.php" style="border:1px solid #999;width:570px;margin-left:auto;margin-right:auto">

<input type="hidden" name="MAX_FILE_SIZE" value="2000000">

<br>
<table border="0" cellpadding="0" width="100%">
<tr>
<td align="right" width="45%"><input type="file" name="upload[1]"></td>
<td width="10%"></td>
<td align="left" width="45%"><input type="file" name="upload[2]"></td>
</tr>
<tr>
<td align="right" width="45%"><input type="file" name="upload[3]"></td>
<td width="10%"></td>
<td align="left" width="45%"><input type="file" name="upload[4]"></td>
</tr>

<tr>
<td align="right" width="45%"><input type="file" name="upload[5]"></td>
<td width="10%"></td>
<td align="left" width="45%"><input type="file" name="upload[6]"></td>
</tr>
<tr>
<td align="right" width="45%"><input type="file" name="upload[7]"></td>
<td width="10%"></td>
<td align="left" width="45%"><input type="file" name="upload[8]"></td>
</tr>
<tr>
<td align="right" width="45%"><input type="file" name="upload[9]"></td>
<td width="10%"></td>
<td align="left" width="45%"><input type="file" name="upload[10]"></td>
</tr>
<tr>
<td align="right" width="45%"><input type="file" name="upload[11]"></td>

<td width="10%"></td>
<td align="left" width="45%"><input type="file" name="upload[12]"></td>
</tr>
</table>

<br><br><center><input type="submit" value="Submit"><input type="reset" value="Clear Form"></center>
<br>






<input type="hidden" name="mail_to" value="*****@******.com">
<input type="hidden" name="subject" value="File Transfer Confirmation">
<input type="hidden" name="receipt" value="******.shtml">


</form>



<br>
<br>






<a name="monitor-files" id="monitor-files"></a>


<h2>Monitor/Delete Image Files:</h2>






<center>
<table border="0" cellpadding="0" cellspacing="0" width="400">
<tr>
<td width="10"></td>
<td class="parts">



<div id="block5">
<div class="pad10">
<div class="overflow5">
<div class="padside">



<table border="0" cellspacing="1" cellpadding="8" width="100%" style="margin-bottom:10px;text-align:left">
<tr bgcolor="#666666">
<td width="92%"><b><font color="#FFFFFF" face="Palatino Linotype">File Name</font></b></td>
<td width="8%"><b><font color="#FFFFFF" face="Palatino Linotype"></font></b></td>
</tr>



<tr bgcolor="#CCCCCC">
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>desktop_system.jpg

</td>
</tr>
</table>

</td><td class="edit">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td style="text-align:justify"><a href="*******.php?ID=desktop_system.jpg" target="new" onClick='window.open("******.php?ID=desktop_system.jpg","","width=400,height=155,resizable=no,scrollbars=yes"); return false;'><img src="trash-can.gif" border="0" alt="Delete File"></a>
</td>
</tr>
</table>
</td>

</tr><tr bgcolor="#E5E5E5">
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>forest1.jpg

</td>
</tr>
</table>
</td><td class="edit">

<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td style="text-align:justify"><a href="*******.php?ID=forest1.jpg" target="new" onClick='window.open("*******.php?ID=forest1.jpg","","width=400,height=155,resizable=no,scrollbars=yes"); return false;'><img src="trash-can.gif" border="0" alt="Delete File"></a>
</td>
</tr>
</table>
</td>

</tr><tr bgcolor="#CCCCCC">

<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>nobilis_server.bmp

</td>
</tr>
</table>
</td><td class="edit">
<table border="0" cellspacing="0" cellpadding="0" width="100%">

<tr>
<td style="text-align:justify"><a href="********.php?ID=nobilis_server.bmp" target="new" onClick='window.open("*******.php?ID=nobilis_server.bmp","","width=400,height=155,resizable=no,scrollbars=yes"); return false;'><img src="trash-can.gif" border="0" alt="Delete File"></a>
</td>
</tr>
</table>
</td>

</tr>

</table>







</div>
</div>
</div>
</div>





</td>

<td width="10"></td>
</tr>
</table>
</center>




<p align="center" style="margin-top:30px"><a href="*******.php"><img src="arrow-back.jpg" border="0" alt=""></a><br><a href="*******.php" style="color:#000">Back to Admin interface.</a></p>





<p align="center" class="copyright"><a href="http://www.mediamogulsweb.com" target="blank">Copyright 2005 Media Moguls</a><br>

All rights reserved.</p>




</div>



</div>



</body>

</html>

_Aerospace_Eng_
07-19-2005, 01:18 AM
Okay instead this

<a name="monitor-files" id="monitor-files"></a>


<h2>Monitor/Delete Image Files:</h2>
Try this

<h2><a name="monitor-files" id="monitor-files">Monitor/Delete Image Files:</a></h2>
Now just to be sure, can we see the link you are using again? Where is this link located at? I don't see any real reason why this wouldn't work unless there isn't enough space for the h2 to be moved to, e.g. page content not enough.

chump2877
07-19-2005, 01:28 AM
Sigh, it's still not working.....

The link code is:


<a href="upload_image.php#monitor-files">Monitor/Delete Image Files</a>

And of course the link is located on another page... ;)


I don't see any real reason why this wouldn't work unless there isn't enough space for the h2 to be moved to, e.g. page content not enough.

There must be enough room, because it works in Firefox.....

Anyway, thanks for the help..

_Aerospace_Eng_
07-19-2005, 02:56 AM
After testing your code on my server, it works fine. :confused: See here (http://prdesignz.inraged-inc.com/test2.php) for yourself.

chump2877
07-19-2005, 07:43 AM
It does work...Did you change anything, do anything different?...it doesn;t look like it....

Could it be my CSS that's screwing my page up? hummmmmm

chump2877
07-19-2005, 08:03 AM
I changed the position of the <a name> statement, and it worked on my server.... :rolleyes:


<h2>Monitor/Delete Image Files:</h2>






<center>
<table border="0" cellpadding="0" cellspacing="0" width="400">
<tr>
<td width="10"></td>
<td class="parts">



<a name="monitor-files" id="monitor-files"></a>


<div id="block5">
<div class="pad10">
<div class="overflow5">
<div class="padside">

go figure....



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum