aspose file tools*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
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: 15376
    
    6
Don't you want new Date() and not just Date()?

Eric
Vivek SharmaJi
Ranch Hand

Joined: Dec 09, 2012
Posts: 38

try like this

javascript:displayDate();
Eric Pascarello
author
Rancher

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

Joined: Jan 10, 2002
Posts: 60975
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vivek SharmaJi
Ranch Hand

Joined: Dec 09, 2012
Posts: 38

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://aspose.com/file-tools
 
subject: Error: Object expected,Char 1 Code 0