Hi guys,
I am pretty new to jquery, and looking forward to use it extensively in our programs.
Our crm system consists of several frames and an iframe.
The javascripts are load in a frame, called "jscriptframe".
The objects shown on the browser is in an iframe called "workframe" and this iframe is in a frame called "mainframe"
I have already tried to run the jvectormap in a plain html and it works without problems:
- <html>
- <head>
- <title>jVectorMap demo</title>
- <link rel="stylesheet" href="jquery-jvectormap-1.2.2.css" type="text/css" media="screen"/>
- <script src="../jquery/jquery-1.10.2.min.js"></script>
- <script src="jquery-jvectormap-1.2.2.min.js"></script>
- <script src="jquery-jvectormap-world-mill-en.js"></script>
- </head>
- <body>
- <div id="world-map" style="width: 600px; height: 400px"></div>
- <script>
- $(function(){
- $('#world-map').vectorMap();
- });
- </script>
- </body>
- </html>
To integrate it to our crm system, I have tried following javascript code:
- $(function(){
- $('#world-map').vectorMap();
- });
which didn't work, since I think the jscript (jquery and the jvectormap library) are loaded in a different frame than where the <div id="world-map" /> located (Which is in this case in the iframe)
Than I have tried following code:
- $(function(){
- $('#world-map', window.document).vectorMap();
- });
With this code, the div is at least filled in with the background of the map, which should be shown by the jvectormap. But the map is not shown
I have tried different thinks, but still can't understand why it doesn't work.
If I analyze the source code, the dynamically produced code is identical to the plain html.
I really appreciate your helps.
BR,
mzda