Strange behavior

Discussion in 'ASP .Net' started by Joe, Apr 2, 2008.

  1. Joe

    Joe Guest

    This has to be simple - I must be missing something....

    Here's the problem:

    I have a .js file in my project. In that file I have a variable imageDir
    declared like this: imageDir = "images/";

    I want to change this so it always references the root. Now I wouldn't think
    this is a big deal except no matter what I do to imageDir it never changes.

    I've even tried commenting out the line but it still gets a value at
    runtime.

    The first thing I did was make sure I don't have the wrong file open so I
    closed the file and double clicking on the file in the solution explorer.
    The file is the same.
    Next I did a search on the computer to see if there are other copies of it
    and there is 1 other copy which is in the site I publish to. I made the same
    change to that file but it still doesn't show.

    I put a break point in the .js file and even though I commented out the
    imageDir line it is still declared and assigned to.

    Does any one have any suggestions as to what else to look for? This has to
    be a simple problem.

    Thanks,
    Joe
     
    Joe, Apr 2, 2008
    #1
    1. Advertising

  2. It's probably just being cached in the browser. Clear the browser cache.
    -- Peter
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short Urls & more: http://ittyurl.net


    "Joe" wrote:

    > This has to be simple - I must be missing something....
    >
    > Here's the problem:
    >
    > I have a .js file in my project. In that file I have a variable imageDir
    > declared like this: imageDir = "images/";
    >
    > I want to change this so it always references the root. Now I wouldn't think
    > this is a big deal except no matter what I do to imageDir it never changes.
    >
    > I've even tried commenting out the line but it still gets a value at
    > runtime.
    >
    > The first thing I did was make sure I don't have the wrong file open so I
    > closed the file and double clicking on the file in the solution explorer.
    > The file is the same.
    > Next I did a search on the computer to see if there are other copies of it
    > and there is 1 other copy which is in the site I publish to. I made the same
    > change to that file but it still doesn't show.
    >
    > I put a break point in the .js file and even though I commented out the
    > imageDir line it is still declared and assigned to.
    >
    > Does any one have any suggestions as to what else to look for? This has to
    > be a simple problem.
    >
    > Thanks,
    > Joe
    >
    >
    >
     
    Peter Bromberg [C# MVP], Apr 2, 2008
    #2
    1. Advertising

  3. Hi Joe,

    Don't worry. As Peter has mentioned, it is possible that the web browser
    has cached the script file(if you've definitely remote the original one).

    Are you using IE for visiting the page? If so, in addition to "clearing the
    client cache" as Peter suggested, you can also set the following option to
    make browser always download new version of a certain file it requests:

    ** Go to "Tools--->options" menu:

    ** On General tab(focus by default), click the "settings" button under
    "browsing history" section

    **In the opened dialog, choose "every time I visit the web page" under the
    "check for newer versions of stored pages"

    You can try it to see whether it can help refresh the script file.

    BTW, I suggest you also try testing through some other simple script file
    with functions/variables to see whether they also suffer the same problem.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.



    --------------------
    >From: "Joe" <>
    >Subject: Strange behavior
    >Date: Tue, 1 Apr 2008 20:52:49 -0400


    >
    >This has to be simple - I must be missing something....
    >
    >Here's the problem:
    >
    >I have a .js file in my project. In that file I have a variable imageDir
    >declared like this: imageDir = "images/";
    >
    >I want to change this so it always references the root. Now I wouldn't

    think
    >this is a big deal except no matter what I do to imageDir it never changes.
    >
    >I've even tried commenting out the line but it still gets a value at
    >runtime.
    >
    >The first thing I did was make sure I don't have the wrong file open so I
    >closed the file and double clicking on the file in the solution explorer.
    >The file is the same.
    >Next I did a search on the computer to see if there are other copies of it
    >and there is 1 other copy which is in the site I publish to. I made the

    same
    >change to that file but it still doesn't show.
    >
    >I put a break point in the .js file and even though I commented out the
    >imageDir line it is still declared and assigned to.
    >
    >Does any one have any suggestions as to what else to look for? This has to
    >be a simple problem.
    >
    >Thanks,
    >Joe
    >
    >
    >
     
    Steven Cheng [MSFT], Apr 2, 2008
    #3
  4. Joe

    Joe Guest

    That was it. Thanks!.

    "Peter Bromberg [C# MVP]" <> wrote in message
    news:...
    > It's probably just being cached in the browser. Clear the browser cache.
    > -- Peter
    > Site: http://www.eggheadcafe.com
    > UnBlog: http://petesbloggerama.blogspot.com
    > Short Urls & more: http://ittyurl.net
    >
    >
    > "Joe" wrote:
    >
    >> This has to be simple - I must be missing something....
    >>
    >> Here's the problem:
    >>
    >> I have a .js file in my project. In that file I have a variable imageDir
    >> declared like this: imageDir = "images/";
    >>
    >> I want to change this so it always references the root. Now I wouldn't
    >> think
    >> this is a big deal except no matter what I do to imageDir it never
    >> changes.
    >>
    >> I've even tried commenting out the line but it still gets a value at
    >> runtime.
    >>
    >> The first thing I did was make sure I don't have the wrong file open so I
    >> closed the file and double clicking on the file in the solution explorer.
    >> The file is the same.
    >> Next I did a search on the computer to see if there are other copies of
    >> it
    >> and there is 1 other copy which is in the site I publish to. I made the
    >> same
    >> change to that file but it still doesn't show.
    >>
    >> I put a break point in the .js file and even though I commented out the
    >> imageDir line it is still declared and assigned to.
    >>
    >> Does any one have any suggestions as to what else to look for? This has
    >> to
    >> be a simple problem.
    >>
    >> Thanks,
    >> Joe
    >>
    >>
    >>
     
    Joe, Apr 2, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sstark
    Replies:
    0
    Views:
    473
    sstark
    Mar 6, 2005
  2. ryang
    Replies:
    1
    Views:
    976
    Wes Groleau
    Apr 11, 2005
  3. Apogee

    Strange Behavior with ViewState

    Apogee, Jul 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    336
    Apogee
    Jul 3, 2003
  4. PJ

    DropDownList Strange Behavior

    PJ, Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    358
  5. Mantorok Redgormor
    Replies:
    70
    Views:
    1,825
    Dan Pop
    Feb 17, 2004
Loading...

Share This Page