aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes How to handle prompt in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "How to handle prompt in javascript" Watch "How to handle prompt in javascript" New topic
Author

How to handle prompt in javascript

Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 84
Hi,

I have written the script like this



Here if the user wont enter filename and clicks ok or he presses cancel button with or without entering filename the alert box will popup. I dont want this. what I want is if the user presses canel it should return false and if the user clicks ok without entering filename then it should alert and return false. How to handle this can anybody guide me to achieve this.

Thanking you.
raaja. g
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
There is no way to detect if cancel was clicked.

Also length==0 is the same thing as value=""

Eric

 
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: How to handle prompt in javascript
 
Similar Threads
null question
put javascript method in body tag and its not returning anything
vectors
prompt
JavaScript in JSP