Código original:
Código PHP:
<script type="text/javascript">
var myajaxbook={} //arbitrary variable to hold page settings for this book
page:["demofiles/flower.htm", "demofiles/flower2.htm", "demofiles/flower3.htm", "demofiles/flower4.htm"]
selectedpage:0 //set page shown by default (0=1st page)
var myajaxbookalt={} //arbitrary variable to hold page settings for another book
page:["demofiles/external.htm", "demofiles/external2.htm", "demofiles/external3.htm"]
selectedpage:0 //set page shown by default (0=1st page)
var mypages=new ajaxpageclass.bindpages(myajaxbook, "pcontent", ["paginate-top", "paginate-bottom"])
</script>
Código PHP:
<script language=javascript>
<%
response.write (" var comments={\n; ")
sql="Select id,Titulo,sumario from MMX_News order by id asc"
set rs=dbConn.Execute(sql)
id_array= rs("id")
for i=0 to ubound(id_array)
response.write(""pages:["index.asp?="&id_array&]"")
next
response.write"'"selectedpage:0n"'"
var resultado=new ajaxpageclass.createBook(comments, "pcontent", ["paginate-top", "paginate-bottom"])
%>
</script>