How do I prevent MS Frontpage from changing my code?

12 replies
How do I prevent MS Frontpage from changing my code?

I pasted a tracking code from Bing Ads onto my page. But when I use MS Frontpage to edit it, the code changes.

Original code = <script id="mstag_tops" type="text/javascript" src="//flex.msn.com/mstag

Changed code = <script id="mstag_tops" type="text/javascript" src="file://flex.msn.com/mstag

MS Frontpage automatically adds the "file" word into code code. How can I prevent it from doing that?

This is the original tracking code I placed before the </body> tag of my page:

Code:
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script> <script id="mstag_tops" type="text/javascript" src="//flex.msn.com/mstag/site/1c68d240-7d70-4f9c-860f-43c891573b07/mstag.js"></script> <script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"2646176",type:"1",actionid:"182453"})</script> <noscript> <iframe src="//flex.msn.com/mstag/tag/1c68d240-7d70-4f9c-860f-43c891573b07/analytics.html?dedup=1&domainId=2646176&type=1&actionid=182453" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe> </noscript>
The word "file" is added when I use MS Frontpage to edit, which messes with the tracking:

Code:
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script> 
<script id="mstag_tops" type="text/javascript" src="file://flex.msn.com/mstag/site/1c68d240-7d70-4f9c-860f-43c891573b07/mstag.js"></script> <script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"2646176",type:"1",actionid:"182453"})</script> <noscript> 
<iframe src="//flex.msn.com/mstag/tag/1c68d240-7d70-4f9c-860f-43c891573b07/analytics.html?dedup=1&domainId=2646176&type=1&actionid=182453" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe></noscript>
I am using MS Frontpage 2002 Service Pack 3
#changing #code #frontpage #prevent
  • Profile picture of the author neutralhatter
    Even in the early 2000's it was widely accepted that frontpage is a terrible solution for webpages because of the generated code.

    Just look for a free html wyziwyg editor. there are tons of them that don't generate extra code in your behalf.

    PS. many things have changed since 2002, like internet explorer is not longer the biggest browser and I wouldn't be suprised if frontpage has several IE specific implementations in it.

    Be carefull when using frontpage, or better yet, don't use it at all!

    hope this helps
    {{ DiscussionBoard.errors[8735587].message }}
    • Profile picture of the author Brandon Tanner
      Agreed. Don't use Front Page -- it's awful. The code it spits out is very old and non-standards-compliant, which means that the webpages are not going to look/function correctly in many modern browsers.

      If you already know how to code, then you can't go wrong with a good, basic HTML editor like Notepad++, Netbeans, Sublime Text, etc.

      If you're set on using a WYSIWYG editor, then at least use one that outputs standards-compliant code, like a modern version of Dreamweaver. There are some free WYSIWYG editors out there too, but all the ones I've tried in the past weren't all that great. It's been a while since I've tried one though, so there may be a decent one out there now -- I don't know. You could try Google'ing "HTML5 WYSIWYG editor free", and see what pops up. Anything that supports HTML5 should be fairly decent.
      Signature

      {{ DiscussionBoard.errors[8735964].message }}
      • Profile picture of the author MindReality
        Originally Posted by Brandon Tanner View Post

        Agreed. Don't use Front Page -- it's awful. The code it spits out is very old and non-standards-compliant, which means that the webpages are not going to look/function correctly in many modern browsers.

        If you already know how to code, then you can't go wrong with a good, basic HTML editor like Notepad++, Netbeans, Sublime Text, etc.

        If you're set on using a WYSIWYG editor, then at least use one that outputs standards-compliant code, like a modern version of Dreamweaver. There are some free WYSIWYG editors out there too, but all the ones I've tried in the past weren't all that great. It's been a while since I've tried one though, so there may be a decent one out there now -- I don't know. You could try Google'ing "HTML5 WYSIWYG editor free", and see what pops up. Anything that supports HTML5 should be fairly decent.
        Which one do you use personally? I would like to use one that can view in normal mode, html source mode, and preview mode, just like MS Frontpage.
        Signature
        Discover The Greatest Secrets Of The Mind And Reality That Will Get You Anything You Desire, Almost Like Magic! Visit: http://www.MindReality.com
        {{ DiscussionBoard.errors[8736330].message }}
        • Profile picture of the author neutralhatter
          since you are in the microsoft atmosphere I would recommend WebMatrix

          it's also from microsoft like frontpage, but it's updated and Free.
          {{ DiscussionBoard.errors[8736439].message }}
        • Profile picture of the author Brandon Tanner
          Originally Posted by MindReality View Post

          Which one do you use personally? I would like to use one that can view in normal mode, html source mode, and preview mode, just like MS Frontpage.
          I normally use either Notepad++ or Netbeans, depending on the project. I don't much care for the WYSIWYG editors, for several reasons.
          Signature

          {{ DiscussionBoard.errors[8736880].message }}
        • Profile picture of the author shahriyar
          Originally Posted by MindReality View Post

          I would like to use one that can view in normal mode, html source mode, and preview mode, just like MS Frontpage.
          Dreamweaver can help you do that, you can view
          - HTML Source Code Only
          - Preview Mode Only
          - or Both (Split screen)

          I am using it for over 10 years. If you want a lighter alternative, you can try Notepad 2 or Notepad++, but it does not have preview mode.
          {{ DiscussionBoard.errors[8780850].message }}
  • Profile picture of the author bertyounger
    Wow, when I saw this post I thought I was in a time warp but now I remember how bad Front Page was ten years ago. Check out Dreamweaver, it's big improvement over FP.
    {{ DiscussionBoard.errors[8736490].message }}
  • Profile picture of the author wayfarer
    Haha, I had no idea Frontpage was even available any more! MS hasn't supported this product for years. Dreamweaver is fine, though a bit bloated in my opinion, but if you want a free product there are plenty of alternatives listed above, like Notepad++, or Netbeans.

    If you REALLY need preview mode, Dreamweaver is probably best, but I warn you, relying on preview mode is generally bad, as it isn't guaranteed to match what is in a browser. Before you put things into production you need to preview in an actual browser, in fact several of them. Better yet, do your tweaks right in the browser, like with the Chrome Inspector, and paste your changes into your editor of choice. This is how most developers I know work, but it takes an essential understanding of the code to pull off.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[8736671].message }}
  • Profile picture of the author Mr Bill
    Everyone loves to hate Microsoft software which is a boring and uninformed point of view.

    Front page is fine (for basic uses) - I use it all the time for small things (like building tables quickly) and from about Office 2003 - XP) onwards it doesn't change your code at all and actually produces nice clean code and is a great way to learn html.

    Just make sure that you're version of FrontPage is later than 2003 to avoid these kind of additions. I've been using it since about 2003 when they made changes to the way they write code and it's been fine since then.
    {{ DiscussionBoard.errors[8745718].message }}
    • Profile picture of the author MindReality
      Originally Posted by Mr Bill View Post

      Everyone loves to hate Microsoft software which is a boring and uninformed point of view.

      Front page is fine (for basic uses) - I use it all the time for small things (like building tables quickly) and from about Office 2003 - XP) onwards it doesn't change your code at all and actually produces nice clean code and is a great way to learn html.

      Just make sure that you're version of FrontPage is later than 2003 to avoid these kind of additions. I've been using it since about 2003 when they made changes to the way they write code and it's been fine since then.
      Is there a Frontpage standalone edition instead of the full office pack?
      Signature
      Discover The Greatest Secrets Of The Mind And Reality That Will Get You Anything You Desire, Almost Like Magic! Visit: http://www.MindReality.com
      {{ DiscussionBoard.errors[8746221].message }}
  • {{ DiscussionBoard.errors[8746226].message }}
  • Profile picture of the author softwarewarden
    Originally Posted by MindReality View Post

    How do I prevent MS Frontpage from changing my code?

    I pasted a tracking code from Bing Ads onto my page. But when I use MS Frontpage to edit it, the code changes.

    Original code = <script id="mstag_tops" type="text/javascript" src="//flex.msn.com/mstag

    Changed code = <script id="mstag_tops" type="text/javascript" src="file://flex.msn.com/mstag

    MS Frontpage automatically adds the "file" word into code code. How can I prevent it from doing that?

    This is the original tracking code I placed before the </body> tag of my page:

    Code:
    <script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script> <script id="mstag_tops" type="text/javascript" src="//flex.msn.com/mstag/site/1c68d240-7d70-4f9c-860f-43c891573b07/mstag.js"></script> <script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"2646176",type:"1",actionid:"182453"})</script> <noscript> <iframe src="//flex.msn.com/mstag/tag/1c68d240-7d70-4f9c-860f-43c891573b07/analytics.html?dedup=1&domainId=2646176&type=1&actionid=182453" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe> </noscript>
    The word "file" is added when I use MS Frontpage to edit, which messes with the tracking:

    Code:
    <script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script> 
    <script id="mstag_tops" type="text/javascript" src="file://flex.msn.com/mstag/site/1c68d240-7d70-4f9c-860f-43c891573b07/mstag.js"></script> <script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"2646176",type:"1",actionid:"182453"})</script> <noscript> 
    <iframe src="//flex.msn.com/mstag/tag/1c68d240-7d70-4f9c-860f-43c891573b07/analytics.html?dedup=1&domainId=2646176&type=1&actionid=182453" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe></noscript>
    I am using MS Frontpage 2002 Service Pack 3
    frontpage defaults to add file: on invalid urls and as the urls for the src attribute are not valid urls so I it adds file: as it think the url should be file try changing //flex.msn.com to http://flex.msn.com and it should not do that.
    {{ DiscussionBoard.errors[8780352].message }}

Trending Topics