Jump to content

aneeb

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by aneeb

  1. i want to fetch data from multiple tables. they all are similar that is they have same colum names (catalog_product_flat_1,catalog_product_flat_ 2,catalog_product_flat_ 3,catalog_product_flat_ 4.......), but they are not related.Is there any way to do this through stored prcedures or any other way. One more thing these tables will increse in future as the stores of my ecomerce site increases..please help me i am new to this...
  2. getUrlVars() is a pre-defined function.
  3. Thank you sir, it works thanks alot...May God bless you..
  4. I want to check the URL, if the URL contains id then do this, if it contains userno then do this and it didn't contain anything then do this... Can you tell me a different code for doing this??
  5. So how can i do it ? please tell me..
  6. I am doing it like this if((location.search=="") ? "" : "userno"){ var get = ''; var userno = getUrlVars()["userno"]; get = 'getpromotions.php?userno='+userno;}else if((location.search=="") ? "" : "id"){ var get = ''; var id = getUrlVars()["id"]; get = 'getpromotions.php?id='+id;}else{ var get = ''; get = 'getpromotions.php'; } In this only If and Else are working, else if statement is not working..
  7. Hey everyone! i want to get some specific parameters from URL. If the url contains id then do this and if the url contains userno then do this and if it didn't contain anything do this. I want to put it in If else statement. the url is like this If it didn't contain anythinghttp://localhost:8080/web/promotions.html If it contains idhttp://localhost:8080/web/promotions.html?id=Food If it contain usernohttp://localhost:8080/web/promotions.html?userno=12 How can i do this? Please help me i am new to this..
  8. I am writing the code like this.. images = images + '<a href="#"><img src="images/' + image.a + '" alt="Flowing Rock" width="580" height="360" title="" rel="<h3>Flowing Rock</h3> All the latest promotions comes here. "/> </a>'; and in div tag i am doing like this.. <div id="gallery"><div class="caption"><div class="content"></div></div> </div> but the heading and caption are not coming..
  9. Thank you sir the images are coming one by one into the slider now, but there is only one problem the heading is not coming and it didn't repeat itself when all the images comes, it stops on the last image..
  10. Like this ?? <div id="gallery"><div id="slideshow"></div><div class="caption"><div class="content"></div></div></div>
  11. I have done this changing in the code it is bringing the images into the slider but it brings all the images at once.
  12. But all of the images are coming from database so how can i put each image into a separate anchor tag ?
  13. no gallery is not defined anywhere..
  14. the error is Error: $("#slideShow").html(images).gallery is not a functionSource File: http://localhost:8080/mano/slideshow/jquery-slideshow.htmlLine: 81
  15. Hey Everyone! i am writing a JavaScript code in which i am getting a JSON which prints the images names which are stored in the database, the code gets these images and puts them in a img tag.Now when i am running it it brings all of the images at once and error comes in the error console that it is not a function..The code is here <script> // Then own code$(function() { // Shorthand for $(document).ready(function() { $.getJSON('getphp.php', function(json) { var images = ''; $.each(json.userdata, function(i, image) { images = images + '<img src="images/' + image.a + '">'; }); $('#slideShow').html(images).gallery({directionNavHide: false}); }); });</script> Please help me i am new to this
  16. i have changed my code a little now, i have hard coded one images and the rest of it are dynamic. The hard coded image comes first then after that all the images comes on the screen, they are not coming one by one into the slider. i am pasting my code here <!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><title>JQuery Photo Slider with Semi Transparent Caption</title> <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script><script type="text/javascript"> $(document).ready(function() { //Execute the slideShowslideShow(); }); function slideShow() { //Set the opacity of all images to 0$('#gallery a').css({opacity: 0.0}); //Get the first image and display it (set it to full opacity)$('#gallery a:first').css({opacity: 1.0}); //Set the caption background to semi-transparent$('#gallery .caption').css({opacity: 0.7}); //Resize the width of the caption according to the image width$('#gallery .caption').css({width: $('#gallery a').find('img').css('width')}); //Get the caption of the first image from REL attribute and display it$('#gallery .content').html($('#gallery a:first').find('img').attr('rel')).animate({opacity: 0.7}, 400); //Call the gallery function to run the slideshow, 6000 = change to next image after 6 secondssetInterval('gallery()',6000); } function gallery() { //if no IMGs have the show class, grab the first imagevar current = ($('#gallery a.show')? $('#gallery a.show') : $('#gallery a:first')); //Get next image, if it reached the end of the slideshow, rotate it back to the first imagevar next = ((current.next().length) ? ((current.next().hasClass('caption'))? $('#gallery a:first') :current.next()) : $('#gallery a:first')); //Get next image captionvar caption = next.find('img').attr('rel'); //Set the fade in effect for the next image, show class has higher z-indexnext.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000); //Hide the current imagecurrent.animate({opacity: 0.0}, 1000).removeClass('show'); //Set the opacity to 0 and height to 1px$('#gallery .caption').animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height: '1px'}, { queue:true, duration:300 }); //Animate the caption, opacity to 0.7 and heigth to 100px, a slide up effect$('#gallery .caption').animate({opacity: 0.7},100 ).animate({height: '100px'},500 ); //Display the content$('#gallery .content').html(caption); } $(function() { // Shorthand for $(document).ready(function() { $.getJSON('getphp.php', function(json) { var images = ''; $.each(json.userdata, function(i, image) { images = images + '<img src="images/' + image.a + '">'; }); $('#slideShow').html(images).slide1(); }); }); </script> <style type="text/css">body{font-family:arial} .clear {clear:both} #gallery {position:relative;height:360px}#gallery a {float:left;position:absolute;} #gallery a img {border:none;} #gallery a.show {z-index:500} #gallery .caption {z-index:600; background-color:#000; color:#ffffff; height:100px; width:100%; position:absolute;bottom:0;} #gallery .caption .content {margin:5px} #gallery .caption .content h3 {margin:0;padding:0;color:#1DCCEF;} </style></head><body><h1>JQuery Photo Slider with Semi Transparent Caption Tutorial</h1><div id="gallery"> <a href="#" class="show"><img src="images/flowing-rock.jpg" alt="Flowing Rock" width="580" height="360" title="" alt="" rel="<h3>Flowing Rock</h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "/></a><a href="#" id="slideShow" class="slide1"></a><div class="caption"><div class="content"></div></div></div><div class="clear"></div> <br/><br/><div style="font-size:10px;color:#ccc">Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 License.</div> </body></html>
  17. This error comes in the error console Error: $("#gallery .content").html($("#gallery a:first").find("img").attr("rel")).animate is not a functionSource File: http://localhost:8080/mano/slideshow/jquery-slideshow.htmlLine: 32
  18. I have tried this but it didn't bring any images only a blank slider comes. <script> // Then own code$(function() { // Shorthand for $(document).ready(function() { $.getJSON('getphp.php', function(json) { var images = ''; $.each(json.userdata, function(i, image) { images = images + '<img src="images/' + image.a + '">'; }); $('#slideShow').html(images).gallery({directionNavHide: false}); }); });</script> <div id="gallery"><a href="#" id="slideShow"></a></div>
  19. Hey Everyone! i want to create a slider in which the images come from a specific folder and only those images come whose name are stored in the database.For the names of images i am creating a JSON which prints the names of the images. The JSON is this getphp.php{"userdata":[{"a":"1.gif"},{"a":"2.gif"},{"a":"3.gif"},{"a":"4.jpg"},{"a":"5.gif"},{"a":"6.gif"},{"a":"Aqua-Regia-Logo.jpg"},{"a":"Aqua-Regia-Logo.jpg"},{"a":"2.gif"},{"a":"Aqua-Regia-Logo.jpg"},{"a":"2.gif"},{"a":"Untitled.jpg"},{"a":"poster 2.jpg"},{"a":"3.gif"},{"a":"Aqua-Regia-Logo.jpg"},{"a":"Untitled.jpg"}]} i also have a slider which i have downloaded from internet and i want that this slider takes these images from a folder "images".I also have attached the slider code. Please help me i am new to this.. jquery-slideshow.html
×
×
  • Create New...