Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Random Image Scripts

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 10-14-2003, 04:00 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

One way is to use an iframe on your page and then refresh the page that it calls
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #22  
Old 10-14-2003, 05:30 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default .

I want it keep changing without refreshing the page at all
OR Display Only Titles with Price

like- Football $5.00 ------ Baseball $5.00 --- just keep it going.

It will look good on header.
__________________
X-Cart Version 4.1.8
Hosted on Linux
Reply With Quote
  #23  
Old 10-14-2003, 07:10 PM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Default

I remember you were asking for this script somewere in the forum, this is to avoid people from saving your images: No right click!

<SCRIPT LANGUAGE="Javascript"><!--

var message="FUNCTION DISABLED";
function click(e)
{
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --></SCRIPT>
Reply With Quote
  #24  
Old 10-14-2003, 07:29 PM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Default Re: .

Quote:
Originally Posted by raxitpatel
I want it keep changing without refreshing the page at all - like - www.dvddhamaka.com - But in that website it only shows selcted images whereas I want all the images somewhere in home_main.tpl or on side colum with or without title.
.

This is more or less what they did :

<html>
<head>
<title>Image and Link Slide Show</title>
<SCRIPT LANGUAGE="JavaScript">
var a=0
var count=0

// Set this variable to the speed at which you want the images to change. The speed is in milliseconds.
var speed=10000


// Enter your images Here along with the directory if need be.
var imgs=new Array()
imgs[0]="owls3.jpg"
imgs[1]="hawks2.jpg"
imgs[2]="pic221.jpg"
imgs[3]="eagle1.jpg"

// Enter your URLS and what you want to go in the ALT property. This is so when they mouse over the image
// There will be a small description of the Image or URL. Make sure you separate them with an
// ampersand "&" so that the script can separate them out before writing out the link.
var urls=new Array()
urls[0]="http://www.urlhere.com&NameofFileHere"
urls[1]="http://www.urlhere.com&NameofFileHere"
urls[2]="http://www.urlhere.com&NameofFileHere"
urls[3]="http://www.urlhere.com&NameofFileHere"

// Array used for preloading
var myimages=new Array()
// Preload First Image
myimages[a]=new Image()
myimages[a].src=imgs[a]
count++

// This is the function that rotates the images and links. You should not have to modify it.
function Doimglink()
{
// window.status=a
newurls=urls[a].split("&")
if(document.layers)
{
document.mydiv.document.write("[img]"+imgs[a]+"[/img]")
document.mydiv.document.close()
}
if(document.getElementById)
{
elm=document.getElementById("mydiv")
elm.innerHTML="[img]"+imgs[a]+"[/img]"
}
a++
if(a>imgs.length-1)
{a=0}
// Preload the next image
if(count<imgs.length)
{
myimages[a]=new Image()
myimages[a].src=imgs[a]
count++
}
setTimeout("Doimglink()",speed)
}

// In the DIV below you may have to add the top and left properties to the style tag to position it
// correctly in the window. You must keep it positions as absolute for it to work in NS4.0+ browsers.

</SCRIPT>
</head>
<body onLoad="Doimglink()">
<CENTER><H1>Slide Show With Links</H1>
<DIV ID='mydiv' STYLE="position:absolute;top:120;left:200"></DIV>
</body>
</html>
Reply With Quote
  #25  
Old 10-14-2003, 07:38 PM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Default

And this is for fun:

http://w3geek.com/movies/pilots.htm
Reply With Quote
  #26  
Old 10-15-2003, 04:21 AM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default .

Thanks August

But Original Questions Still Remains - How about Random Images - Original Product Images (Not Detailed Images) and keep it going randomly without refreshing page at all - not even auto refresh.


Thanks.
__________________
X-Cart Version 4.1.8
Hosted on Linux
Reply With Quote
  #27  
Old 10-15-2003, 07:33 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

thats what he gave you
__________________
ex x-cart guru
Reply With Quote
  #28  
Old 10-15-2003, 10:18 AM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Default

"When everything fails, read the instructions."
Reply With Quote
  #29  
Old 10-15-2003, 02:27 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default .

Is this code is For All Products to be Shown or Just Selected one?

As main subject was randomly display detailed images of products

I want randomly keep displaying main product images without refreshing page. not only selected images on head.
__________________
X-Cart Version 4.1.8
Hosted on Linux
Reply With Quote
  #30  
Old 10-15-2003, 02:56 PM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Default

The way they did it was selected ones. They created a list of pictures, and then called the product by select keyword. If you want I can post their code, but is harder to understand than the one I post. The one I post is easier to understand, and is simple. I'm not a programmer, I just try to interpret the logic of what the programmer try to accomplish.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:45 PM.

   

 
X-Cart forums © 2001-2020