Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-05-2005, 11:44 AM   #1
Registered: Jan 2005
Distribution: slackware
Posts: 83

Rep: Reputation: 15
Thumbs up Javascript??

Why am i not able to get this to return the imput?
any help greatly appreciated.


P.S.Here is the file that im talking about

<title>Robots 4 Sale</title>
function calculate_total( bb)
document.write("Type: " + bb)

<body bgcolor="#708090">

<script language="JavaScript1.2">
if (document.all||document.getElementById)"url('bg.jpg') bottom right no-repeat fixed"

<center><marquee bgcolor=dodgerblue width=250 ><h1>ROBOTS!
<img src="images/1.jpg"><img src="1.jpg"><img src="1.jpg">
<font face="Batang">

Domo Arigato Mr. Roboto. <br>
How many times have you wanted to not clean up your room, or do anything at all?
Do you remember the last time you wished you had a bodyguard or a helper robot?
<br>Well now you dont have to!<br>

   <form name="joes"><br>
   <input type="radio" name="bb" value="generic">Generic Robot<br>
   <input type="radio" name="bb" value="helper">Helper Robot<br>
   <input type="radio" name="bb" value="bodyguard">Body Guard<br>
   <input type="radio" name="bb" value="killer">Killer Robot <br>
   <input type="submit" name="submit" value="submit" onclick="calculate_total(">


Last edited by swatward; 05-05-2005 at 05:49 PM.
Old 05-06-2005, 04:51 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 5,345

Rep: Reputation: 390Reputation: 390Reputation: 390Reputation: 390
Try to name your checkbox with an unique name, like bb1, bb2...

If you want to capture checkbox value, try :
global_type = "generic"; // default to generic
function update_type( type )
    global_type = type;
function calculate_total()
document.write("Type: " + global_type);
   <form name="joes"><br>
   <input type="radio" name="bb" value="generic" onclick="update_type(this.value)">Generic Robot<br>
   <input type="radio" name="bb" value="helper" onclick="update_type(this.value)">Helper Robot<br>
   <input type="radio" name="bb" value="bodyguard" onclick="update_type(this.value)">Body Guard<br>
   <input type="radio" name="bb" value="killer" onclick="update_type(this.value)">Killer Robot <br>
   <input type="submit" name="submit" value="submit" onclick="calculate_total();">

Last edited by keefaz; 05-06-2005 at 05:00 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MythTV claims all my inputs are in use. None actually are Pcghost Linux - Software 2 03-24-2005 10:42 AM
javascript alerts with radio modules graziano1968 Programming 3 11-10-2004 03:14 AM
No Sound from Motherboard Inputs? braincandy99 Slackware 3 07-18-2004 06:22 AM
X-Net Radio! Internet Radio with an attitude! xnetradio General 1 01-11-2004 11:01 AM
getting info on video inputs Jo_Nak Programming 1 06-16-2003 03:40 PM

All times are GMT -5. The time now is 03:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration