Strange behavior

Strange behavior

am 02.04.2008 02:52:49 von joe

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

RE: Strange behavior

am 02.04.2008 03:10:17 von pbromberg

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
>
>
>

RE: Strange behavior

am 02.04.2008 05:24:27 von stcheng

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:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.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
>
>
>

Re: Strange behavior

am 02.04.2008 14:32:08 von joe

That was it. Thanks!.

"Peter Bromberg [C# MVP]" wrote in message
news:65856DCB-B316-49CC-B92E-B17290E1CD4E@microsoft.com...
> 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
>>
>>
>>