Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

document is undefined

New Here ,
Mar 28, 2007 Mar 28, 2007

Copy link to clipboard

Copied

Hi,
I wonder if anyone can help me out here I am writing a web application in asp javascript.
the problem is that when i enter the line shown below

document.forms["GroupForm"].elements["GroupDD"].disabled='true';

i keep getting the following error
Error Type:
Microsoft JScript runtime (0x800A1391)
'document' is undefined
/DCASuppliersDatabase/CategoryListing.Mod.asp, line 154

Why is this? I thought document is a valid keyword that points to the current page.

Regards

fifo
TOPICS
Server side applications

Views

328
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 28, 2007 Mar 28, 2007

Copy link to clipboard

Copied

fifo85 wrote:
> i keep getting the following error
> Error Type:
> Microsoft JScript runtime (0x800A1391)
> 'document' is undefined
> /DCASuppliersDatabase/CategoryListing.Mod.asp, line 154

That's usually the result of a corrupted file cache. Try the solution here:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19105#dat

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2007 Mar 28, 2007

Copy link to clipboard

Copied

Thanks for the response,

but the error i get occurs when i run my application on the web browser

the link that you sent does not cover runtime errors,
any hints?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 28, 2007 Mar 28, 2007

Copy link to clipboard

Copied

Sounds like you're mixing up client-side and server-side code. They are
completely independant. You can't put client-side code inside your dynamic
<%%> blocks. ie. this won't work:

<%
document.forms["GroupForm"].elements["GroupDD"].disabled='true';
%>

will need to be on the client instead. ie

<script>
document.forms["GroupForm"].elements["GroupDD"].disabled='true';
</script>

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004




Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2007 Mar 28, 2007

Copy link to clipboard

Copied

LATEST
Thanks so much Julian,

That did the trick, I thought all the code gets excecuted on the server side on asp. I'm new do web application
development, well this is my first one, I could really do with an insight into how the whole system (client side/server side) works.
you know any useful sights where i can get a good grounding into web application development and javascript/asp.

Thanks Again,

Fifo

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines