473,480 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

'undefined' is null or not an object javascript

Hello
I have the above javascript error on filling in mandatory fields and
submitting the form below:

http://www.wildwoodbushcraft.com/vou...price_code=SWC

This error only occurs in IE not firefox and I can't see anything
wrong with the functioning of the form.

I have been tearing my hair out on this one and would be very
gratefulf for any help.
All the best
Redge
P.S. Please reply to this group rather than by email - thanks.

Oct 24 '07 #1
11 8796
re****@hotmail.com wrote:
I have the above javascript error on filling in mandatory fields and
submitting the form below:

http://www.wildwoodbushcraft.com/vou...price_code=SWC

This error only occurs in IE not firefox
An error occurs in Firefox (2.0.0.8). Select the Tools menu, Error Console
item (or whatever debugging tool you employ -- to http://getfirebug.com/ is
strongly recommended.)
P.S. Please reply to this group rather than by email - thanks.
The opposite would be abnormal and generally unwished for in Usenet, so
there is not really a need for asking for it in an OP. (Nevertheless, there
must be an address in the From header, meaning it designates a container
that receives e-mail; see RFC1036 and RFC2822.)
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Oct 24 '07 #2
Apologies - I forgot to upload one file at the time I posted so the
error response was not as described - it is now - please try it again
and see if you can help me out - many thanks.

Regards
Redge.

Oct 25 '07 #3
re****@hotmail.com wrote:
Apologies - I forgot to upload one file at the time I posted so the
error response was not as described - it is now - please try it again
and see if you can help me out - many thanks.
Same error (uncached):

urchinTracker is not defined
http://www.wildwoodbushcraft.com/vou...price_code=SWC
Line: 248
Code: urchinTracker();

Since `urchinTracker' appears to be a method, that would be the explanation
why IE shows the unhelpful "undefined is null or not an object" error
message: `undefined' cannot be called.

ISTM it is your using Google Analytics at the end of the `body' element (and
possibly also your serving invalid markup -- <http://validator.w3.org/>)
that causes the problem. Incidentally, Google's client-side script code is
recognized here to have been written by in[ae]pt people.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Oct 25 '07 #4
Thanks for your advice Thomas...
>
ISTM it is your using Google Analytics at the end of the `body' element (and
possibly also your serving invalid markup -- <http://validator.w3.org/>)
that causes the problem.
Actually I have placed the Analytics tag exactly where Google say to
put it and the validator code seems strict xhtml and I am not sure why
it would create this error as other pages with transitional or loose
syntax and also Analytics tags in the same place do not give the
error... perhaps I am missing something here but I am still not sure
how to progress.

regards
Redge

Oct 25 '07 #5
[Quoting repaired]

re****@hotmail.com wrote:
[Thomas 'PointedEars' Lahn wrote:]
>ISTM it is your using Google Analytics at the end of the `body' element (and
possibly also your serving invalid markup -- <http://validator.w3.org/>)
that causes the problem.

Actually I have placed the Analytics tag exactly where Google say to
put it
You misunderstood me. I did _not_ mean to say that the position of the
"Analytics tag", which is rather a `script' element containing a call to
Google Analytics code, was wrong. Mentioning the position was merely a way
to point you directly to the line where the problem appears to occur.
and the validator code seems strict xhtml
Parse error. *Your* code is _not_ valid.

http://validator.w3.org/check?verbos...ice_code%3DSWC

shows 12 errors, and that is assuming HTML 4.01 Transitional because you
omitted the required DOCTYPE declaration in your code.
and I am not sure why it would create this error as other pages with
transitional or loose syntax and also Analytics tags in the same place
do not give the error...
Would that not be an indication that Google Analytics, at least the way you
used it, does not work with XHTML?
perhaps I am missing something here but I am still not sure how to progress.
Use Valid HTML 4.01, preferably Strict.
Please take heed on the FAQ on how to quote properly:
http://www.jibbering.com/faq/faq_not...s.html#ps1Post
PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Oct 25 '07 #6
I have now updated the page to conform to valid html 4.0 Transitional
but the error still persists.

Oct 25 '07 #7
wrote on 25 okt 2007 in comp.lang.javascript:
I have now updated the page to conform to valid html 4.0 Transitional
but the error still persists.
What error?

[please always quote on usenet, this is not email]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 25 '07 #8
On 25 Oct, 22:01, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
wrote on 25 okt 2007 in comp.lang.javascript:
I have now updated the page to conform to valid html 4.0 Transitional
but the error still persists.

What error?

[please always quote on usenet, this is not email]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sorry, I was talking about the original error "'undefined' is null or
not an object". I have taken earlier advice which suggested that the
Javascript for my Google analytics combined with invalid mark up may
have been causing the error but although it may relate to another
error on validating the page and even removing the Analytics
javascript the "'undefined' is null or not an object" error still
persists. I am not surprised since other pages with the same invalid
markup and Analytics tags do not produce the error.

Oct 26 '07 #9
pr
re****@hotmail.com wrote:
>
Sorry, I was talking about the original error "'undefined' is null or
not an object". I have taken earlier advice which suggested that the
Javascript for my Google analytics combined with invalid mark up may
have been causing the error but although it may relate to another
error on validating the page and even removing the Analytics
javascript the "'undefined' is null or not an object" error still
persists. I am not surprised since other pages with the same invalid
markup and Analytics tags do not produce the error.
Looks like vvouchertype.value to me.

http://www.jibbering.com/faq/faq_not...ess.html#faBut

shows you how to retrieve radio button values. Since the value of the
checked item is in the HTML, it's a puzzle as to why you should be
trying to trim it in any case.

I agree with David on the code quality: it's not a very obscure bug and
it's a worry that it takes so long to pinpoint it.
Oct 26 '07 #10
On 25 Oct, 22:01, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
>[please always quote on usenet, this is not email]
JFTR: Quoting is useful with e-mail, too.
PointedEars
Oct 26 '07 #11
On 26 Oct, 12:25, pr <p...@porl.globalnet.co.ukwrote:
red...@hotmail.com wrote:
Sorry, I was talking about the original error "'undefined' is null or
not an object". I have taken earlier advice which suggested that the
Javascript for my Google analytics combined with invalid mark up may
have been causing the error but although it may relate to another
error on validating the page and even removing the Analytics
javascript the "'undefined' is null or not an object" error still
persists. I am not surprised since other pages with the same invalid
markup and Analytics tags do not produce the error.

Looks like vvouchertype.value to me.

http://www.jibbering.com/faq/faq_not...ess.html#faBut

shows you how to retrieve radio button values. Since the value of the
checked item is in the HTML, it's a puzzle as to why you should be
trying to trim it in any case.

I agree with David on the code quality: it's not a very obscure bug and
it's a worry that it takes so long to pinpoint it.
Many thanks and also to David for your constructive comments - that
has solved the problem.

Oct 30 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2451
by: Robert | last post by:
Hello all, Why reference cannot be able to represent a NULL object? Best regards, Robert
2
5024
by: Pathogenix | last post by:
Greetings, I'm trying to fix a web service client which has been implemented in a dailywtf worthy manner. I've decided to rip all the old code out and start again from the proxy generated by...
15
128264
by: Tarun Mistry | last post by:
Hi guys, what is the best/correct way to check for a NULL object? I.e. myClass test; if(test == null) {}
13
39402
by: Oleg Konovalov | last post by:
Hi, I am working on a web application which among other things uses DHTML, Java and Javascript. It populates web page based on the contents of the database (resultset), and next to each row...
3
12884
by: toton | last post by:
Hi, In some cases when my function returns, I need to return a object of null state. This is when I return object by value. (Just like for by pointer, I can return a null pointer ). It has to be...
2
5951
by: Glenn | last post by:
Rather than... if ( myInstance != null ) { myInstance.Dispose(); } maybe something like this... myInstance?Dispose();
1
3793
by: JWest46088 | last post by:
I'm getting this error when I try to preview my code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at therun4life_fla::MainTimeline/frame1() I don't...
3
8100
karthickkuchanur
by: karthickkuchanur | last post by:
Dear Experts, Please let me know what is the difference between difference between object !=null and null !=object,I already google it but i can't able to find the right answer
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.