domap resulting on error 'google' is not defined - javascript

I'm make use of GMLib some time ago to create same forms with Delphi 7 that did must interact with google maps.
At time this work great, (begin of year) until now the project stay paused, now I came back to work with him and the code that I was written back in time is not running any more.
For some reason when I run: GMap.DoMap;
I did get back a error of javascript with message:
'google' is not defined
. This occur in different lines of javascript at different times of execution and at end the program breaks on an exception.
First of all I updated my component to last version (1.2.4) once this is originally written using the 1.1.0, but this not solved my case.
Then I've tryed to find at google anyone with the same problem, but I can't find one solution. So please, if someone could help me on this, thanks.
So, sorry for posting this too soon, now that I did test the code on other machine, this run perfectly.
Well, obviously this is not a component problem, but yes a incompatibility, my pc is running Windows 8, and I have a lot of things installed on him, but I will try figure out what is causing this.

Related

iOS crash in WebCore::StorageMap::key(unsigned int)

I'm getting EXC_BAD_ACCESS crashes in a WebThread, while my app is trying to process some javascript on a page startup. The javascript is long and involved and is probably what's bringing this down. The only hint is that the call stack says it's happening in WebCore::StorageMap::key(unsigned int). Can't debug it in the web debugger because it crashes on page startup so I never get to a point where the page can be selected in the developer menu. Has anyone seen an error like this, or have a good way to track this down?
We finally figured out what was wrong. There were two pages - both used a third party Javascript library. When you ran either of them, it was fine. It was only after you ran one after the other where the second one crashed. The reason was although they were running the same library, they were running different versions of the same library, which stayed resident in cache. When the second page tried to run the library of the first page (because it was still in cache) it crashed.

How to debug my code Ruby , Javascript, CSS?

I'm new to developing and started with a ruby on rails tutorial.
There i came to an error and after redoing it and googling it for days i can't figure it out. I was told to learn how to debug but i have no clue how to. i read that it actually is not possible to debug css. Maybe i used the wrong expression and i don't want to make it about my error which i already asked about here: CSS is not working after push to heroku but works on localhost
and here endless scrolling does not work
but i was wondering how to debug in general. i found various code snippets but not a really good tutorial where it explains everything from the beginning. i found things about breakpoints which i have no clue about what it is and where to set and how to read or where to get the logfile. do you know any good tutorials about that topic which i weren't able to find yet. something like a debugging for dummies.
Thanks a lot.
The Rails Guides site is an excellent resource for learning Rails.
Here's a great one on your subject: http://guides.rubyonrails.org/debugging_rails_applications.html -- section 3 goes into the debugger itself. Should really be all you need, but let me know if you've any specific questions after reading this.
Debugging CSS is different, though. Generally, the best way to debug CSS is to play with it in real time in a web page. You can do this with the Firebug addon for FireFox, or the web inspector which is built in to Chrome and Safari.
Debugging means finding and fixing problems with your code. You can start by checking your code for syntax errors (such as typos in function names or missing punctuation). Then use print statements (such as document.write in JavaScript) to check that your variables have the correct values. Also check for mistakes in logic, such as off-by-ones and infinite loops. Based on the unexpected results (and error message, if any), try to figure out which part of your code is faulty. You can debug without a debugger program, but they offer useful features. Your code can run slowly (line-by-line or pausing at the breakpoint), so after each line/breakpoint, you can check its status.

Sitecore doing random things

I have a feeling that our Sitecore install is messed up with the configuration but I can't point out where. Things happen at random in the Sitecore client. For example -
Clicks in the Sitecore client do nothing.
If I log out say after opening up Log Viewer and then log back in, I only see the log viewer and no other options.
Clicking on a link would log me out.
If I am logged in and another admin tries to log in with his/her credentials, sometimes they see my credentials.
IE 8 continuously throws 'scWin' related javascript errors.
The first 4 are consistent across firefox, chrome and IE. The last one is totally an IE occurrence.
An IIS reset fixes these issues but then these occurrences start happening again pretty quickly.
I've looked at log files but I don't see anything there. What else can I do here?
This sounds really strange. Are you sure you are not infected with some kind of malware or some virus?
Does it occur on every pc that is working with this solution?
You could try to remove the Sitecore files and copy fresh files from the install zip to see if that resolves the issue.
This does sound rather strange... First thing I would do is make sure you followed the IE setup guide exactly, to make sure it's not your browser causing problem. Javascript is definitely enabled, yes? The fact that it happens in Firefox also though means this probably isn't the real issue. Martijn might be on to something... have you tried using another machine entirely to access the site?
It turned out to be .NET caching - section - was turned on and was causing all sorts of issues. We removed this and it all worked.

Viewing the updated HTML in ie6

I am working with ie6 (unfortunately) and i am having a javascript error. Its wondrous error message gives me a line in the html source, but unfortunately the javascript that does run changes the code for the page(dramatically). So the error that its pointing me to is a closing div tag, not actual code.
Is there a way to view the updated code for the page so I can at least know where my code is breaking?
I should also point out what im developing in.
I am developing a sharepoint 2007 solution for an winxp and ie6 user base. I am working via remote desktop on a sandbox winserver 2008 r2 and can access the site from my terminal. Now, unfortunately in my sandbox server i have ie 8 in which my code works. So im stuck on ideas. If anyone knows how to view the updated source on the page, i would be very grateful.
Thanks.
Edit. I should also mention i dont have admin access on my terminal. So i cant install visual studio. It would take a couple weeks for an issue ticket for temp admin access to install it, and this is sort of important.
If you can't install anything and the error console information isn't meaningful, then about all you can do is start modifying your code until you can find which section is causing the error. The kinds of modifications you can do are as follows:
Comment out a chunk of code in a way that won't cause more errors. If the error goes away, then you know it's in that block of code or something that code calls. Put that block back in and then comment out a piece of it and so on until you narrow down where the problem is.
Start inserting alert("1"), alert("2") prompts into your code with the goal of identifying which alert the error comes before and after until you've eventually tracked down where it is. When you rule out an area, remove the alerts to make it feasible to still run the app.
On a more modern computer (e.g. Vista/Win7) go to Microsoft's site and download both Microsoft Virtual PC and the Windows image for XP with IE6. You can then actually install things into the VM and do real IE6 debugging or at least see what the actual error is.
Find a computer with XP/IE6 on it that you can install real debugging tools on.
Build your own dummy little debug window using a textarea and a couple functions that append text to it. Put that into your browser page and start sprinkling mydebug("Entering function foo") statements throughout your code so you can narrow down which statements occur before and after the error and eventually find the error. This is how I've done some IE6 debugging when it was't worth the trouble of setting up a full-blown debug environment for IE6. This works much better than alerts for some types of problems because it doesn't interrupt the flow of the app or require lots of user intervention and you can scroll back through the history.
If you are using visual studio you can use it to debug js errors in ie.
Go to the Advanced Internet settings in ie and make sure that the two
Disable script debugging settings are turned off (so that script debugging is enabled)
and that the setting
display a notification on every script error is enabled.
If you don't have visual studio installed you can download and install microsofts script debugger (it's free just google it) and use that, tho it is not as easy to work with and won't give you as much useful information

Getting very strange javascript error and this page also refuses to work in Internet Explorer 7 or 8

This is the page I'm working on... http://schnell.dreamhosters.com/folio/earthquake.html
Its purpose is explained via the instructions on the left. I'm finding that after doing so many searches and clicking so many of the links in the list on the right that the page freezes up, the Google Map stops working and Firebug tells me of an error in main.js and it goes like this...
b is undefined
Line 49
I really don't know why this decided to happen all of a sudden and the error is so cryptic and muddled amongst Google's code that I don't think I'll be able to figure this one out by myself.
Another problem I'm finding is that the page itself simply refuses to work in IE7 and IE8 (or probably any version of IE for that matter). I am also at a loss as to how to solve this problem because I can't figure out how to use any of IE's debuggers (if they even have one) and seeing how I already tested this and made it work in two browsers (technically three since Safari runs off WebKit just like Chrome), I just don't have the drive or capacity to imagine what could be going wrong.
Any help would be greatly appreciated
Moved from comment to answer.
As scunliffe mentioned, you are trying to do a crossbrowser AJAX without using jsonp. Use either $.ajax() with datatype jsonp or add a &callback=? at the end of the URL in the $.getJSON() call.
IE8 is quite good when it comes to helping out the developer. From memory F12 will open up the developer window where you can inspect the DOM, CSS and debug script.
Your error is cryptic because most javascript comes minified, so variables are all remapped to single letters, etc. See if the script causing the problem has a development (i.e. unminified) version as this will make a lot more sense to step through.
With regards to your specific issue it sounds like a timing issue. While browsers do a decent job of executing script in a consistent way if you follow standards, they do differ in their timings i.e. when things execute. That would explain why b is undefined in some cases and not others.

Categories