jquery - Javascript ajax scripts in <head>? -


i have 2 html page (main , details): main page consists of table , empty div. when user clicks 1 table row, empty div filled via ajax page (details page).

on details page want load google map. page operational (standalone), not via ajax.

so here problem: use google maps have include script in head of html:

<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> 

if include in details page, works fine standalone. doesn't work when try via ajax main page. google server hangs, , doesn't progress.

on other hand, if include in main page, ajax works fine, details page not operational on own, since missing vital include.

i'd leave in details page, since has more logic there. there way can load script in main page, details page?

generally best approach javascript including , ajax? keep in main page? or there mechanism load main page, keep code in ajaxed pages?

btw. i'm using jquery, not important. design issues, not library problem.

since not using iframe, best include javascript in main page rather detail page - since can , js work. think fix ajax issue , script loaded once.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -