Jump to content

[SOLVED] simple problem(i think)


thewooleymammoth

Recommended Posts

i have a page that i need to focus on the the image dynamcially

 

essentually the code is liek this

 


foreach ($list_of_images as $image)
{
$selectimage=$_GET['image'];
if ($image == $selectimage)
{
//i want the the page to automatically load with this at the top of the screen becuase there could potentially be a huge list of images and scrolling down each time gets annoying
echo " <img src='$image'><br>need page to focus here on load<br>";
}
else {
echo "<a href='image.php?image='$image'>other image titles<br>";
}
}

Ive been searching for a while and cant find the code or a tutorial  to do this, im not really interested in learning js but im told js is the best way to do this so if anyone can just tell me the code or something that would be AWESOME

 

an example of the page im trying to improve is

 

http://fatalinjury.org/[email protected]

 

notice the scrolling down the page is gets very annoying

 

Link to comment
https://forums.phpfreaks.com/topic/130680-solved-simple-problemi-think/
Share on other sites

foreach ($list_of_images as $image)
{
    $selectimage=$_GET['image'];
    if ($image == $selectimage)
    {
    //i want the the page to automatically load with this at the top of the screen becuase there could potentially be a hugelist  of  images and scrolling down each time gets annoying
    echo " <img src='$image' name='open'><br>need page to focus here on load<br>";
    }
else {
echo "<a href='image.php?image=$image#name=open'>other image titles<br>";
       }
}

 

so the code should look like this?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.