Novahq.net Forum

Novahq.net Forum (https://novahq.net/forum/index.php)
-   Web design and Programming (https://novahq.net/forum/forumdisplay.php?f=32)
-   -   JavaScript Help! (https://novahq.net/forum/showthread.php?t=33015)

Webviper2006 02-04-2006 12:28 PM

JavaScript Help!
 
For my form

Code:

<html>
<head>
<link href="../styles.css" rel="stylesheet" type="text/css">
<style>
.submit {
        background-color: #000000;
        color: #FFFFFF;
}

</style>

<script type="text/javascript">
function disp_alert()
{
alert("To become a sponsor you got to donate us.")
}

</script>
</head>

<body>
<form name="form1" method="post" form action="<?=$_SERVER['PHP_SELF']?>">
  <table width="538" border="0" bgcolor="#CCCCCC">
    <tr>
      <td colspan="2" class="title3"><u>Become a Sponsor or Partner</u></td>
    </tr>
    <tr>
      <td class="title2">Full Name:</td>
      <td class="title2"><input name="name" type="text" class="submit" id="name" size="30"></td>
    </tr>
    <tr>
      <td class="title2">Email:</td>
      <td class="title2"><input name="email" type="text" class="submit" id="email" size="30"></td>
    </tr>
    <tr>
      <td class="title2">Website:</td>
      <td class="title2"><input name="website" type="text" class="submit" id="website" size="35"></td>
    </tr>
    <tr>
      <td class="title2">Partnar/Sponsor's Name: </td>
      <td class="title2"><input name="psname" type="text" class="submit" id="psname" size="35"></td>
    </tr>
    <tr>
      <td class="title2">Website Banner:</td>
      <td class="title2"><input name="wbanner" type="text" class="submit" id="wbanner" size="40"></td>
    </tr>
    <tr>
      <td class="title2">About Website: </td>
      <td class="title2"><textarea name="about" cols="30" rows="2" class="submit" id="about"></textarea></td>
    </tr>
    <tr>
      <td class="title2">Type:</td>
      <td class="title2"><input type="radio" value="radiobutton" onClick="disp_alert()" name="sop">
        Sponsor
        <input type="radio" value="radiobutton" name="sop">
        Partnar</td>
    </tr>
    <tr>
      <td class="title2">&nbsp;</td>
      <td class="title2">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2" class="title2"><input name="send" type="submit" class="submit" id="send" value="Send Request!">
      <input name="reset" type="submit" class="submit" id="reset" value="Reset Form"></td>
    </tr>
  </table>
</form>
</body>
</html>

How can I make when someone clicks on the sponsor radio button and then below the table it will need to show this

Code:

<td class="title2">Donate:</td>
      <td class="title2"><input name="donate" type="text" class="submit" id="donate" value="$0.00" maxlength="20"></td>


If I can't say it right please tell me. :(

DevilDog#1 02-04-2006 12:45 PM

Have you actually tried to debug it?

Erik 02-04-2006 01:21 PM

^ Now theres alot of help...hang web I'll see what i can do.

Webviper2006 02-04-2006 03:04 PM

Quote:

Originally posted by DevilDog#1
Have you actually tried to debug it?
Yes I tried.


And I need help on making the form email me please.

JonM 02-04-2006 04:05 PM

Quote:

Originally posted by Webviper2006
Yes I tried.


And I need help on making the form email me please.

php...which i thought u were learning?

Anyways google PHP Mail tutorials

Webviper2006 02-04-2006 04:29 PM

Ok but still the JavaScript!

JonM 02-04-2006 05:03 PM

try onclick="javascript:disp_alert()"

not sure if this is right, but I believe this is in the general direction

Webviper2006 02-04-2006 06:14 PM

Ok look at this form...

Click Here to view the form!

On the donate text box I want it to show when the person clicks on the type sponsor. If not then not shows.

Scott 02-04-2006 06:35 PM

Code:


<script type="text/javascript">
function show_message(val) {
        elid = document.getElementById("message");

        if(val==1) {
                elid.style.visibility = "visible";
        } else {
                elid.style.visibility = "hidden";
        }
}
</script>

<input type="radio" name="sop" onclick="show_message(1);" />Sponsor<br />
<input type="radio" name="sop" onclick="show_message(0);" />Partner</br />

<div id="message" style="visibility:hidden">
$25 is required to become a sponsor!
</div>


Webviper2006 02-05-2006 12:56 AM

Thanks Panther. :D


All times are GMT -5. The time now is 02:23 AM.

Powered by vBulletin®