Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET MVC 2
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 30th, 2013, 04:29 PM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old August 30th, 2013, 08:31 PM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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?
Reply With Quote
  #3 (permalink)  
Old August 31st, 2013, 04:33 PM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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>
Reply With Quote
  #4 (permalink)  
Old January 13th, 2014, 08:03 AM
Banned
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2014
Location: 950 Ocello Street, florida
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #5 (permalink)  
Old October 14th, 2014, 01:01 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03:33 PM
Working JavaScript Regex vinaura Javascript How-To 0 August 16th, 2007 02:06 PM
Javascript Not working sohrabus ASP.NET 2.0 Professional 4 May 5th, 2007 01:42 PM



All times are GMT -4. The time now is 09:27 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.