Script aamroepen werkt niet

Status
Niet open voor verdere reacties.

uaejeroen

Terugkerende gebruiker
Lid geworden
7 dec 2009
Berichten
1.665
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
	background-image: url(afbeeldingen/ACHTERGROND.jpg);
}
</style>
</head>

<body>

<center>
<script type="text/javascript" src="javascript/slide.js"></script>


  <p><a href="index.html">    Home</a> Blog Kavels Fotogallerij
  </p>
</center>
</body>
</html>

zoals u ziet wil ik slide.js aanroepen
deze code ziet u hieronder
[JS]<script type="text/javascript" src="slide.js"></script>


// Flexible Image Slideshow- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use

var ultimateshow=new Array()

//ultimateshow[x]=["path to image", "OPTIONAL link for image", "OPTIONAL link target"]

ultimateshow[0]=['klostersee 1.gif', '', '']
ultimateshow[1]=['klosttersee 2.gif', 'http://www.dynamicdrive.com', '_new']
ultimateshow[2]=['klosttersee 3', 'http://www.codingforums.com', '']

//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidth="300px" //set to width of LARGEST image in your slideshow
var slideheight="261px" //set to height of LARGEST iamge in your slideshow
var slidecycles="3" //number of cycles before slideshow stops (ie: "2" or "continous")
var randomorder="no" //randomize the order in which images are displayed? "yes" or "no"
var preloadimages="yes" //preload images? "yes" or "no"
var slidebgcolor='white'

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=3000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById
var curcycle=0

if (preloadimages=="yes"){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[0]
}
}

var currentslide=0

function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){
ultimateshowCopy[z]=targetarray[the_one]
targetarray[the_one]="_selected!"
z++
}
}
}

if (randomorder=="yes")
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow

function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='<a href="'+ultimateshowCopy[currentslide][1]+'" target="'+ultimateshowCopy[currentslide][2]+'">'
ultcontainer+='<img src="'+ultimateshowCopy[currentslide][0]+'" border="0">'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='</a>'
ultcontainer+='</center>'
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout("rotateimages()",slidedelay)
}

if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')

function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom
rotateimages()
}

if (ie||dom)
window.onload=start_slider

[/JS]

er gebuirt niks, ik zie geen foto's... die foto's staan in de map javascript, dus ze hoeven niet aan geroepen te worden in andere map

kan iemand me helpen
 
die foto's staan in de map javascript, dus ze hoeven niet aan geroepen te worden in andere map
Toch wel, je moet het pad bepalen t.o.v. van de html-pagina, dus er zal nog javascript/ voor de naam van de plaatjes moeten komen.

En dit hoort natuurlijk niet een .js bestand:
HTML:
script type="text/javascript" src="slide.js"></script>
 
er gebeurt helemaal niets

HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
	background-image: url(afbeeldingen/ACHTERGROND.jpg);
}
</style>
</head>

<body>

<center>
<script type="text/javascript" src="slide.js"></script><br />
<script type="text/javascript" src="ticker.js"></script><br />
  <p><a href="index.html">    Home</a> Blog Kavels Fotogallerij
  </p>
</center>
</body>
</html>

[JS]


// Flexible Image Slideshow- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use

var ultimateshow=new Array()

//ultimateshow[x]=["path to image", "OPTIONAL link for image", "OPTIONAL link target"]

ultimateshow[0]=['klostersee 1.gif', '', '']
ultimateshow[1]=['klosttersee 2.gif', 'http://www.dynamicdrive.com', '_new']
ultimateshow[2]=['klosttersee 3', 'http://www.codingforums.com', '']

//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidth="300px" //set to width of LARGEST image in your slideshow
var slideheight="261px" //set to height of LARGEST iamge in your slideshow
var slidecycles="3" //number of cycles before slideshow stops (ie: "2" or "continous")
var randomorder="no" //randomize the order in which images are displayed? "yes" or "no"
var preloadimages="yes" //preload images? "yes" or "no"
var slidebgcolor='white'

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=3000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById
var curcycle=0

if (preloadimages=="yes"){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[0]
}
}

var currentslide=0

function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){
ultimateshowCopy[z]=targetarray[the_one]
targetarray[the_one]="_selected!"
z++
}
}
}

if (randomorder=="yes")
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow

function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='<a href="'+ultimateshowCopy[currentslide][1]+'" target="'+ultimateshowCopy[currentslide][2]+'">'
ultcontainer+='<img src="'+ultimateshowCopy[currentslide][0]+'" border="0">'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='</a>'
ultcontainer+='</center>'
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout("rotateimages()",slidedelay)
}

