Page 1 of 1

changing text and pictures with php

Posted: Fri Jul 25, 2003 9:18 pm
by psychotomus
heres what i want to do, i got a listbox, part of a form. when a user clicks on an item in the listbox, i want to display a picture to the right of it, and text below it. overwriting the picture and text that was there befor the user clicked on a new item.

Posted: Fri Jul 25, 2003 10:14 pm
by ChibiGuy
I think what you're asking for is Javascript. So I'd suggest posting in a javascript area. :idea:

Posted: Sat Jul 26, 2003 12:01 am
by psychotomus
i know it can be done in javascript, i was wondering if it could be done in php

Posted: Sat Jul 26, 2003 12:09 am
by ChibiGuy
I guess so, u can use the onClick=form.submit() in javascript to submit the form and in the php part you can print the image in respect to what the user clicked.


But why would u want to, as Javascript offers a simple solution.

Posted: Sat Jul 26, 2003 3:41 am
by patrikG
i know it can be done in javascript, i was wondering if it could be done in php
Sure it can. You'd have to submit a form for that though.