Ask Experts Questions for FREE Help !
Ask
    RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #1

    May 22, 2007, 09:13 AM
    Use Windows to find text in javascript?
    I suppose this might be more of an "other software" issue than a javascript issue... so let me know if you think it should be moved...

    In webpages I use javascript to hide email addresses from bots. I want to search the files of the websites for these javascript uses so I can change the email address in some of them...

    When I use Windows to search the folder that all the .html files are in Windows does not find text that is used in javascript.

    How can I search my files for all uses of the javascript?

    If it helps, here's an example:

    Code:
    <script language="JavaScript" type="text/javascript"> 
    <!-- 
       document.write("<A HREF='mailto:"+"[email protected]"+"'>"+"Contact"+" Rick Jackson"+"</A>"); 
    //--> 
                        </script>
    Thanks!
    RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #2

    May 22, 2007, 09:19 AM
    PS. Of course I know I can open each page with notepad and search it that way, but I'm looking for something that will search the whole folder of all .html files.
    jstrike's Avatar
    jstrike Posts: 418, Reputation: 44
    Full Member
     
    #3

    May 25, 2007, 12:22 PM
    I use UltraEdit.

    It can do a search and replace inside of files.

    HTH.
    RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #4

    May 25, 2007, 02:44 PM
    Thanks J. I do see they claim to be useful for javascript, so will check out their free trial. I'll post back to confirm how it went.
    RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #5

    May 29, 2007, 04:12 AM
    I tried that app and unless I'm not figuring out how to use it right, it will not search a folder for files that contain a string of text I'm searching.

    Is that right?

    My goal is to search a folder for a string of text that is within a javascript... just like Windows will search a folder for a string of text in any file in the folder... but Windows will not find text that is in javascript...
    jstrike's Avatar
    jstrike Posts: 418, Reputation: 44
    Full Member
     
    #6

    May 29, 2007, 04:29 AM
    In UltraEdit...
    Click Search
    Select Find in Files.
    Type in what you want to find ([email protected]) Keep this as small/short as possible to maximize your results.
    For In Files/Types enter *.html;*.js (Semicolon to separate)
    Make sure you have the right directory in the Directory box.
    Under Search In select "Files Listed"
    Make sure "Search Sub Directories" is checked.
    Click Find.
    The results will open in a box at the bottom of the editor. You can double click on the results to open the file in the editor.
    The Replace in Files selection works the same way except you give it what you want to change the text to. This is a bit riskier for large changes so I'd recommend doing a Find in Files first to see what it's going to look like.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Excel 15 digit issue, tried converting to text, text to column feature negates fix [ 6 Answers ]

I have the following numbers that exceed 15 characters that needs to be split into its own columns. Down the road, there would be thousands of such rows of data with the first couple set of unique numbers. 890432453253208820,5004500558,05CC,1,0,0,0,0,0,0, 0000,5.0000,2007-01-11...

New HD but Windows setup can't find it [ 21 Answers ]

Parents laptop (Compaq Presario 3000) HD went south. Installed new HD but their restore disks are not working. Getting a variety of errors. ... so now I'm trying a real windowsXP Disk. ... Booted with it in, and it seemed to be setting some things up, then I get this message: "Setup did...

Cannot find server, micrsoft windows not genuine [ 7 Answers ]

So, a while ago I started to get pop-ups "your copy of windows may not be genuine" so I, of course, ignored it because I have no idea what that means. Now that that pop-up stopped a new problem has started. When I go on the internet, I can look at whatever, but if I want to pay a bill, or sign...

BIOS/CMOS can find my second hard drive but Windows cannot [ 5 Answers ]

Hey all, I installed windows on a 1GB primary master hard drive and that is working fine. And now I am trying to attach a 40GB Seagate as a primary slave hard drive to put music and pictures and games and document etc on it. But the screen that first comes up when you press restart (not sure...


View more questions Search