[TYPO3-english] Reload/Refresh Page Content Without Reloading Page
Philipp Gampe
typo3.lists at philippgampe.info
Wed Jan 4 09:02:12 CET 2012
Hi Scotty C,
Scotty C wrote:
> / / Expand links to call
> url : url . replace ( / \ html /. , "/ ajax.html" ),
> / / If it worked
> success : function ( html ) {
I think here is the first problem. This replace line does not look correct.
First of all, the spaces should not be there:
url.replace( /\html/. , "/ ajax.html" )
and your are replacing html somthing with ajax.html.
Please check that the replacement worked by calling
alert(url); directly afer success.
Does example.org/ajax.html exists on your site? (realurl configuration)
> headerData.10 = TEXT
> headerData.10.value = <SCRIPT language="JavaScript" type="text/javascript"
> src="fileadmin/demo/ajax/actions.js"></SCRIPT><SCRIPT
> language="JavaScript" type="text/javascript"
> src="fileadmin/demo/ajax/jquery-1.7.1.min.js"></SCRIPT>
You should use:
page.includeJSlibs.jquery = fileadmin/demo/ajax/jquery-1.7.1.min.js
page.includeJS.ajax = fileadmin/demo/ajax/actions.js
This will make sure that both are in the correct order and this is much
cleaner. You should not use page.headerData any more for JS or CSS.
BTW, you include both JS files in the wrong order. This might lead to JS
errors, because the library is not yet loaded.
Best regards
--
Philipp Gampe – PGP-Key 0AD96065
More information about the TYPO3-english
mailing list