Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes Error: Object expected,Char 1 Code 0 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Error: Object expected,Char 1 Code 0 " Watch "Error: Object expected,Char 1 Code 0 " New topic
Author

Error: Object expected,Char 1 Code 0

Ernest Dellamotta
Greenhorn

Joined: Dec 06, 2012
Posts: 1
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

Joined: Nov 08, 2001
Posts: 15357
    
    6
Don't you want new Date() and not just Date()?

Eric
Vivek SharmaJi
Greenhorn

Joined: Dec 09, 2012
Posts: 7
try like this

javascript:displayDate();
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
That javascript label does NOTHING and it is bad practice.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56162
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Vivek SharmaJi
Greenhorn

Joined: Dec 09, 2012
Posts: 7
I don't see the end tag of <script> at line 28. One end tag is missing. Please check that.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Error: Object expected,Char 1 Code 0
 
Similar Threads
++ appears before my table??
Problem in using date in WHERE clause in SELECT query in Servlet.
spaces while populating using s:iterator
help with validation/ 2 functions on submit.
not redirecting to servlet page