aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Javascript code is required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Javascript code is required" Watch "Javascript code is required" New topic
Author

Javascript code is required

kademane guru
Greenhorn

Joined: Feb 20, 2007
Posts: 21
Hi JavaRanchers,
I want find the alert() itself in a javascript file(i.e how many alerts are there in one .js file) and also the line number of that string.Please can anybody help me how to solve this problem?.
[ May 06, 2008: Message edited by: kademane guru ]
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2505
    
    8

why don't read the js file into some text file and loop through text file counting alert() statements and keeping track on the counter as the line number?


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42280
    
  64
Are you planning to write Java code to do this, or are we talking about some other kind of environment?


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript code is required