Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

next() function

Status
Not open for further replies.

trantron

Programmer
Joined
Feb 12, 2004
Messages
15
Location
US
I am a newbie so don't laugh.

I am looking for a link to show me how to navigate through a small array that holds links to as many as 8 pictures. This is for a real estate site.

You have probably seen it before. A next button and a previous button with a space in the center to hold the image.

I tried to do it with javascript, but it appears that you can not embed php with javascript.

Wiht this code:

p1.src = "./real_estate_jpg/<?php echo "$photo"; ?>"

the browser could read everything except what was in php. I played with it a bit and found that php would not work when between <script> tags.

If you know of any tutorials that could help me I would appreciate it. I have not been able to find anything on my own.

Thank you.
 
The first stumbling block you're going to run into is that PHP does not run on the client -- PHP runs on the server. PHP scripts cannot be invoked as a client-side scripting language.


Beyond that, I recommend that you begin with the PHP online manual

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I get it. That is why I can't embed the php there. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top