Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 05-09-2007, 07:16 AM   #1 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Posts: 503

Syphanx is on a distinguished road

Default 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 07:18 AM.
Syphanx is offline  
Old 05-09-2007, 11:46 AM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default 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.
jaeusm is offline  
Old 05-10-2007, 02:39 AM   #3 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Posts: 503

Syphanx is on a distinguished road

Default 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)
Syphanx is offline  
Old 05-10-2007, 09:55 AM   #4 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: PHP code needed

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
jaeusm is offline  
Old 05-14-2007, 01:16 PM   #5 (permalink)
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default 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 View Post
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.
__________________
Vormund is offline  
Old 05-14-2007, 04:27 PM   #6 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default 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.
jaeusm is offline  
Old 05-14-2007, 04:34 PM   #7 (permalink)
 
Junior Techie

Join Date: Apr 2007

Location: Dublin, Ireland

Posts: 48

SirMille is on a distinguished road

Default 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.
SirMille is offline  
Old 05-15-2007, 04:03 PM   #8 (permalink)
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default Re: PHP code needed

Quote:
Originally Posted by SirMille View Post
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 04:06 PM.
Vormund is offline  
 
Closed Thread

Thread Tools
Display Modes

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
NEED help with a Javascript code...(mouseover and stuff) Quintox Web Graphics, Design, Digital Images 7 05-02-2007 06:41 PM
PHP redirecting mil1243 Programming Discussions 4 04-30-2007 04:45 PM
PHP 2-player game? thejeremy Programming Discussions 4 04-09-2007 06:01 PM
Remote file access w/ IP + PHP? thejeremy Programming Discussions 2 04-04-2007 05:24 PM
JavaScript Botnet Code Leaked To Internet Osiris Virus - Spyware Protection / Detection 0 04-02-2007 09:05 PM