if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')

function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom
rotateimages()
}

if (ie||dom)
window.onload=start_slider

[/JS]

[JS]

//News Bar script- By Premshree Pillai (premshree@hotmail.com)
//http://www.qiksearch.com/javascripts.htm
//Enhancements by Dynamic Drive
//Visit http://www.dynamicdrive.com for this script

var msgs = new Array(
"Welkom op de website van klostersee",
"Op deze website vind u alles over landhauspark klostersee",
"Freewarejava.com",
"Wired News- Technology and beyond",
"Qiksearch.com" ); // No comma after last ticker msg

var msg_url = new Array(
"http://www.klostersee.de",
"http://www.klostersee.de/html/informatie.htm",
"http://freewarejava.com",
"http://www.wired.com",
"http://www.qiksearch.com" ); // No comma after last ticker url

var barwidth='350px' //Enter main bar width in px or %
var setdelay=3000 //Enter delay between msgs, in mili-seconds
var mouseover_color='#E1FFE1' //Specify highlight color
var mouseout_color='#FFFFFF' //Specify default color
/////////////////////////////////////////////////////////////////////

var count=0;
var ns6=document.getElementById&&!document.all
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

if (ie4||ns6){
document.write('<form name="news_bar"><input type="button" value="3" onclick="moveit(0)" class="scrollerstyle" style="width:22px; height:22px; border-right-width:0px;" name="prev" title="Previous News"><input type="button" name="news_bar_but" onclick="goURL();" style="color:#000000;background:#FFFFFF; width:'+barwidth+'; height:22px; border-width:1; border-color:#000000; cursor:hand" onmouseover="this.style.background=mouseover_color" onmouseout="this.style.background=mouseout_color"><input type="button" value="4" onclick="moveit(1)" class="scrollerstyle" style="width:22px; height:22px; border-left-width:0px;" name="next" title="Next News"></form>');
}
else{
document.write('<form name="news_bar"><input type="button" value="Previous" onclick="moveit(0)">')
if (navigator.userAgent.indexOf("Opera")!=-1)
document.write('<input type="button" name="news_bar_but" onclick="goURL();" style="width:'+barwidth+'" border="0">')
else
document.write('<input type="button" name="news_bar_but" onclick="goURL();" width="'+barwidth+'" border="0">')
document.write('<input type="button" value="Next" onclick="moveit(1)"></form>')
}

function init_news_bar(){
document.news_bar.news_bar_but.value=msgs[count];
}
//moveit function by Dynamicdrive.com
function moveit(how){
if (how==1){ //cycle foward
if (count<msgs.length-1)
count++
else
count=0
}
else{ //cycle backward
if (count==0)
count=msgs.length-1
else
count--
}
document.news_bar.news_bar_but.value=msgs[count];
}

setInterval("moveit(1)",setdelay)

function goURL(){
location.href=msg_url[count];
}

init_news_bar();



[/JS]
 
Heb je nu alles in de root van je site staan dan? Net stond het nog in /javascript/? Kunnen we even online meekijken?
 
Er komt bij:
HTML:
<script type="text/javascript" src="slide.js"></script><br />
<script type="text/javascript" src="ticker.js"></script><br />
Als die scripts in een map "javascript" zitten, zal dat in de html van de verwijzende pagina moeten komen:
HTML:
<script type="text/javascript" src="javascript/slide.js"></script><br />
<script type="text/javascript" src="javascript/ticker.js"></script><br />
Anders kunnen die scripts niet worden opgehaald.

Met vriendelijke groet,
CSShunter
 
Laatst bewerkt:
beste mensen

Hartelijk dank voor jullie hulp... het is een tijdje geleden maar ik zal het vandaag weer opnieuw proberen

ik riep ze toch aan in de map javascript ?
 
zelfs hier werkt het niet

HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
	background-image: url(afbeeldingen/ACHTERGROND.jpg);
}
</style>
</head>

<body>

<center>
<script type="text/javascript" src="javascript/slide.js"></script><br />
<script type="text/javascript" src="javascript/ticker.js"></script><br />
  <p><a href="index.html">    Home</a> Blog Kavels Fotogallerij
  </p>
</center>
</body>
</html>

Je krijgt dan toch van die icons te zien dat daar een script staat?

ik weet geen gratis ftp host waar ik even kan testen
 
met een beetje tegenzin heb ik het geupload naar een oude server van mij, die gebruik ik meer voor ander soort sites, en het werkt

iedereen die met dit topic comments heeft gegevens hartstikke bedankt !!!!
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan