Does anyone understand HTML/Javascript programming ?
My wife is doing a course and is having difficulty getting this to run ?
any help would be very much appreciated as to why it does not work as it should.
Many thanks in advance.
<HTML>
<HEAD>
<TITLE>Make a Story</TITLE>
<script language="JavaScript">
var heroGender, heroName, petType, petName;
heroGender = window.prompt('Is the hero female or male? Enter F or M', 'F');
heroName = window.prompt('What is the hero\'s name?','');
petType = window.prompt ('type of pet','');
petName = window.prompt ('the name of the pet','');
document.write ('Once upon a time there was a ');
var girl, boy;
girlOrboy = window.prompt ('is it girl or a boy? Enter girl or boy','');
girlOrboy = parsefloat ('girlOrboy');
if ('girl');
document.write('girl');
else ('boy');
document.write('boy');
// write out the remaining output
// here
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
Page 1 of 1
Javascript help needed Javascript help needed
#2
Posted 16 May 2011 - 08:00 AM
Try posting in Software/Programming forum. You could get overlooked here.
Is this code written by your wife. I can get the first prompt script to run, but there seems to be code missing.
Clarify the exercise and I'm sure there will be suggestions for you from members who are more clued up than me in HTML/Javascript.
Is this code written by your wife. I can get the first prompt script to run, but there seems to be code missing.
Clarify the exercise and I'm sure there will be suggestions for you from members who are more clued up than me in HTML/Javascript.
#3
Posted 16 May 2011 - 11:22 AM
thanks for looking pete, managed to get it all sorted now thanks. there is another part after that needed to be added as next part of exercise.
will use Software/Programming section of forum next time its needed
will use Software/Programming section of forum next time its needed
Share this topic:
Page 1 of 1

Help

Back to top








