Log in

View Full Version : Anylink Dropdown menu on Dynamic Ajax Content



jjmc_09
10-17-2008, 08:18 AM
1) Script Title:
AnyLink Dropdown menu
Dynamic Ajax Content

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem:

Is it possible to run AnyLink Dropdown Menu on Dynamic Ajax Content? I have tried encoding

var menu1=new Array()
menu1[0]='<a href="javascript:ajaxpage('test.htm', 'contentarea');">LOAD CONTENT</a>'
menu1[1]='<a href="javascript:ajaxpage('test.htm', 'contentarea');">LOAD CONTENT</a>'
menu1[2]='<a href="javascript:ajaxpage('test.htm', 'contentarea');">LOAD CONTENT</a>'
menu1[3]='<a href="javascript:ajaxpage('test.htm', 'contentarea');">LOAD CONTENT</a>'

Is there any other way to call the content?

Thank you in advance.

ddadmin
10-18-2008, 11:21 PM
There's no easy way unfortunately. This isn't an issue with Ajax Content script, but rather, just a pesky limitation of Ajax. Pages fetched via Ajax should they contain run time JavaScripts within it won't run correctly when brought over this way. Ajax basically copies the contents of the external file similar to copying plain text and just dumps it onto the main page. Run Time JavaScript can't just be copied over dynamically and expected to run properly.

There are a few workarounds to this limitation in general, but frankly it's beyond the scope of the type of issues I'd like to support, as it's messy and needs to be custom tailored based on the script in question and your page as well.

jjmc_09
10-20-2008, 11:23 AM
There's no easy way unfortunately. This isn't an issue with Ajax Congtent script, but rather, just a pesky limitation of Ajax. Pages fetched via Ajax should they contain run time JavaScripts within it won't run correctly when brought over this way. Ajax basically copies the contents of the external file similar to copying plain text and just dumps it onto the main page. Run Time JavaScript can't just be copied over dynamically and expected to run properly.

There are a few workarounds to this limitation in general, but frankly it's beyond the scope of the type of issues I'd like to support, as it's messy and needs to be custom tailored based on the script in question and your page as well.

It's quite heartbreaking to know that. Thank you, anyway. May I know if there is any alternative drop down menu that I can actually run on Ajax (fingers crossed)? Thank you again in advance.