Forum Moderators: travelin cat

Message Too Old, No Replies

java or HTML quiz to work cross browser/platform

Quiz

         

yorkie

9:50 am on Jun 22, 2005 (gmt 0)

10+ Year Member



I'm having problems finding a robust Mac/Pc functioning multiple choice quiz which works on Safari and Mac IE, even though I've got a java quiz working fine on firefox and IE on the PC. Is there any resources I could use or useful code?

lZakl

3:26 pm on Jun 22, 2005 (gmt 0)

10+ Year Member



Multiple choice? Wouldn't a simple web form with Radio buttons work? You could take that form to a JSP, PHP, PERL, ASP, CFM, (the list goes on) , etc.. Isn't it just a basic quiz; For example:

<html>
<body>
<form method="POST" action="nextpage.php">
<b>Question 1)</b>
<i><b>Why did the chicken cross the road</b></i><br><Br>
A: <input type="radio" name="group1" value="Q1A"> To get to the other side<br>
B: <input type="radio" name="group1" value="Q1B"> To be slaughtered by chicken haters<br>
C: <input type="radio" name="group1" value="Q1C"> To be coddled by tree huggers<br>
D: <input type="radio" name="group1" value="Q1D"> To make it to Antarctica<br>
<input type="submit" value ="Go!">
</form>
</body>
</html>

If it is, I suggest writing it in HTML instead of a Java Applet to make things a little more cross platform. Java is pretty universal, but not as universal as HTML.

So I would suggest the following:

1) Create the entire 'quiz page' in HTML
2) Create a script page (PHP, ASP, JSP etc..) to process the information
3) Write the information to a file or a database
4) Create an output "you've pased", "you've failed", "we will mail you your results" ... whatever you want to do.

This would all be done using a combination of a scripting language, and HTML. Not real complicated.

I hope this helps!

-- Zak

yorkie

4:08 pm on Jun 22, 2005 (gmt 0)

10+ Year Member



Thanks Zak, I have tried html with javascript to process the results which is fine on PC browsers but they won't show on safari or Mac ie browsers, is it just the javascript compatability? I have to have be able to run it client side rather than server based asp/php.

DerekH

7:42 am on Jun 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yorkie, though I can't asnwer your question, I can at least confirm it is possible, and probably easy. The UK BBC News website run quizzes every week and they work fine on Macs using any old browser I throw at it.
It must be that you are using Microshaft extensions in your JS...
DerekH

lZakl

11:26 am on Jun 27, 2005 (gmt 0)

10+ Year Member



>>?<< has to be client-side? Well that really sucks for you considering really complicated JavaScripts such as this:

1) People can easily find the answers if they wish to look hard enough

2) IE for Mac (and older versions of Safari) are obsolete. IE for Mac is like running IE 4.x on a PC. Again bad news for a JS heavy site.

I'd try flash ... Oh but then you're looking at compatibility issues with those that don't have Flash Player installed. I fear the only way around what you are looking for, is to post your script in the JavaScript forum and let someone take a crack at it.

-- Another reason client-side is bad? If they have an older browser, one that doesn't support JS, or have JS disabled, they wil not be able to use your site. A server-side app would cure all these issues ... If you don't mind me asking, why does it have to be client-side?

-- Zak

yorkie

11:46 am on Jun 27, 2005 (gmt 0)

10+ Year Member



Hi Zak

Thanks again, I agree 100% with what you say, but in this case security is not an issue because the quiz is not a serious quiz and is designed to educate young kids and the correct answers will be given either as they go along or at the end. The reason its client side is because I don't have access to the clients server (the client will be uploading it to their server) and i want it to be fully tested and fool proof be for I give it to them. I've been told about a dreamweaver extra called coursebuilder which I'm going to give a go, thanks for your time fingers crossed this extra will be the solution.