February 27, 2020, 01:43:20 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: Can someone tell me where to go ? (for javascript Q)  (Read 8087 times)
Chief Researcher - PPHC Study Group (Australia)
Posts: 23

« on: June 02, 2008, 07:38:17 AM »

This is embarrassing.

I am trying to make a form total three radio button subtotals in javascript.

Link: http://www.pphcstudygroup.org.au/test_form.html

It works in IE, but not in Mozilla.

Can someone tell me where I may seek help (for the javascript coding issues).

Eddy Pengelly

Copy of page source:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<title>PPHC-SG. Your Personal Evaluation: MENU Page</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="robots" content="noindex,nofollow">
<script language="JavaScript" type="text/javascript" src="nocopy.js"></script>
<LINK href="asg.css" type=text/css rel=STYLESHEET>
<style type="text/css" media="print">body { visibility: hidden; display: none } </style>
<div id="right"><noscript>Javascript needs to be turned ON for this floating side menu to appear and operate<BR><BR></noscript><BR><BR></div><script language="JavaScript" type="text/javascript" src="float.js"></script>
<div class="hp"><table width="100%" border="0"><tr><td width="*">&nbsp;<BR>&nbsp; &nbsp;Your Personal Evaluation Session</td><td width="30%" class="v14n" align="right"><BR><BR>&nbsp;<BR><b>MENU Page</b> &nbsp; &nbsp; &nbsp; 1 of 12 &nbsp; &nbsp; &nbsp; &nbsp; </td></tr></table></div>
<div class="mn"><BR><BR>For each question answer either &nbsp;NO &nbsp; MAYBE &nbsp; or &nbsp; YES &nbsp; by selecting a button. <BR>Your input will reflect the percentage value you give Pegg's theory as being correct, with <BR>your overall percentage showning up in the total. &nbsp;Make some test selections to see how it works*.
<SCRIPT language="javascript">
function cent(amount) {
return (amount == Math.floor(amount)) ? amount + '.00' : ( (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
function calculate() {
var p1, p2, p3;
p1 = ex0.q1.value * 1;
p2 = ex0.q2.value * 1;
p3 = ex0.q3.value * 1;
total_q = (p1 + p2 + p3)/3;
ex0.total_q.value = cent(Math.round(total_q*Math.pow(10,2))/Math.pow(10,2));
<form name="ex0" method="get" action="nextpage.html">
<p>Question 1 &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; No <input name="1" type="radio" value="0" onclick="this.form.q1.value='0.00';calculate();"> &nbsp; Maybe
<input name="1" type="radio" value="50" onclick="this.form.q1.value='50.00'; calculate();"> &nbsp; Yes
<input name="1" type="radio" value="100" onclick="this.form.q1.value='100.00'; calculate();"> &nbsp; &nbsp;  &nbsp; &nbsp; <input type="text" name="q1" class="v14n" size="6"> percent correct</p>
<p>Question 2 &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; No <input name="2" type="radio" value="0" onclick="this.form.q2.value='0.00';calculate();"> &nbsp; Maybe
<input name="2" type="radio" value="50" onclick="this.form.q2.value='50.00'; calculate();"> &nbsp; Yes
<input name="2" type="radio" value="100" onclick="this.form.q2.value='100.00'; calculate();"> &nbsp; &nbsp;  &nbsp; &nbsp; <input type="text" name="q2" class="v14n" size="6"> percent correct</p>
<p>Question 3 &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; No <input name="3" type="radio" value="0" onclick="this.form.q3.value='0.00';calculate();"> &nbsp; Maybe
<input name="3" type="radio" value="50" onclick="this.form.q3.value='50.00'; calculate();"> &nbsp; Yes
<input name="3" type="radio" value="100" onclick="this.form.q3.value='100.00'; calculate();"> &nbsp; &nbsp;  &nbsp; &nbsp; <input type="text" name="q3" class="v14n" size="6"> percent correct</p>
<p> &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Overall Total&nbsp; <input type="text" name="total_q" class="v14n" size="6" readonly onFocus="this.blur();"> percent</p></form><BR>
<p align="right" class="v14n"><noscript><span class="v12b">Javascript needs to be turned ON for the auto stats to work.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </noscript><a href="ype2.html">BEGIN</a> your Study Session &nbsp; &nbsp;</p></div>
<div id="footer">All Rights Reserved &nbsp; Copyright &copy; 2008 World Breaking Discoveries<BR><BR></div>


Evidence of TIME TRAVEL presented and examined WORLD BREAKING DISCOVERIES
Chief Researcher - PPHC Study Group (Australia)
Posts: 23

« Reply #1 on: June 05, 2008, 08:14:32 PM »

All that was missing was

var ex0 = document.forms[0];

My ten pages now work in Mozilla Firefox.

link: http://www.pphcstudygroup.org.au

Evidence of TIME TRAVEL presented and examined WORLD BREAKING DISCOVERIES
Chief Researcher - PPHC Study Group (Australia)
Posts: 23

« Reply #2 on: July 29, 2008, 12:03:05 AM »

The js is utilized to add together radio button selections from a series of questions regarding the research project entitled Ancient Texts Reveal Proof of Time Travel.
The Australian researcher Ronald Pegg claimed to have found descriptions in ancient texts that match to the contents of a certain 1995 produced multi-media compact disk. This would mean that somehow, modern technology was taken back in time for ancient people to view.

He asserted that “The documented accounts in certain ancient texts known as prophetic 'dreams' or 'visions' are about the contents and pictures from the 1995 Ancient Civilizations of the Mediterranean multi-media cd-rom”.

If this is true, then it is Proof of TIME TRAVEL.

His claim is put to the test with a ‘verse by verse’ examination of ten texts that he said contains proof - with the totals from the radio buttons being carried over to the next page(s x10), and then through to the final SUMMARY page.

To see how this works, follow this LINK to Evaluation Session pages.

Evidence of TIME TRAVEL presented and examined WORLD BREAKING DISCOVERIES
Pages: [1]
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC