[WSG] JavaScript Programming Problem

2007-04-15 Thread marvin hunkin

Hi.
having a problem with linking my javascript function, to a webpage for an 
assignment.

tried a number of thing.
if i take out the javascript line and have got my folder structure correct.
when i put in the javascript line, and using jaws 6.10, windows xp pro, and 
using internet explorer 6.0, jaws does not read any of the links, text, etc, 
and does when i take out the line below.
if any one can help me, why this is happening, and how to fix it so it 
works.

cheers Marvin.
ps: will paste the webpage and the javascript below.

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
head
meta http-equiv=content-type content=text/html; charset=ISO-8859-1 /
link href=../styles/joe_style.css rel=stylesheet type=text/css /
script language=JavaScript src=javascript/javascript/order.js
titleJoe's Order Form/title
/head
body
div id=banner class=banner
p img src=images/joes_header.jpg width=482 height=42 alt=Joe's 
Fruit Shop / /p

/div
div id=nav class=nav
img src=images/berry01_red.gif width=22 height=20 alt=Red Berries 
/

br /
div id=links
p a href=../html/index.html title=HomeHome span Back To Home Page 
/span /a /p		
img src=images/berry01_red.gif width=22 height=20 alt=Red Berries 
/

br /
p a href=../html/produce.html title=Joe's Fruit Shop CatalogueJoe's 
Fruit Shop Catalogue span Joe's Fruit Shop Catalogue /span /a /p
img src=images/berry01_red.gif width=22 height=20 alt=Red Berries 
/

br /
p a href=../html/history.html title=Joe's HistoryJoe's History 
span Joe's History /span /a /p
p a href=../html/contact.html title=Contact UsContact Us span 
Contact Us /span /a /p

/div
/div
div id=content class=content
form name=orderForm method=post
h2Order Form For Joe's Fruit Shop/h2

h2A * means you must fill in the details./h2

h2Your Details:/h2

p * Name: input type=text name=Name size=40 onclick=inputName() 
/ /p
p * Address: input type=text name=Address size=40 
onclick=inputAddress() / /p
p * Suburb: input type=text name=Suburb size=40 
onclick=inputSuburb() / /p
p * Postcode: input type=text name=PostCode size=4 
onclick=inputPostcode() / /p
p * Email Address: input type=text name=Email size=40 
onclick=inputEmail() / /p


p Orders: input type=text name=Orders size=4 
onclick=inputOrders() / /p


pCredit Card Details:/p

p * Type:/p
select
option value=AMEX selectedAMEX/option
option value=VISAVISA/option
option value=MCRDMasterCard/option
option value=DINRDiners Club/option
option value=BANKBankcard/option
/select

pExpiry date:/p

 select
   option value=1 selected01/option
   option value=202/option
   option value=303/option
   option value=404/option
   option value=505/option
   option value=606/option
   option value=707/option
   option value=808/option
   option value=909/option
   option value=1010/option
   option value=/option
   option value=1212/option
 /select

   option value=1 selected2006/option
   option value=22007/option
   option value=32008/option
   option value=42009/option
 /select

p input type=submit name=Submit value=Submit / /p
p input type=Submit name=Submit value=Clear Form / /p
/form
/div
div style=position: absolute; left: 490px; text-align: left; font-size: 
10pt;
a href=../html/copyright.html title=Copyright Notice 
target=_blankCopyright/a
a href=../html/privacy.html title=Privacy Notice 
target=_blankPrivacy/a
a href=mailto:[EMAIL PROTECTED]'s Website QueryE-Mail Joe 
Bashir/a

p
a href=http://validator.w3.org/check?uri=referer;img
src=http://www.w3.org/Icons/valid-xhtml10;
alt=Valid XHTML 1.0 Transitional height=31 width=88 //a
/p
/div
/body
/html


//Script Name: order.js
//Script Description: Order form For Joe's Fruit Shop
//Programmer Marvin Hunkin
//Date Created: Friday April 13 2007
//Version Number: 1.0


//Variable Declarations For Joe's Fruit Shop Order Form
var inputName;
var inputAddress;
var inputSuburb;
var inputPostcode;
var inputEmail;
var inputOrders;


//Function to display and validate Person's Name

function inputName()
{
document.write(Name: + inputName);
If (orderForm.inputName.value==)
{
alert(Please Enter Your Name:);
}
}


//Function to display and validate Persons Address
function inputAddress()
{
document.write(Address: + inputAddress);
If (orderForm.inputAddress.value==)
{
alert(Please Enter Your Address:);
}
}

//Function to display and validate Persons Suburb

function inputSuburb()
{
document.write(Suburb: + inputSuburb);
If (orderForm.inputSuburb.value==)
{
alert(Please Enter Your Suburb:);
}
}


//Function to display and validate Persons Postcode

function inputPostcode()
{
document.write(Postcode: + inputPostcode);
if (orderForm.inputPostcode.value==)
{
alert(Please Enter Your Postcode:);
}
if(orderForm.inputPostcode.value4)  (orderForm.inputPostcode.value4)
{
alert(Please Enter A Four Digit Number For The Postcode:);
}
}
}


//Function to display and validate Persons Email Address



Re: [WSG] JavaScript Programming Problem

2007-04-15 Thread Tim

I think the javascript should be declared as
script type=text/javascriptsrc=scripts/swapstyle.js/script

