View Full Version : dynamic loads

05-20-2009, 10:41 PM
1) DHTML Window widget

2) http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

Hi, not a problem just a query.

I am trying to get this to load differnet pages dynamically in an asp page.

<script type="text/javascript">
function openmypage(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", 'page.asp?page=<%=rs("xxx")%>', ": ", "width=450px,height=300px,left=300px,top=100px,resize=1,scrolling=0")
<div id="contentarea"></div>
<a href="#" onClick="openmypage(); return false">xxx</b></a>

<a href="#" onClick="ajaxwin.load('ajax', 'page.asp?page=<%=rs("xxx")%>', '<%=rs("xxx")%>'); return false"><%=rs("xxx")%> [p}</a>

This gets repeated in the page many time dynamically. In source code I see the right images are there but when I open the window it only loads the same page everytime. The ajaxwin.load link loads the correct page after the first is open.

I have no idea how to do this but I imagine I might need to make an object out of the script bit so I dont need to have it repeated for every entry.

I have used this ajax routeen successfully before

onclick="javascript:ajaxpage('page.asp?page=<%=rs("xxx")%>', 'contentarea');"><%=rs("xxx")%> [p}</a>

<div id="contentarea"></div>

My question is, is there some way to adjust this so get it to do what I want?
Thanks for any help