14 Replies - 811 Views - Last Post: 31 October 2013 - 01:01 AM

#1 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

JS Slider

Posted 29 October 2013 - 12:04 AM

I am using this code to make a js slider but the small bullet should show an minimize button but i can't define the source here is my code :
<!DOCTYPE html>
<html>
<head>
<title>Demo 8 - Thumbnail Preview</title>
<link href="file:///C:/Users/Aref/Desktop/js-image-slider.css" rel="stylesheet" type="text/css" />
<script src="file:///C:/Users/Aref/Desktop/js-image-slider.js" type="text/javascript"></script>
<link href="file:///C:/Users/Aref/Desktop/tooltip.css" rel="stylesheet" type="text/css" />
<script src="file:///C:/Users/Aref/Desktop/tooltip.js" type="text/javascript"></script>
<link href="file:///C:/Users/Aref/Desktop/generic.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
imageSlider.thumbnailPreview(function (thumbIndex) 
{
 return "<img src='images/thumb" + (thumbIndex + 1) + ".jpg' style='width:70px;height:44px;' />"; 
 }
 );
</script>
</head>
<body>
<div id="sliderFrame">
<div id="slider">
<a href="http://www.menucool.com/javascript-image-slider" target="_blank">
<img src="file:///C:/Users/Aref/Desktop/Slides%20New%20Img/cls_shootingbrake_2-700x306.jpg" alt="#cap1" />
</a>
<img src="file:///C:/Users/Aref/Desktop/Slides%20New%20Img/Stock1%20700x306.jpg" alt="" />
<img src="file:///C:/Users/Aref/Desktop/Slides%20New%20Img/Stock3%20700x306.jpg" alt="" />
<img src="file:///C:/Users/Aref/Desktop/jsImgSlider/images/image-slider-4.jpg" alt="" />
<img src="file:///C:/Users/Aref/Desktop/jsImgSlider/images/image-slider-5.jpg" alt="" />
</div>


The slider is working but the bullet don't show the picture how to define the source in javascript ?

Is This A Good Question/Topic? 0
  • +

Replies To: JS Slider

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: JS Slider

Posted 29 October 2013 - 12:09 AM

it might have something to do with the location of the image. since it is the only one defined with a relative path, make sure that the HTML file is in the proper location.
Was This Post Helpful? 0
  • +
  • -

#3 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

Re: JS Slider

Posted 29 October 2013 - 12:25 AM

What do you mean by make sure that the HTML file is in the proper location ?
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: JS Slider

Posted 29 October 2013 - 12:28 AM

the image location is determined relatively to the location of the HTML file. so either you move the HTML file to a place where the image path fits or you move the image folder according to the HTML file (and since all other paths are absolute, moving the HTML file seems easier).

all that assuming that it is a problem with the path of the images, though.
Was This Post Helpful? 0
  • +
  • -

#5 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

Re: JS Slider

Posted 29 October 2013 - 12:34 AM

How can i define the image src in :
script type="text/javascript">

imageSlider.thumbnailPreview(function (thumbIndex)

{

 return "<img src='images/thumb" + (thumbIndex + 1) + ".jpg' style='width:70px;height:44px;' />";

 }

 );

</script>


in the img src = how to set it to read from the file that the pic are inside it ?
Was This Post Helpful? 0
  • +
  • -

#6 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: JS Slider

Posted 29 October 2013 - 12:36 AM

ok, we need to tackle it from the other side.

what is the current location of your HTML file?
what is the location of the images?
Was This Post Helpful? 0
  • +
  • -

#7 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

Re: JS Slider

Posted 29 October 2013 - 12:43 AM

The img location and html file are on my desktop
Was This Post Helpful? 0
  • +
  • -

#8 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: JS Slider

Posted 29 October 2013 - 01:07 AM

i.e. C:/Users/Aref/Desktop/file.html and C:/Users/Aref/Desktop/images/ ?

This post has been edited by Dormilich: 29 October 2013 - 01:08 AM

Was This Post Helpful? 0
  • +
  • -

#9 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

Re: JS Slider

Posted 29 October 2013 - 01:17 AM

Yes exactly
Was This Post Helpful? 0
  • +
  • -

#10 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: JS Slider

Posted 29 October 2013 - 01:45 AM

some more questions:

what is the homepage of the plugin?

if the bullets donít show the picture, what do they show instead?
Was This Post Helpful? 0
  • +
  • -

#11 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

Re: JS Slider

Posted 29 October 2013 - 07:08 AM

The bullet don't show anything it have the size of the image but source cannot be found it show a small blank picture
Was This Post Helpful? 0
  • +
  • -

#12 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: JS Slider

Posted 29 October 2013 - 07:27 AM

as suspected ...

you need to either adjust the path in the <img> tag so that it matches the image location or move the file to a location that matches the image path.
Was This Post Helpful? 0
  • +
  • -

#13 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

Re: JS Slider

Posted 29 October 2013 - 10:46 AM

That what i was trying to do i try this
script type="text/javascript">

imageSlider.thumbnailPreview(function (thumbIndex)

{

 return "<img src='C:/Users/Aref/Desktop/images" + (thumbIndex + 1) + ".jpg' style='width:70px;height:44px;' />";

 }

 );

</script>


but it didn't not work is there another way ? by the way i download this javaslider it contains 8 demo's and this is the code of the 8
Was This Post Helpful? 0
  • +
  • -

#14 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: JS Slider

Posted 29 October 2013 - 12:40 PM

Quote

but it didn't not work

of course, C: is not a valid transfer protocol.
Was This Post Helpful? 0
  • +
  • -

#15 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

Re: JS Slider

Posted 31 October 2013 - 01:01 AM

Any more help ?? This is the site from where i download the JS slider http://www.menucool....pt-image-slider
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1