Jump to content

AntoLeNice

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

AntoLeNice's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there, I am currently making a website where the background can be switched ( http://www.claudettefleuriste.com/new ). When we click on a colored square, the background changes. But the new session isn't set. Here's my code (php with a application/x-javascript header): SCRIPTS.PHP $(".orange").click(function(){ $("body").css("background-image", "url(images/bg2.jpg)"); $.ajax({ url : "js/session.php", type : "get", data : "couleur=orange", dataType : "html", success : function(){ alert("bg orange"); }, error : function(xhr,code){ alert(code); } }) }); <?php if(isset($_SESSION['bg'])) { if($_SESSION['bg'] == 'rose') { echo '$("body").css("background-image", "url(images/bg1.jpg)");'; } else if($_SESSION['bg'] == 'orange') { echo '$("body").css("background-image", "url(images/bg2.jpg)");'; echo 'alert("bg est orange")'; } else if($_SESSION['bg'] == 'mauve') { echo '$("body").css("background-image", "url(images/bg3.jpg)");'; } } else { echo '$("body").css("background-image", "url(images/bg1.jpg)");'; echo 'alert("no bg")'; }?> SESSION.PHP <?php if(isset($_GET['couleur'])) { $_SESSION['bg'] = $_GET['couleur']; } ?> My ajax script works (returns success), Firebug gives me: session.php?couleur=orange . I don't understand, session_start() is activated. Can anyone help me ? Thanks, Anto
  2. Problem resolved on another forum: I changed "$( "#slider" ).slider( "option", "value" )" for "ui.value", that was so simple -__-"
  3. Hi there, I had to make a slider bar to change the font-size of a website. The problem is: When I slide up, the text gets bigger, but when I slide down once, it gets bigger one more time before it starts getting smaller. When I slide down, the text gets smaller, but when I slide up once, it gets smaller one more time before it starts getting bigger. You know what I mean ?? The text should really follow the slider value to get its size, but it doesn't because of this. Here is the code I use for the slider: $(document).ready(function() { //get current font-size var current_font_size=$("#texte").css("font-size"); //add to attribute "title" $( "#slider" ).attr("title",current_font_size); current_font_size=parseInt(current_font_size); //create slider $("#slider").slider({ value: current_font_size, //size at the start orientation: 'horizontal', min: 10, //minimum size max: 20, //maximum size slide: function(event, ui) { //on slide var value = $( "#slider" ).slider( "option", "value" ); //getting the new value $("#texte").css("font-size",value); //modify css $("#slider").attr("title",value.toString()+"px"); //adding title to the handle $(".size").html(value.toString()+"px"); //show the new size } }); }); Thanks a lot, and I hope you can help me, Antoine
  4. Heyhey !! I modified the list and now it works !! Still have a little problem with the image slider in compatibility mode, but still, the biggest problem is solved ! Thanks guys =)
  5. Hi dcro2, thanks for answering so fast. It is true that these ul/li errors could eventually create an error, but the fact it, if the page is in .html without any PHP code, it always works even in compatibility mode. When integrated it PHP, that's when the problems shows up in compatibility mode on IE. I will try to fix the list errors, but could that be anything else ?? Thanks, Anto
  6. Hi there ! I'm working on a website, and when I open it in HTML on IE 8, it works. In compatibility mode, it works. BUT, when the file in integrated in PHP, IE in Compatibility mode will destroy the hell out of it. Here is the link if you want to see for yourself: http://giteaux4vents.ca/index.php Does anybody know why that would do that ?? Thanks, Anto
  7. If it could help getting an answer Code in the head of the HTML file: <script type="text/javascript"> <!-- if (document.images) { pic1= new Image(940,324); pic1.src="images/slideshow/main/pancarte.jpg"; pic2= new Image(940,324); pic2.src="images/slideshow/main/fleurs.jpg"; pic3= new Image(940,324); pic3.src="images/slideshow/main/front.jpg"; } //--> </script> <link type="text/css" href="css/slideshow.css" rel="stylesheet" /> <!-- Stylesheet slideshow --> <script type="text/javascript" src="js/jquery-1.5.1.min.js"></script> <!-- Script jQuery --> <script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script> <!-- Script jQUery UI --> <script type="text/javascript" src="js/siteImages.js"></script> <!-- Script images --> <script type="text/javascript" src="js/jquery.cycle.js"></script> <!-- Script cycle --> Code in the body: <div id="mainSlide"> <div class="slide"> <img alt="Des fleurs !" src="images/slideshow/main/fleurs.jpg" /> </div> <div class="slide"> <img alt="Un devant !" src="images/slideshow/main/front.jpg" /> </div> <div class="slide"> <img alt="Une pancarte !" src="images/slideshow/main/pancarte.jpg" /> </div> </div> <div id="nextButton"> <a href="#" id="nextSlide"> </a> </div> jQuery: $(function(){ $('#leftSlide, #mainSlide, #rightSlide').cycle({ fx: 'scrollHorz', speed: 1000, timeout: 10000, next: '#nextSlide' }); });
  8. Hey there, I just installed a Cycle plugin on the website I'm working on, and I have a problem. On Firefox, everything works just fine, but when I open the website on Google Chrome, sometimes the images won't appear. I have 3 sliders: leftSlide, rightSlide and mainSlide, but only the latter will disappear. When I look at the source with Firebug, the source shows the <div> where my images are, but it's written with a lower opacity (I don't know what that means). The problem also occurs in IE (8.0) from time to time. You might like to look at the problem directly : http://antoine.cameleonmedia.com/gite . This page will be removed as soon as the problem will be fixed. So I ask you, Thanks a lot if you can help, Antoine.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.