javascript changes not taking effect.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tshad

    javascript changes not taking effect.

    Using asp.net 2.0, I am finding that at times, the old javascript will still
    be there.

    I was working with it for a couple of hours and the changes seem to happen.

    But at the end of the day, I found that my last changes weren't taking
    affect.

    I was trying to delete my "alerts" before doing a final build but even after
    taking out all my alerts, when I built it and ran it - the alerts were still
    there.

    If I took out the <styletags that loaded the .js file, then there were no
    alerts (as would be expected). The scripts would work as they weren't
    there, but the alerts were not there. So obviously, it wasn't using an old
    ..js file.

    But as soon as I added the <scriptstatemen ts back in, the alerts were
    there?

    How do I get rid of them?

    Thanks,

    Tom


  • Michael Nemtsev [MVP]

    #2
    Re: javascript changes not taking effect.

    Hello tshad,

    what is THAT?!
    I hardly can understand what are u talking about. There is no soothsayer
    to solve your problem not seeing the line of your code

    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    tUsing asp.net 2.0, I am finding that at times, the old javascript
    twill still be there.
    t>
    tI was working with it for a couple of hours and the changes seem to
    thappen.
    t>
    tBut at the end of the day, I found that my last changes weren't
    ttaking affect.
    t>
    tI was trying to delete my "alerts" before doing a final build but
    teven after taking out all my alerts, when I built it and ran it - the
    talerts were still there.
    t>
    tIf I took out the <styletags that loaded the .js file, then there
    twere no alerts (as would be expected). The scripts would work as
    tthey weren't there, but the alerts were not there. So obviously, it
    twasn't using an old .js file.
    t>
    tBut as soon as I added the <scriptstatemen ts back in, the alerts
    twere there?
    t>
    tHow do I get rid of them?
    t>
    tThanks,
    t>
    tTom
    t>


    Comment

    • tshad

      #3
      Re: javascript changes not taking effect.


      "Michael Nemtsev [MVP]" <nemtsev@msn.co mwrote in message
      news:900895ec2f 6f28ca4c509305e df0@msnews.micr osoft.com...
      Hello tshad,
      >
      what is THAT?!
      I hardly can understand what are u talking about. There is no soothsayer
      to solve your problem not seeing the line of your code
      There really is nothing to show.

      The problem was that the changes weren't taking affect.

      I found out it had to do with caching. When I hit CTRL+F5, it refreshed the
      page.

      Apparently, even though I have my browser set to always get a new page - it
      doesn't do the same for the included javascript files. Sometimes my changes
      take effect (meaning the new javascript was loaded) and sometimes it doesn't
      (meaning the cached version is getting loaded).

      Is there someway to tell the system to not cache the javascript file while I
      am building my app?

      Thanks,

      Tom
      >
      ---
      WBR, Michael Nemtsev [.NET/C# MVP] :: blog:

      "The greatest danger for most of us is not that our aim is too high and we
      miss it, but that it is too low and we reach it" (c) Michelangelo
      >
      tUsing asp.net 2.0, I am finding that at times, the old javascript
      twill still be there.
      ttI was working with it for a couple of hours and the changes seem to
      thappen.
      ttBut at the end of the day, I found that my last changes weren't
      ttaking affect.
      ttI was trying to delete my "alerts" before doing a final build but
      teven after taking out all my alerts, when I built it and ran it - the
      talerts were still there.
      ttIf I took out the <styletags that loaded the .js file, then there
      twere no alerts (as would be expected). The scripts would work as
      tthey weren't there, but the alerts were not there. So obviously, it
      twasn't using an old .js file.
      ttBut as soon as I added the <scriptstatemen ts back in, the alerts
      twere there?
      ttHow do I get rid of them?
      ttThanks,
      ttTom
      t>
      >

      Comment

      • Patrice

        #4
        Re: javascript changes not taking effect.

        style ? You mean't script ?

        I believe you included scripts multiple times i.e. :
        - you are suppressing one script reference. Your scripts shoudn't run at
        all. If they still run in a different flavor this could be because you still
        have another reference to another script source in your application
        - when you put them back it you then still have the bad version that comes
        back and that supersedes earlier included script ?

        I would say you included similar scripts two times...

        --
        Patrice

        "tshad" <tfs@dslextreme .coma écrit dans le message de news:
        OY$IwZafIHA.416 4@TK2MSFTNGP05. phx.gbl...
        Using asp.net 2.0, I am finding that at times, the old javascript will
        still be there.
        >
        I was working with it for a couple of hours and the changes seem to
        happen.
        >
        But at the end of the day, I found that my last changes weren't taking
        affect.
        >
        I was trying to delete my "alerts" before doing a final build but even
        after taking out all my alerts, when I built it and ran it - the alerts
        were still there.
        >
        If I took out the <styletags that loaded the .js file, then there were
        no alerts (as would be expected). The scripts would work as they weren't
        there, but the alerts were not there. So obviously, it wasn't using an
        old .js file.
        >
        But as soon as I added the <scriptstatemen ts back in, the alerts were
        there?
        >
        How do I get rid of them?
        >
        Thanks,
        >
        Tom
        >

        Comment

        Working...