Results 1 to 7 of 7

Thread: Html To Javascript

  1. #1
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Html To Javascript

    Hi,

    I had use this code that you put in a box and then it took the HTML code and put into javascrip and now I cant find it and I need it where did it go??

    Thanks,
    Matt F.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    It stored the html as a variable in the javascript?

    HTML can't 'become' javascript. It could be stored in it, perhaps, but not actually magically become javascript code.

    Was this on dynamic drive?

    You'll need to give us a bit more information.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    Hi,

    yes LOL

    I got the code you want to see it.

    Thanks,
    Matt F.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I still have no idea what you're talking about, so, sure, post a link.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post

    Hi,

    That my scrip to my web page but it all scurble and I need to undo it and it was a box I put it in and then boom it looks like this.

    <script>
    <!--
    document.write(unescape("%3Chtml%3E%0D%0A%0D%0A%3Chead%3E%0D%0A%3Cmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text/html%3B%20charset%3Dwindows-1252%22%3E%0D%0A%3Cmeta%20name%3D%22GENERATOR%22%20content%3D%22Microsoft%20FrontPage%205.0%22%3E%0D%0A%3Cmeta%20name%3D%22ProgId%22%20content%3D%22FrontPage.Ed itor.Document%22%3E%0D%0A%3Ctitle%3EIndex.html%3C/title%3E%0D%0A%3C/head%3E%0D%0A%0D%0A%3Cframeset%20rows%3D%22109%2C*%22%3E%0D%0A%20%20%3Cframe%20name%3D%22banner%22%20scrolling%3D%22no%22%20noresize%20target%3D%22contents%22%2 0src%3D%22http%3A//www.mattplace.net/banner.html%22%3E%0D%0A%20%20%3Cframeset%20cols%3D%22150%2C*%22%3E%0D%0A%20%20%20%20%3Cframe%20name%3D%22contents%22%20target%3D%22main%22%20src%3D%22Toc.htm%22 %3E%0D%0A%20%20%20%20%3Cframe%20name%3D%22main%22%20src%3D%22http%3A//www.mattplace.net/Main_Page.html%22%20scrolling%3D%22auto%22%20target%3D%22_self%22%3E%0D%0A%20%20%3C/frameset%3E%0D%0A%20%20%3Cnoframes%3E%0D%0A%20%20%3Cbody%3E%0D%0A%3Cbody%20stylesrc%3D%22Toc.htm%22%20bgcolor%3D%22lightgreen%22%3E%0D%0A%3Cscript%20type%3D%22t ext/javascript%22%20src%3D%22Rightclick.js%22%3E%0D%0A%3C/script%3E%0D%0A%20%20%3Cp%3EThis%20page%20uses%20frames%2C%20but%20your%20browser%20doesn%27t%20support%20them.%3C/p%3E%0D%0A%0D%0A%20%20%0D%0A%0D%0A%3C/body%3E%0D%0A%20%20%3C/noframes%3E%0D%0A%3C/frameset%3E%0D%0A%0D%0A%3C/html%3E%0D%0A"));
    //-->
    </script>

    Now I cant find it to undo it.

    Thanks,
    Matt F.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Why the heck would you do that in the first place?

    The original HTML was:
    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>Index.html</title>
    </head>
    
    <frameset rows="109,*">
      <frame name="banner" scrolling="no" noresize target="contents" src="http://www.mattplace.net/banner.html">
      <frameset cols="150,*">
        <frame name="contents" target="main" src="Toc.htm" >
        <frame name="main" src="http://www.mattplace.net/Main_Page.html" scrolling="auto" target="_self">
      </frameset>
      <noframes>
      <body>
    <body stylesrc="Toc.htm" bgcolor="lightgreen">
    <script type="text/javascript" src="Rightclick.js">
    </script>
      <p>This page uses frames, but your browser doesn't support them.</p>
    
      
    
    </body>
      </noframes>
    </frameset>
    
    </html>
    Don't ever use one of these "source code encrypters" again. They don't actually serve any purpose except to break your site for some visitors and increase loading time dramatically. Your HTML also needs a lot of work: see http://validator.w3.org/. You should make it validate as HTML 4.01 Strict. This will involve losing the frames. Frames are not a good idea for accessibility.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    In addition to what Twey said, don't be fooled in any way that 'encryption' might stop someone from reading your source code. As Twey just demonstrated, it still isn't difficult. If someone can program a browser to do it, a hacker can do the same thing, too.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •