This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 1966
    
    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
Ulf Dittmer
Marshal

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


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript code is required
 
Similar Threads
DOM sorting
eclipse run configuration setting for javascript
is it possible to include external javascrip file into ear file using NetBean 5.5.1?
calling java class file from javascript
read a property file to set variables using javascript