This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 2229
    
    7

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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41060
    
  43
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
 
Similar Threads
is it possible to include external javascrip file into ear file using NetBean 5.5.1?
calling java class file from javascript
DOM sorting
read a property file to set variables using javascript
eclipse run configuration setting for javascript