Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old August 2nd, 2006, 12:47 AM   #1
New Member
 

Join Date: May 2006
Location: S.Australia
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Kymberly is on a distinguished road
'Return to top' trouble?

I am using this to allow a page to 'return to top' by clicking a link.
It was working and now it isn't. I wonder if someone can help me?
This is the first lot of php
<?php
$VegetableReturn = <<<VEG
<tr class="PlainLink">
<td></td>
<td>
<a href="#Vegetables">
<img src="Images/veg/47270289.jpg" alt=""
style="float: left; margin: 10px;">
<br><small>Top of<br>Vegetables</small>
</a>
</td>
<td></td>
</tr>\n
VEG;

$FruitReturn = <<<FRUIT
<tr class="PlainLink">
<td></td>
<td>
<a href="#Fruit">
<img src="Images/veg/47270289.jpg" alt=""
style="float: left; margin: 10px;">
<br><small>Top of<br>Fruit</small>
</a>
</td>
<td></td>
</tr>\n
FRUIT;
?>


This is the php that is spread intermittently through out the page.
<?php print($VegetableReturn); ?>




Last edited by Kymberly; August 2nd, 2006 at 06:25 AM..
Kymberly is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 2nd, 2006, 04:34 PM   #2
Most Reputable Member
 

Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,307
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ukgeoff has a spectacular aura about ukgeoff has a spectacular aura about
Re: 'Return to top' trouble?

If I understand you correctly, $VegetableReturn is what you are print around the page a a link back to the top.

If so, this will never happen at the moment because this variable does not contain any html that a browser can interpit as a link.

You need to have your variable contain something like:
Code:
<a href=#top>Top of page</a>
and then you need an anchor at the top of the page.

Remember that any id can be used as an anchor.

ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 2nd, 2006, 08:25 PM   #3
New Member
 

Join Date: May 2006
Location: S.Australia
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Kymberly is on a distinguished road
Re: 'Return to top' trouble?

Thanks for that.
Kymberly is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 3rd, 2006, 11:49 AM   #4
Reputable Member
 
craig's Avatar
 

Join Date: Sep 2005
Location: Preston, UK
Age: 23
Posts: 382
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 craig will become famous soon enough
Re: 'Return to top' trouble?

also if you have an anchor that isnt actually specified, when you click on it, it will go to the top of the page.
Sometimes people have a problem with the top function not going all the way to the top, so you should simply define a tag which doesn't exist
craig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
return , top , trouble


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Return column names in SQL using PHP nate2099 Databases 7 December 21st, 2007 10:57 AM
The Return of Basic HTML??? ScottR The Café 0 August 8th, 2007 09:38 AM
ASP ADO Connection to return XML from SQL Proc NickyJ Classic ASP 2 August 11th, 2005 07:39 AM
return from db benbramz Classic ASP 5 June 19th, 2005 02:29 PM
Return to previously viewed screen Imara96 Flash and ActionScript 5 April 23rd, 2005 06:18 PM


Search Engine Optimization by vBSEO 3.2.0 RC8