Wrox Programmer Forums
|
BOOK: Professional ASP.NET MVC 2
This is the forum to discuss the Wrox book Professional ASP.NET MVC 2 by Jon Galloway, Scott Hanselman, Phil Haack, Scott Guthrie, Rob Conery; ISBN: Professional ASP.NET MVC 2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2013, 03:29 PM
Registered User
 
Join Date: Aug 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default JavaScript not working

I am working on the mapping section in Chapter 1 and everything works as expected except the Longitude/Latitude values are not being passed back to the input controls.

If I embed the map.js code within the actual page everything works fine but when I reference .js file it stops working.

I have tried referencing map.js at all levels starting with site.master and working my way down but still no luck.

Seems odd that the majority of the code within the file is working and I can even set a break point and view the values that are supposed to be passed back but I get nothing.

Can anyone tell me what I am missing?

Thanks,
Todd
 
Old August 30th, 2013, 07:31 PM
Registered User
 
Join Date: Aug 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

okay...it appears to be a caching issue. If I rename the .js and run then all works fine. Problem now is if I rename the .js back to the original it appears to revert to old functionallity. I have gone through the directory structure and deleted debug objects but that did not help. Also, ctl-f5 does not appear to work either. Any ideas?
 
Old August 31st, 2013, 03:33 PM
Registered User
 
Join Date: Aug 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found a quick fix for this problem…apparently adding a version number to the .js file will force a refresh each time.
Code:
<script src="../../Scripts/Map.js?version=1.0.0" type="text/javascript"></script>
 
Old January 13th, 2014, 08:03 AM
EricCulbertson
Guest
 
Posts: n/a
Default

is it working in your case ? .. as if it is (hopefully) then i will too try with this as now has got stuck in mid way and there is nothing helpful coming in my way except this
 
Old October 14th, 2014, 12:01 AM
Registered User
 
Join Date: Jul 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript Issues

Hello, I am not that good enough about this things but I hope I could contribute something according to what I have read. It is said that, if in case you received error as such Javascript is not redefined or the error is denied. It might be that you are working on any type of web site or application that has any other dependencies. For this case, issues might be resolve by simply defining a variable.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Validation not working in IE8 abhibhai119 Javascript 0 December 11th, 2010 02:49 AM
JavaScript changes arent working flyinhawaiian BOOK: Professional ASP.NET MVC 2 1 October 13th, 2010 02:33 PM
Working JavaScript Regex vinaura Javascript How-To 0 August 16th, 2007 01:06 PM
Javascript Not working sohrabus ASP.NET 2.0 Professional 4 May 5th, 2007 12:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.