callesson
Members-
Posts
53 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
callesson's Achievements
Member (2/5)
0
Reputation
-
Hello there! Im new with javascript and im having this script that i got from school. And im trying to modify it a little bit. I have added a js script so the slideshow starts by it self. It works fine, but I want the pictures to like fade in, like smode. So it doesn't just change photo all quick. Here is the code Code from school. $(document).ready(function () { // hide all but first image if we have js $('.large-images li:not(:first)').hide(); // show thumbnails if we have js $('.small-images').show(); // control the visibility of the control buttons $('.large-images img, .controls').bind("mouseenter", showControls).bind("mouseleave", hideControls); hideControls(); function showControls() { $('.controls').show(); } function hideControls() { $('.controls').hide(); } $('.prev').bind("click", function() { prev(); return false; }); $('.next').bind("click", function() { next(); return false; }); $('.small-images a').bind("click", function() { display($(this).parent().attr('value')); return false; }); }); function prev() { var total = $(".large-images li").length; var current = $(".large-images li:visible").attr('value'); if(current > 1) { display(parseInt(current)-1); } else { display(total); } } function next() { var total = $(".large-images li").length; var current = $(".large-images li:visible").attr('value'); if(current < total) { display(parseInt(current)+1); } else { display(1); } } function display(num) { $(".large-images li").hide(); $(".large-images li[value='"+num+"']").show(); $('.small-images a').removeClass('selected'); $(".small-images li[value='"+num+"'] a").addClass('selected'); } Self start. <script language="JavaScript1.1"> var image1=new Image() image1.src="/bilder/tokyo1.jpg" var image2=new Image() image2.src="/bilder/tokyo2.jpg" var image3=new Image() image3.src="/bilder/tokyo3.jpg" var image4=new Image() image4.src="/bilder/tokyo4.jpg" </script> <script> <!-- //variable that will increment through the images var step=1 function slideit(){ //if browser does not support the image object, exit. if (!document.images) return document.images.slide.src=eval("image"+step+".src") if (step<4) step++ else step=1 //call function "slideit()" every 2.5 seconds setTimeout("slideit()",2500) } slideit() //--> </script>
-
Hello I would like a Modal window, something like this ( http://telligent.com/cfs-filesystemfile.ashx/__key/CommunityServer-Discussions-Components-Files/287/8510.modal_2D00_window_2D00_upload_2D00_file.jpg ) to popup when someone on my website gets an error. For exampel "Wrong username" Then I want the Modal window to display "Wrong..." Im checking for errors with php, and if wrong username is true, then I want the window. I have no idea how to make one, so if someone knows a tutorial or something then your welcome
-
Guy, how knows Php, Time (Could be a chick too!)
callesson replied to callesson's topic in PHP Coding Help
Okey okey! Ty guys! Sry if I was unclear in the beggining but I was at work and I was tired But Thx! -
Guy, how knows Php, Time (Could be a chick too!)
callesson replied to callesson's topic in PHP Coding Help
Siric: I do not have my code right here, but its as simply as this ( Do not correct this code) <form ... method="post"> ... <input type="submit" name="submit"/> ... ... if(isset($_POST['submit'])) { $time = date() + 10 min; $up = mysql_query("UPDATE table SET time=$time where user=$_SESSION..."); } then next time: $select = mysql_query("SELECT * FROM table where user=$_SESSION..."); $time = $row[time]; $date = date(); if(isset($_POST['submit']) && $date < $time) { echo "You cant do this now... Time left x"; } theocas: Well, I could check on that. But i havent worked with cookies before. -
Guy, how knows Php, Time (Could be a chick too!)
callesson replied to callesson's topic in PHP Coding Help
Sry for that. No dont want you to do it for me xD Well im stuck at the Calculating, and Checking so its the right day. Right now Im adding a time into the Database (Date() + 10 or 30 min) when the submit is set, then next time its set it will check if date() is > then Database time. And for the second thing, I just want an idea. Cause I have no idea how to do it. -
Guy, how knows Php, Time (Could be a chick too!)
callesson replied to callesson's topic in PHP Coding Help
Sure thing, I just wanted help to be confirmed first Maybe nobody wanna help me haha. But okey lets explain. First Thing: I have a submit button that will rederict you to another page. If that submit is set then your not gonna be able to use it again after like 10 or 30 min. So I would like to check that, and without problems with like if its another day or something. Also I would like to calculate the time thats left so I could display it. __ Sec Thing: I want something to update every hour. Like for each hour update something +10. I would like it to check like this. If you logout, and then you login after 2 h you will get 20 of something. And also if you are loged in it will update. But if there is another way, feel glad to tell __ Ty! -
Hey Guys! or Chicks! I wanna work with php and Time but im not good at it, so I wonder if there is someone out there who could help me ? Ty!
-
maybe: function myFunction(){ doSomething(); wait(500); doSomethingElse(); }
-
Maybe this will help http://www.tek-tips.com/viewthread.cfm?qid=1439991&page=31 http://www.codingforums.com/showthread.php?t=56428 http://support.mozilla.com/tiki-view_forum_thread.php?locale=el&comments_parentId=438268&forumId=1
-
Nmv, think i got it Ty m8 !
-
Hello Everyone! I would like some help with php, sql and a text input. Is there a way to get 3 values from one textbox? Like if I have a textbox were i write " .gold 100 Admin " So example : $firstword = gold $sec = 100 $third = Admin and then a sqlupdate ("UPDATE $firstword=$firstword +$sec WHERE user=$third"); And I only want it to be one textbox. Ty in advance!
-
Np, I havent been online so much lately either Glad I could help, good luck in the future!
-
Well... If you want to display the info so. <?php $conn = mysql_connect(HOST,USER,PASS); $db = mysql_select_db("*******") or die( "Unable to select database"); if(isset($_GET["id"])) { $gethotel= mysql_query ("SELECT * FROM hoteltable WHERE id='$_GET[id]'") or die(mysql_error()); $count = mysql_num_rows($gethotel); if($count == 1) { $row = mysql_fetch_assoc($gethotel); { $hotelname= $row['link_text']; $address = $row['address ']; $telephone= $row['telephone']; echo "<strong> $hotelname </strong><br /> $address : $telephone <br /><br />"; } } elseif($count==0) { echo "There is no hotel with that name found!"; } } else { echo "There is no hotel found!"; } ?>
-
Np Haha, we will be waiting!xD