SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 25th, 2000, 11:54 PM
ryanh ryanh is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 1999
Posts: 119 ryanh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 41 sec
Reputation Power: 9
Hi, I'm kinda new to JavaScript, so it's the syntax that's got to be stumping me.

I've got the following function in an external file that contains other (working) scripts:

function billEQmail () {
form = document.forms[0];
if (form.billEQmail.checked) { // copy mailing info to billing fields
form.Baddress.value = form.Maddress.value;
form.Bcity.value = form.Mcity.value;
form.Bstate.value = form.Mstate.value;
form.Bzip.value = form.Mzip.value;
form.Bphone.value = form.Mphone.value;
form.Bemail.value = form.Email.value;
}
else { // clear billing fields
form.Baddress.value = "";
form.Bcity.value = "";
form.Bstate.value = "";
form.Bzip.value = "";
form.Bphone.value = "";
form.Bemail.value = "";
}
}

as you can see, all it does is copy fields to a series of other fields, or clear them...

When I load it up, Netscape's Javascript Console says "billEQmail is not a function".

Like I said, this function is defined in the same file as several other functions that are working fine.

I can't see any problems in the syntax, but if you can help me out, I'd appreciate it.

Thanks!

Reply With Quote
  #2  
Old July 26th, 2000, 03:26 PM
zerotop zerotop is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: The Netherlands
Posts: 2 zerotop User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
function billEQmail ()
There is a space between "billEQmail" and "()". Try it when you remove the space

Reply With Quote
  #3  
Old July 26th, 2000, 04:45 PM
ryanh ryanh is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 1999
Posts: 119 ryanh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 41 sec
Reputation Power: 9
no, the other functions have the same format... any other ideas?

Reply With Quote
  #4  
Old July 28th, 2000, 01:13 AM
JKB JKB is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Roseburg, OR, USA
Posts: 23 JKB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hi ryanh

netscape may not understand referencing forms as a collection you may want to try something like this:

document.formB.Bzip.value = document.formM.Mzip.value;
document.formB.Bphone.value = document.formM.Mphone.value;
document.formB.Bemail.value = document.formM.Memail.value;


for forms...

<form name="formB">
<input type="text" name="Bzip" value="">Zip<br>
<input type="text" name="Bphone" value="">Phone<br>
<input type="text" name="Bemail" value="">Email<br>
</form>

and...

<form name="formM">
<input type="text" name="Mzip" value="99923">Zip<br>
<input type="text" name="Mphone" value="342-8291">Phone<br>
<input type="text" name="Memail" value="me@lalala.com">Email<br>
</form>

this does not really address your question i suppose as the error your are getting sounds like something different but maybe this could help

ps i tested this in IE.. i try and avoid netscape like the plague so this probably won't work either

Reply With Quote
  #5  
Old July 28th, 2000, 01:42 PM
ryanh ryanh is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 1999
Posts: 119 ryanh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 41 sec
Reputation Power: 9
JS is such a pain in the ***... apparently, it didn't like the name billEQmail... I changed it to copyAddress, and it worked perfectly...


grrrrrrr...

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > xxxx is not a function... ????


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway