254018 Script to do stuff in a Form

Đang Thực Hiện Đã đăng vào Sep 26, 2008 Thanh toán khi bàn giao
Đang Thực Hiện Thanh toán khi bàn giao

Looking for a script that will change the values in a form based on a selection in a Drop down box or radio box.

So...

<select style="width:11em" name="custom sex">

<option value="[url removed, login to view]" size=1 SELECTED>Guy or Girl?</option>

<option value="Male">Male</option>

<option value="Female">Female</option>

</select>

IF Male = selected, then

<input type="hidden" name="unit" value="ThisGuyIsADude" >

<input type="hidden" name="redirect" value="[url removed, login to view]">

IF Female = selected, then

<input type="hidden" name="unit" value="ThisGirlIsDudette" >

<input type="hidden" name="redirect" value="[url removed, login to view]">

IF they didn't make a selection

some sort of error (REQUIRED FIELD: [url removed, login to view])

The final form should have the following inputs:

Name: <textbox>

Email: <textbox>

Sex: <dropdownbox> (like the above example)

Submit: <button>

I am a n00b at programming btw.

JavaScript Odd Jobs PHP

ID dự án: #2000278

Về dự án

Dự án từ xa Jul 11, 2012 đang mở