reload my php page on an event

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

mienneke
New php-forum User
New php-forum User
Posts: 8
Joined: Mon Apr 07, 2003 3:55 am
Contact:

reload my php page on an event

Postby mienneke » Wed Apr 16, 2003 8:07 am

hey,

i would like to reload my page on an event.
i have a select box filled with the names of teachers:

<select name=teacher>
<option value= "">-------Select-------</option>
<?for ($y=0;$y<$count2;$y++){?>
<option value=<? echo $doc_id[$y];?>><?echo $teachername[$y];> </option>
<?}?>
</select>

if the user choses his teacher, his abriviation has to come automatically in the cell next to the select box.
so i thought, when the selectbox changes, the site must be reloaded or redirected to an other page that gets the abriviation from the databank and sends it to my teacherspage.

can you make eventfunctions with php?

i tried to explain my problem and i hope you understand what i mean ... thank you !!!

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Event

Postby ruturajv » Wed Apr 16, 2003 9:57 am

THe event you want for select is onChange()
Here you can call a function

Code: Select all

onChange('functionname();')

But you have to use javascript, with PHP


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 4 guests