Why not link to the javascript rather then embed it in the page. Bots  
don't like javascript.
Also to be sure for jaws add the noscript element and put the links in  
there.

noscript/noscript

Tim


On 16/04/2007, at 10:44 AM, marvin hunkin wrote:


Hi.
having a problem with linking my javascript function, to a webpage for  
an assignment.

tried a number of thing.
if i take out the javascript line and have got my folder structure  
correct.
when i put in the javascript line, and using jaws 6.10, windows xp  
pro, and using internet explorer 6.0, jaws does not read any of the  
links, text, etc, and does when i take out the line below.
if any one can help me, why this is happening, and how to fix it so it  
works.

cheers Marvin.
ps: will paste the webpage and the javascript below.

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
head
meta http-equiv=content-type content=text/html;  
charset=ISO-8859-1 /
link href=../styles/joe_style.css rel=stylesheet type=text/css  
/

script language=JavaScript src=javascript/javascript/order.js
titleJoe's Order Form/title
/head
body
div id=banner class=banner
p img src=images/joes_header.jpg width=482 height=42  
alt=Joe's Fruit Shop / /p

/div
div id=nav class=nav
img src=images/berry01_red.gif width=22 height=20 alt=Red  
Berries /

br /
div id=links
p a href=../html/index.html title=HomeHome span Back To Home  
Page /span /a /p		
img src=images/berry01_red.gif width=22 height=20 alt=Red  
Berries /

br /
p a href=../html/produce.html title=Joe's Fruit Shop  
CatalogueJoe's Fruit Shop Catalogue span Joe's Fruit Shop  
Catalogue /span /a /p
img src=images/berry01_red.gif width=22 height=20 alt=Red  
Berries /

br /
p a href=../html/history.html title=Joe's HistoryJoe's History  
span Joe's History /span /a /p
p a href=../html/contact.html title=Contact UsContact Us  
span Contact Us /span /a /p

/div
/div
div id=content class=content
form name=orderForm method=post
h2Order Form For Joe's Fruit Shop/h2

h2A * means you must fill in the details./h2

h2Your Details:/h2

p * Name: input type=text name=Name size=40  
onclick=inputName() / /p
p * Address: input type=text name=Address size=40  
onclick=inputAddress() / /p
p * Suburb: input type=text name=Suburb size=40  
onclick=inputSuburb() / /p
p * Postcode: input type=text name=PostCode size=4  
onclick=inputPostcode() / /p
p * Email Address: input type=text name=Email size=40  
onclick=inputEmail() / /p


p Orders: input type=text name=Orders size=4  
onclick=inputOrders() / /p


pCredit Card Details:/p

p * Type:/p
select
option value=AMEX selectedAMEX/option
option value=VISAVISA/option
option value=MCRDMasterCard/option
option value=DINRDiners Club/option
option value=BANKBankcard/option
/select

pExpiry date:/p

 select
   option value=1 selected01/option
   option value=202/option
   option value=303/option
   option value=404/option
   option value=505/option
   option value=606/option
   option value=707/option
   option value=808/option
   option value=909/option
   option value=1010/option
   option value=/option
   option value=1212/option
 /select

   option value=1 selected2006/option
   option value=22007/option
   option value=32008/option
   option value=42009/option
 /select

p input type=submit name=Submit value=Submit / /p
p input type=Submit name=Submit value=Clear Form / /p
/form
/div
div style=position: absolute; left: 490px; text-align: left;  
font-size: 10pt;
a href=../html/copyright.html title=Copyright Notice  
target=_blankCopyright/a
a href=../html/privacy.html title=Privacy Notice  
target=_blankPrivacy/a
a href=mailto:[EMAIL PROTECTED]'s Website QueryE-Mail  
Joe Bashir/a

p
a href=http://validator.w3.org/check?uri=referer;img
src=http://www.w3.org/Icons/valid-xhtml10;
alt=Valid XHTML 1.0 Transitional height=31 width=88 //a
/p
/div
/body
/html


//Script Name: order.js
//Script Description: Order form For Joe's Fruit Shop
//Programmer Marvin Hunkin
//Date Created: Friday April 13 2007
//Version Number: 1.0


//Variable Declarations For Joe's Fruit Shop Order Form
var inputName;
var inputAddress;
var inputSuburb;
var inputPostcode;
var inputEmail;
var inputOrders;


//Function to display and validate Person's Name

function inputName()
{
document.write(Name: + inputName);
If (orderForm.inputName.value==)
{
alert(Please Enter Your Name:);
}
}


//Function to display and validate Persons Address
function inputAddress()
{
document.write(Address: + inputAddress);
If (orderForm.inputAddress.value==)
{
alert(Please Enter Your Address:);
}
}

//Function to display and validate Persons Suburb

function inputSuburb()
{
document.write(Suburb: + inputSuburb);
If (orderForm.inputSuburb.value==)
{
alert(Please Enter Your Suburb:);
}
}



RE: [WSG] JavaScript Programming Problem

2007-04-15 Thread Kepler Gelotte


 Hi.
 having a problem with linking my javascript function, to a webpage for an 
 assignment.
 tried a number of thing.

Hi Marvin,

I am not sure if this is the cause of your problem but your script line has
no end script tag and is also missing a type attribute. It should read:

script language=JavaScript type=text/javascript
src=javascript/javascript/order.js/script


You also have other validation problems you may want to check out at:
http://validator.w3.org/

Regards,
Kepler Gelotte
www.neighborwebmaster.com




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***