kan man kombinere DHTML & ASP?
Jeg har forsøgt at indsætte et DHTML script i mit ASP script og får nu følgende fejl:Linie:40
Tegn:11
Fejl: et objekt er obligatorisk
Kode:0
Se starten af scriptet:
<%@ LANGUAGE=\"VBSCRIPT\" %>
<% Option Explicit
%>
<!-- #INCLUDE VIRTUAL=\"/adovbs.inc\" -->
<%
dim link
sub hent_link(link)
Dim conn, RS, sql
Set conn = Server.CreateObject(\"ADODB.Connection\")
conn.Open Application(\"database\")
Set RS = Server.CreateObject(\"ADODB.Recordset\")
RS.Open \"SELECT * FROM TLink WHERE LinkType=\'\"& link &\"\'\", conn
while not RS.EOF
response.write \"<a href=\"\"java script:AabenLink(\'\"
response.write RS(\"URL\")
response.write \"\')\"\">\"
response.write RS(\"Beskrivelse\")
response.write \"</a><br>\"
RS.MoveNext
Wend
RS.Close
Set RS = NOTHING
conn.close
Set conn = NOTHING
end sub
%>
<script type=\"text/javascript\">
<!--
function AabenLink(URL)
{
NytVind = window.open(URL, \"NytVind\", \"toolbar=no,status=no,resizable=yes,scrollbars=yes,width=400,height=300\")
}
// -->
</script>
<script type=\"text/javascript\" language=\"JavaScript\">
//Default browsercheck, added to all scripts!
function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf(\"MSIE 5\")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new checkBrowser()
</script>
<script language=\"JavaScript1.2\" src=\"coolmenus_cc_borders2.js\">
</script>
<script>
/********************************************************************************
Variables to set.
Remember that to set fontsize and fonttype you set that in the stylesheet
above!
********************************************************************************/
//Making a menu object
oMenu=new menuObj(\'oMenu\') //Place a name for the menu in there. Must be uniqe for each menu
//Setting menu object variables
//Style variables NOTE: The stylesheet have been removed. Use this instead! (some styles are there by default, like position:absolute ++)
/*************************************************************/
// NEW NOTE: Don\'t specify your font colors in the styles below. They\'ll be ignored. Use the variables further down in the script.
// The styles with the \'Hilite\' suffixes are for the Netscape \"on\" state.
// If you want IE to display the \"hand\" cursor over the links, add \"cursor:hand;\" to each of the three classes with the \"clA\" prefixes at the bottom.
/*************************************************************/
oMenu.clMain=\'padding:2px; font-family:Arial;verdana;helvetica; font-size:11px; font-weight:bold\' //The style for the main menus
oMenu.clMainHilite=\'padding:2px; font-family:verdana; font-size:12px; font-weight:bold;\' //The style for NN main mouseovers
oMenu.clSub=\'padding:5px; font-family:verdana; font-size:10px;\' //The style for the submenus
oMenu.clSubHilite=\'padding:5px; font-family:verdana; font-size:10px;\' //The style for NN submenu mouseovers
oMenu.clSubSub=\'padding:5px; font-family:verdana; font-size:10px;\' //The style for the subsubmenus
oMenu.clSubSubHilite=\'padding:5px; font-family:verdana; font-size:10px;\' //The style for NN subsubmenu mouseovers
oMenu.clAMain=\'text-decoration:none; cursor:default\' //The style for the main links
oMenu.clASub=\'text-decoration:none; cursor:default\' //The style for the sub links
oMenu.clASubSub=\'text-decoration:none; cursor:default\' //The style for the subsub links
/***************************************
Border and separator variables
NOTE: The first sub border (s1BorderSize) will default to the main border size if you\'re arranging the menus in columns across the top (menurows=1). Only if the menus are in left-hand rows (menurows=0) will the s1BorderSize variable be applied.
****************************************/
oMenu.mBorderColor= \'000000\';
oMenu.s1BorderColor= \'000000\';
oMenu.s2BorderColor= \'000099\';
oMenu.mBorderSize= 0; // The \"frame\" border size
oMenu.s1BorderSize= 1;
oMenu.s2BorderSize= 1;
oMenu.s1Separator= 1; // The borders between the menu items
oMenu.s2Separator= 1;
/****************************************
*****************************************/
//Background bar properties
oMenu.backgroundbar=1 //Set to 0 if no backgroundbar
oMenu.backgroundbarfromleft=120 //The left placement of the backgroundbar in pixel or %
oMenu.backgroundbarfromtop=128//The top placement of the backgroundbar in pixel or %
oMenu.backgroundbarsize=\"642\" //The size of the bar in pixel or %
oMenu.backgroundbarcolor=\"003f5c\" //The backgroundcolor of the bar
oMenu.mainheight=23 //The height of the main menuitems in pixel or %
oMenu.mainwidth=105 //The width of the main menuitems in pixel or %
/**************************************************************/
// NEW VARIABLES
oMenu.mainOff= \'ffffff\'; // The main menu font \"off\" color
oMenu.mainHilite= \'ffff00\'; // The main menu font \"on\" color
oMenu.subOff= \'000099\' // The submenu font \"off\" color
oMenu.subHilite= \'ffcc99\'; // The submenu font \"on\" color
oMenu.subsubOff= \'990000\' // The subsubmenu font \"off\" color
oMenu.subsubHilite= \'ffffff\' // The subsubmenu font \"on\" color
/**************************************************************/
/*These are new variables. In this example they are set like the previous version*/
oMenu.subwidth=117 // ** NEW ** The width of the submenus
oMenu.subheight=20 //The height if the subitems in pixel or %
oMenu.subsubwidth=oMenu.mainwidth // ** NEW ** The width of the subsubmenus in pixel or %
oMenu.subsubheight=oMenu.subheight //** NEW ** The height if the subsubitems in pixel or %
//Writing out the style for the menu (leave this line!)
oMenu.makeStyle()
oMenu.subplacement=oMenu.mainheight //** NEW ** Relative to the main item
oMenu.subsubXplacement=oMenu.subwidth/2 //** NEW ** The X placement of the subsubmenus, relative to the sub item
oMenu.subsubYplacement=7 //** NEW ** The Y placement of the subsubmenus, relative to the sub item
oMenu.mainbgcoloroff=\'003f5c\' //The backgroundcolor of the main menuitems
oMenu.mainbgcoloron=\'#003f5c\' //The backgroundcolor on mouseover of the main menuitems
oMenu.subbgcoloroff=\'#cccc99\' //The backgroundcolor of the sub menuitems
oMenu.subbgcoloron=\'#663300\' //The backgroundcolor on mouseover of the sub menuitems
oMenu.subsubbgcoloroff=\'#ffffcc\' //The backgroundcolor of the subsub menuitems
oMenu.subsubbgcoloron=\'#003f5c\' //The backgroundcolor on mouseover of the subsub menuitems
oMenu.menuspeed=10 //The speed of the clipping in px
oMenu.menusubspeed=15 //The speed of the submenus clipping in px
oMenu.menurows=1 //Set to 0 if you want rows and to 1 if you want columns
//Placement of the menuitems
//Example in %:
//oMenu.menuplacement=new Array(\"0%\",\"40%\",\"60%\",\"50%\",\"65%\",\"80%\") //Remember to make the arrays contain as many values as you have main menuitems
//Example in px: (remember to use the \' \' around the numbers)
//oMenu.menuplacement=new Array(\'130\',\'239\',\'348\',\'457\',\'566\',\'675\')
//Example right beside eachother (only adding the pxbetween variable)
oMenu.menuplacement=0
//If you use the \"right beside eachother\" you cant how many pixel there should be between each here
oMenu.pxbetween=0 //in pixel or %
//And you can set where it should start from the left here
oMenu.fromleft=120 //in pixel or %
//This is how much from the top the menu should be.
oMenu.fromtop=128 //in pixel or %
/********************************************************************************
Construct your menus below
********************************************************************************/
//MAIN 0
//Main items:
// makeMain(MAIN_NUM,\'TEXT\',\'LINK\',\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeMain(0,\'Natur & Teknik\',\'http://www.yahoo.com\',\'lower\')
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(0,0,\'Scripts\',\'http://www.yahoo.com\',5,\'bob\')
oMenu.makeSub(0,1,\'Demos\',\'http://www.yahoo.com\',5)
oMenu.makeSub(0,2,\'Support\',0,5)
oMenu.makeSub(0,3,\'Tutorials\',0,5)
oMenu.makeSub(0,4,\'Forums\',0,5)
//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\')
oMenu.makeSubSub(0,0,0,\'ZoomFade\',\'http://www.altavista.com\',7,\'_blank\')
oMenu.makeSubSub(0,0,1,\'ScrollText\',\'http://www.google.com\',7)
oMenu.makeSubSub(0,0,2,\'PageScroll\',\'#\',7)
oMenu.makeSubSub(0,0,3,\'Foldoutmenu\',\'#\',7)
oMenu.makeSubSub(0,0,4,\'Spotlight\',\'#\',7)
oMenu.makeSubSub(0,0,5,\'Bgchange\',\'#\',7)
oMenu.makeSubSub(0,0,6,\'Showhide\',\'#\',7)
oMenu.makeSubSub(0,1,0,\'DHTML Guestbook\',\'#\',6)
oMenu.makeSubSub(0,1,1,\'DHTML Intro\',\'#\',6)
oMenu.makeSubSub(0,1,2,\'CircleMenu\',\'#\',6)
oMenu.makeSubSub(0,1,3,\'DHTML Space 1.0\',\'#\',6)
oMenu.makeSubSub(0,1,4,\'Old site 4\',\'#\',6)
oMenu.makeSubSub(0,1,5,\'BallControl\',\'#\',6)
oMenu.makeSubSub(0,2,0,\'Site FAQ\',\'#\',2)
oMenu.makeSubSub(0,2,1,\'Scripts FAQ\',\'#\',2)
oMenu.makeSubSub(0,3,0,\'Introduction\',\'#\',3)
oMenu.makeSubSub(0,3,1,\'5th generation\',\'#\',3)
oMenu.makeSubSub(0,3,2,\'Keyboard\',\'#\',3)
oMenu.makeSubSub(0,4,0,\'Forum 1\',\'test.html\',2)
oMenu.makeSubSub(0,4,1,\'Forum 2\',\'test.html\',2)
//MAIN 1
oMenu.makeMain(1,\'Humaniora\',\'#\')
//MAIN 2
oMenu.makeMain(2,\'Sundhed\',0)
oMenu.makeSub(2,0,\'Yahoo\',0,2)
oMenu.makeSub(2,1,\'Altavista\',\'#\',2)
oMenu.makeSubSub(2,0,0,\'Yahoo Norway\',\'#\',3)
oMenu.makeSubSub(2,0,1,\'Yahoo US\',\'#\',3)
oMenu.makeSubSub(2,0,2,\'Yahoo UK\',\'#\',3)
oMenu.makeMain(3,\'Teologi\',\'#\');
oMenu.makeMain(4,\'Jura\',\'http://www.yahoo.com\',\'lower\')
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(4,0,\'Scripts\',\'http://www.yahoo.com\',5)
oMenu.makeSub(4,1,\'Demos\',0,5)
oMenu.makeSub(4,2,\'Support\',0,5)
oMenu.makeSub(4,3,\'Tutorials\',0,5)
oMenu.makeSub(4,4,\'Forums\',0,5)
//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\')
oMenu.makeSubSub(4,0,0,\'ZoomFade\',\'http://www.altavista.com\',7,\'_blank\')
oMenu.makeSubSub(4,0,1,\'ScrollText\',\'#\',7)
oMenu.makeSubSub(4,0,2,\'PageScroll\',\'#\',7)
oMenu.makeSubSub(4,0,3,\'Foldoutmenu\',\'#\',7)
oMenu.makeSubSub(4,0,4,\'Spotlight\',\'#\',7)
oMenu.makeSubSub(4,0,5,\'Bgchange\',\'#\',7)
oMenu.makeSubSub(4,0,6,\'Showhide\',\'#\',7)
oMenu.makeSubSub(4,1,0,\'DHTML Guestbook\',\'#\',6)
oMenu.makeSubSub(4,1,1,\'DHTML Intro\',\'#\',6)
oMenu.makeSubSub(4,1,2,\'CircleMenu\',\'#\',6)
oMenu.makeSubSub(4,1,3,\'DHTML Space 1.0\',\'#\',6)
oMenu.makeSubSub(4,1,4,\'Old site 4\',\'#\',6)
oMenu.makeSubSub(4,1,5,\'BallControl\',\'#\',6)
oMenu.makeSubSub(4,2,0,\'Site FAQ\',\'#\',2)
oMenu.makeSubSub(4,2,1,\'Scripts FAQ\',\'#\',2)
oMenu.makeSubSub(4,3,0,\'Introduction\',\'#\',3)
oMenu.makeSubSub(4,3,1,\'5th generation\',\'#\',3)
oMenu.makeSubSub(4,3,2,\'Keyboard\',\'#\',3)
oMenu.makeSubSub(4,4,0,\'Forum 1\',\'test.html\',2)
oMenu.makeSubSub(4,4,1,\'Forum 2\',\'test.html\',2)
oMenu.makeMain(5,\'Samfund/Økonomi\',\'#\');
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(5,0,\'Scripts\',\'http://www.yahoo.com\',5,\'bob\')
oMenu.makeSub(5,1,\'Demos\',\'http://www.yahoo.com\',5)
oMenu.makeSub(5,2,\'Support\',0,5)
oMenu.makeSub(5,3,\'Tutorials\',0,5)
oMenu.makeSub(5,4,\'Forums\',0,5)
//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\')
oMenu.makeSubSub(5,0,0,\'ZoomFade\',\'http://www.altavista.com\',7,\'_blank\')
oMenu.makeSubSub(5,0,1,\'ScrollText\',\'http://www.google.com\',7)
oMenu.makeSubSub(5,0,2,\'PageScroll\',\'#\',7)
oMenu.makeSubSub(5,0,3,\'Foldoutmenu\',\'#\',7)
oMenu.makeSubSub(5,0,4,\'Spotlight\',\'#\',7)
oMenu.makeSubSub(5,0,5,\'Bgchange\',\'#\',7)
oMenu.makeSubSub(5,0,6,\'Showhide\',\'#\',7)
oMenu.makeSubSub(5,1,0,\'DHTML Guestbook\',\'#\',6)
oMenu.makeSubSub(5,1,1,\'DHTML Intro\',\'#\',6)
oMenu.makeSubSub(5,1,2,\'CircleMenu\',\'#\',6)
oMenu.makeSubSub(5,1,3,\'DHTML Space 1.0\',\'#\',6)
oMenu.makeSubSub(5,1,4,\'Old site 4\',\'#\',6)
oMenu.makeSubSub(5,1,5,\'BallControl\',\'#\',6)
oMenu.makeSubSub(5,2,0,\'Site FAQ\',\'#\',2)
oMenu.makeSubSub(5,2,1,\'Scripts FAQ\',\'#\',2)
oMenu.makeSubSub(5,3,0,\'Introduction\',\'#\',3)
oMenu.makeSubSub(5,3,1,\'5th generation\',\'#\',3)
oMenu.makeSubSub(5,3,2,\'Keyboard\',\'#\',3)
oMenu.makeSubSub(5,4,0,\'Forum 1\',\'test.html\',2)
oMenu.makeSubSub(5,4,1,\'Forum 2\',\'test.html\',2)
/********************************************************************************
End menu construction
********************************************************************************/
//When all the menus are written out we initiates the menu
oMenu.construct()
</script>
<head>
<LINK href=\"/main.css\" rel=\"stylesheet\" type=\"text/css\">
<title>[ MIN SIDE.. ]</title>
<style fprolloverstyle>A:hover {color: #FF0000}
</style>
</head>
<body bgcolor=\"#18949C\" topmargin=\"0\" leftmargin=\"0\">
<!-- #INCLUDE VIRTUAL=\"/inc/headerforside.asp\" -->
<table border=\"0\" width=\"642\" height=\"20\">
<tr>
<td width=\"115\" valign=\"top\" align=\"middle\" height=\"100%\">
<!-- #INCLUDE VIRTUAL=\"/inc/leftmenu.asp\" -->
</td>
<td bgcolor=\"#FFFFFF\" width=\"642\" valign=\"top\" height=\"100%\">
<!-- Her er det reele indhold af siden. -->
<!-- Billeder i toppen af siden -->
