PDA

View Full Version : scripts in ajax external nested asp page



Billy Johnson
12-04-2007, 10:46 PM
1) Script Title: Animated Collapsible DIV

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

3) Describe problem: cant get script to work in the nested page...


<!---<head>
<title>Ajax Tabs Content script Instruc</title>
<link rel="stylesheet" type="text/css" href="styles/ajaxtabs.css" />

<script type="text/javascript" src="scripts/ajaxtabs.js">

/***********************************************
* Ajax Tabs Content script v2.0- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
<script type="text/javascript" src="../scripts/switchcontent.js" >

/***********************************************
* Switch Content script- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated April 05th, 2007.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<style type="text/css">

/*Style sheet used for demo. Remove if desired*/
.handcursor{
cursor:hand;
cursor:pointer;
}

</style>


</head>

<body>
<table bgcolor="ffffff" height="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tr align="center">
<td align="center">
<ul id="countrytabs" class="shadetabs">
<li>
<a href="ajax_ext/externalnested.asp" rel="countrycontainer">Residential</a></li>
<li>
<a href="ajax_ext/externalnested2.asp" rel="countrycontainer">Business</a></li>
<li>
<a href="ajax_ext/externalnested3.asp" rel="countrycontainer">Customer Service</a></li>
<li>
<a href="ajax_ext/externalnested5.asp" rel="countrycontainer">Networking</a></li>
<li>
<a href="ajax_ext/externalnested5.asp" rel="countrycontainer">Creative Services</a></li>
</ul>

<!--<a href="#" rel="#default" class="selected"__#iframe-->
<div id="countrydivcontainer" style="border:1px solid gray; width:100%; margin-bottom: 1em; padding: 50px">
<p>This is some default tab content, embedded directly inside this space and not via Ajax. It can be shown when no tabs are automatically selected, or associated with a certain tab, in this case, the first tab.</p>
</div>

<script type="text/javascript">

var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()

countries.onajaxpageload=function(pageurl){
if (pageurl.indexOf("externalnested.asp")!=-1){
var res=new ddajaxtabs("restabs", "resdivcontainer")
res.setpersist(true)
res.setselectedClassTarget("link") //"link" or "linkparent"
res.init()
}
else if (pageurl.indexOf("externalnested2.asp")!=-1){
var bus=new ddajaxtabs("restabs2", "resdivcontainer2")
bus.setpersist(true)
bus.setselectedClassTarget("link") //"link" or "linkparent"
bus.init()
}
else if (pageurl.indexOf("externalnested3.asp")!=-1){
var cus=new ddajaxtabs("restabs3", "resdivcontainer3")
cus.setpersist(true)
cus.setselectedClassTarget("link") //"link" or "linkparent"
cus.init()
}
else if (pageurl.indexOf("externalnested4.asp")!=-1){
var net=new ddajaxtabs("restabs4", "resdivcontainer4")
net.setpersist(true)
net.setselectedClassTarget("link") //"link" or "linkparent"
net.init()
}
else if (pageurl.indexOf("externalnested5.asp")!=-1){
var dev=new ddajaxtabs("restabs5", "resdivcontainer5")
dev.setpersist(true)
dev.setselectedClassTarget("link") //"link" or "linkparent"
dev.init()
}
}
</script>








</td>
</tr>
</table>-->

any ideas?

Billy Johnson
12-04-2007, 11:02 PM
wrong code

Sorry...lol