Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript code is required

 
kademane guru
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3406
13
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you planning to write Java code to do this, or are we talking about some other kind of environment?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic