Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Javascript (https://www.askmehelpdesk.com/forumdisplay.php?f=452)
-   -   Use Windows to find text in javascript? (https://www.askmehelpdesk.com/showthread.php?t=94896)

  • May 22, 2007, 09:13 AM
    RickJ
    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!
  • May 22, 2007, 09:19 AM
    RickJ
    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.
  • May 25, 2007, 12:22 PM
    jstrike
    I use UltraEdit.

    It can do a search and replace inside of files.

    HTH.
  • May 25, 2007, 02:44 PM
    RickJ
    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.
  • May 29, 2007, 04:12 AM
    RickJ
    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...
  • May 29, 2007, 04:29 AM
    jstrike
    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.

  • All times are GMT -7. The time now is 02:54 PM.