Computers |
|
| | #1 (permalink) |
| Super Techie Join Date: Sep 2003
Posts: 496
| 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. |
| | |
| | #2 (permalink) | |
| Software Developer Join Date: Mar 2006 Location: Columbus, OH
Posts: 471
| Quote:
| |
| | |
| | #3 (permalink) |
| Super Techie Join Date: Sep 2003
Posts: 496
| 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) |
| | |
| | #4 (permalink) |
| Software Developer Join Date: Mar 2006 Location: Columbus, OH
Posts: 471
| JavaScript, not Java. They are two unrelated, different things. I don't use JavaScript because I don't like it. However, a quick Google search yielded these results: Dynamically Resizing Images - WebReference.com atom thoughts » Blog Archive » Resize Images with Javascript |
| | |
| | #5 (permalink) |
| Monster Techie | 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. ![]() 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.
__________________ |
| | |
| | #6 (permalink) | |
| Software Developer Join Date: Mar 2006 Location: Columbus, OH
Posts: 471
| Quote:
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. | |
| | |
| | #7 (permalink) |
| Junior Techie Join Date: Apr 2007 Location: Dublin, Ireland
Posts: 50
| 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.
__________________ Computer repair Dublin |
| | |
| | #8 (permalink) | |
| Monster Techie | Quote:
![]() @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 | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| NEED help with a Javascript code...(mouseover and stuff) | Quintox | Web Graphics, design, digital images | 7 | 05-02-2007 05:41 PM |
| PHP redirecting | mil1243 | Programming Discussions | 4 | 04-30-2007 03:45 PM |
| PHP 2-player game? | thejeremy | Programming Discussions | 4 | 04-09-2007 05:01 PM |
| Remote file access w/ IP + PHP? | thejeremy | Programming Discussions | 2 | 04-04-2007 04:24 PM |
| JavaScript Botnet Code Leaked To Internet | Osiris | Virus - Spyware Protection / Detection | 0 | 04-02-2007 08:05 PM |