• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: Object expected,Char 1 Code 0

 
Ernest Dellamotta
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Display Date isnt working it says object expected on line 92 which is in the body <button type="button" onclick="displayDate()">Display Date</button> ... this is the code for the whole page ... help please?






[Added code tags - see UseCodeTags for details]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't you want new Date() and not just Date()?

Eric
 
Vivek SharmaJi
Ranch Hand
Posts: 38
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try like this

javascript:displayDate();
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That javascript label does NOTHING and it is bad practice.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vivek SharmaJi wrote:try like this javascript:displayDate();

No. Do not do this. As Eric pointed out, it's superfluous and will no affect at all on the issue.
 
Vivek SharmaJi
Ranch Hand
Posts: 38
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the end tag of <script> at line 28. One end tag is missing. Please check that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic