aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Problem with window.prompt 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 "Problem with window.prompt" Watch "Problem with window.prompt" New topic
Author

Problem with window.prompt

Albert Hopkins
Greenhorn

Joined: Jul 21, 2007
Posts: 21
Hi..
can anybody show me whats wrong with this script??

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42635
    
  65
What is it supposed to do, and what does it actually do?


Ping & DNS - my free Android networking tools app
Albert Hopkins
Greenhorn

Joined: Jul 21, 2007
Posts: 21
It calculates total price based on the quantity entered by the user.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

So what's the issue?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Albert Hopkins
Greenhorn

Joined: Jul 21, 2007
Posts: 21
when I open it in IE or Firefox, only blank page appears. No window prompt for user input.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42635
    
  65
All the code is in the document head, when it should be in the body. Or, even better, define it in functions in the head, which you then call from the body. I'm not sure it's possible to call document.writeln after the document has been laid out, though; probably not.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

In fact, why are you writing the document in writeln's to being with?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with window.prompt