Log in

View Full Version : using query strings in urls with dynamic ajax content script



battybat
02-06-2009, 01:24 PM
Dynamic Ajax Content

http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

is it possible to use a query in the url with this script?

eg
<a href="javascript:ajaxpage('test.aspx?id=123', 'contentarea');">test</a>
<div id="contentarea"></div>

I've tried and it doesn't run the script - is there a workaround?

cheers

Terry

jscheuer1
02-06-2009, 02:41 PM
Client side scripts on AJAX imported content generally don't run. If it is all on the server side, then there should be no problem. One thing though, the syntax of the bust cache in this script could be a problem. Try it without that:


var bustcachevar=0 //bust potential caching of external pages after initial request? (1=yes, 0=no)


If that fixes it we can tweak the script. Otherwise, the problem is likely that part of the imported script is client side.