Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-04-2006, 12:28 PM
Webviper2006 is offline Webviper2006
Registered User

Join Date: Nov 2005
Posts: 495

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.
__________________
Sorry bums, now I'm back! Now I know C++! I use Microsoft Visual C++!
Reply With Quote
  #2  
Old 02-04-2006, 12:45 PM
DevilDog#1 is offline DevilDog#1

Join Date: Jul 2002
Posts: 7,040

Have you actually tried to debug it?
__________________








Quote:
If I don't do that doesn't mean I can't - DD#1
Reply With Quote
  #3  
Old 02-04-2006, 01:21 PM
Erik is offline Erik
Registered User

Join Date: Sep 2005
Posts: 1,285

^ Now theres alot of help...hang web I'll see what i can do.
Reply With Quote
  #4  
Old 02-04-2006, 03:04 PM
Webviper2006 is offline Webviper2006
Registered User

Join Date: Nov 2005
Posts: 495

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.
__________________
Sorry bums, now I'm back! Now I know C++! I use Microsoft Visual C++!
Reply With Quote
  #5  
Old 02-04-2006, 04:05 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

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
Reply With Quote
  #6  
Old 02-04-2006, 04:29 PM
Webviper2006 is offline Webviper2006
Registered User

Join Date: Nov 2005
Posts: 495

Ok but still the JavaScript!
__________________
Sorry bums, now I'm back! Now I know C++! I use Microsoft Visual C++!
Reply With Quote
  #7  
Old 02-04-2006, 05:03 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

try onclick="javascript:disp_alert()"

not sure if this is right, but I believe this is in the general direction
Reply With Quote
  #8  
Old 02-04-2006, 06:14 PM
Webviper2006 is offline Webviper2006
Registered User

Join Date: Nov 2005
Posts: 495

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.
__________________
Sorry bums, now I'm back! Now I know C++! I use Microsoft Visual C++!
Reply With Quote
  #9  
Old 02-04-2006, 06:35 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

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>
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #10  
Old 02-05-2006, 12:56 AM
Webviper2006 is offline Webviper2006
Registered User

Join Date: Nov 2005
Posts: 495

Thanks Panther.
__________________
Sorry bums, now I'm back! Now I know C++! I use Microsoft Visual C++!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript image tail_gunner Web design and Programming 2 05-27-2007 11:05 AM
Javascript BBCode insertion Lakie Web design and Programming 5 01-05-2007 03:27 AM
javascript King Web design and Programming 3 01-03-2005 11:35 AM
Help with javascript Acid Web design and Programming 5 10-28-2003 07:30 AM


All times are GMT -5. The time now is 05:40 PM.




Powered by vBulletin®