|  |
05-09-2007, 06:16 AM
|
#1 (permalink)
|
Ultra Techie Join Date: Sep 2003 Posts: 503 | PHP code needed Hey guys,
I am currently designing a website for a friend which i need a certain PHP code for and I can't really find it anywhere, im a bit of a noob with PHP and the stuff is fairly simple so bare with me.
With this site, It's like a gallery, what i need to do is there is a main picture up the top of the page and several smaller thumbnail sized pictures below. What the code needs to do is when you click on one of the thumbnails it enlarges it to the size of the larger photo without reloading the page.
So if anyone out there could lend me a hand it would be greatly appreciated, this is fairly urgent as I can't really progress any further on the website until this is completed.
Cheers.
__________________ Intel Core 2 Duo E6400 *Cooled with Thermaltake Mini-Typhoon* || Intel Quad Core Q6600
Gigabyte GA-965P-DS3
2gb Kingston 667 DDR2 RAM || 4gb Kingston 667Mhz DDR2 RAM
Gigabyte 512mb 8800GTS (683/2150)
250gb Seagate HDD (ATA133) 7200rpm/16mb cache || 750gb SATA2 Seagate HDD
ASUS MW221U 22" Widescreen 2ms.
Logitech Z-5500D 5.1 Speakers
Creative X-fi Xtreme Gamer Fatal1ty edition 3DMark06 Score = 8524 (1280x1024)
Last edited by Syphanx; 05-09-2007 at 06:18 AM.
|
| |
05-09-2007, 10:46 AM
|
#2 (permalink)
|
Software Developer Join Date: Mar 2006 Location: Columbus, OH Posts: 558 | Re: PHP code needed Quote: |
What the code needs to do is when you click on one of the thumbnails it enlarges it to the size of the larger photo without reloading the page.
| PHP runs server-side only, so if you don't want the page to reload, you'll have to use something else, like Javascript. |
| |
05-10-2007, 01:39 AM
|
#3 (permalink)
|
Ultra Techie Join Date: Sep 2003 Posts: 503 | Re: PHP code needed Ok and what would be the adaquate code using java?
__________________ Intel Core 2 Duo E6400 *Cooled with Thermaltake Mini-Typhoon* || Intel Quad Core Q6600
Gigabyte GA-965P-DS3
2gb Kingston 667 DDR2 RAM || 4gb Kingston 667Mhz DDR2 RAM
Gigabyte 512mb 8800GTS (683/2150)
250gb Seagate HDD (ATA133) 7200rpm/16mb cache || 750gb SATA2 Seagate HDD
ASUS MW221U 22" Widescreen 2ms.
Logitech Z-5500D 5.1 Speakers
Creative X-fi Xtreme Gamer Fatal1ty edition 3DMark06 Score = 8524 (1280x1024) |
| |
05-14-2007, 12:16 PM
|
#5 (permalink)
|
Monster Techie Join Date: May 2004 Location: Tucson, AZ, USA Posts: 1,183 | Re: PHP code needed There are many ways in which to do it... I'm not too sure on this, but you might be able to enclose the larger image in a div/span tag, and rewrite the contents with a javascript call (initiated by clicking one of the links), which would be very easy to implement.
Resizing - I would highly recommend doing this on the server, if you're dealing with larger pictures, using PHP or doing it prior to uploading the pictures to your server. You could make a fairly simple PHP script that runs on each image when the page is loaded, or one in which you manually run and it'll go through checking each and adjusting as needed.
If you have any code questions, let me know. Quote:
Originally Posted by jaeusm JavaScript, not Java. They are two unrelated, different things. | They are absolutely related - concepts, organization and coding style in each are very similar... just their purpose is a bit different. Java is more of a high level language designed to work on its own, whilst Javascript generally works in correlation with HTML.
__________________ |
| |
05-14-2007, 03:27 PM
|
#6 (permalink)
|
Software Developer Join Date: Mar 2006 Location: Columbus, OH Posts: 558 | Re: PHP code needed Quote: |
They are absolutely related - concepts, organization and coding style in each are very similar... just their purpose is a bit different.
| They are not related. JavaScript is a scripting language created by Netscape. Java is a set of technologies (including the Java programming language) created by Sun Microsystems. It is unfortunate that their names are similar.
Because the Java programming language and JavaScript share similarities in some concepts and syntax, it does not mean they are related. When someone substitutes the word 'Java' for 'JavaScript', it is quite likely that person does not know the difference between the two. In that case, it should be pointed out that JavaScript is not the same as Java, which is what I posted. |
| |
05-14-2007, 03:34 PM
|
#7 (permalink)
|
Junior Techie Join Date: Apr 2007 Location: Dublin, Ireland Posts: 48 | Re: PHP code needed Find a site that does what you want,
then use HTTrack to download the site and it's PHP.
Examine the PHP, learn from it, and give yourself the ability to create
your own new PHP. |
| |
05-15-2007, 03:03 PM
|
#8 (permalink)
|
Monster Techie Join Date: May 2004 Location: Tucson, AZ, USA Posts: 1,183 | Re: PHP code needed Quote:
Originally Posted by SirMille Find a site that does what you want,
then use HTTrack to download the site and it's PHP.
Examine the PHP, learn from it, and give yourself the ability to create
your own new PHP. | HTTrack can download (or recreate) the server-side scripting? I don't think so.
@jaeusm
Interesting...now that I didn't know. I (obliviously) assumed JavaScript was by the same folks at Sun, hah. While most of what you said is true, I must point out Google's first definition of related: being connected either logically or causally or by shared characteristics, hence they are are related, just like all programming languages are to some extent. But yes, I see your worthy point.
__________________
Last edited by Vormund; 05-15-2007 at 03:06 PM.
|
| |  | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | |