Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 06/22/2017 in all areas

  1. 2 points
    There's nothing formal to tell you things like that. People do it themselves, and it tends to illustrate the Dunning-Kruger effect. People who just recently started tend to rate themselves highly, and only when you get more into something do you realize how much you don't know. I wouldn't put any weight on things like that. If you want to evaluate someone's capabilities look for a portfolio or things they've actually finished.
  2. 2 points
    You had wrongly referenced a JavaScript function, and wrongly named a css selector so very important position: relative was not applied. <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * {box-sizing:border-box} body {font-family: Verdana,sans-serif;margin:0} .mySlides {display:none; width: 100%;} /* Slideshow container */ .slideshow { /*NOT slideshow-container*/ max-width: 1000px; position: relative; margin: auto; } /* Next & previous buttons */ .prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px; margin-top: -22px; color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; } /* Position the "next button" to the right */ .next { right: 0; border-radius: 3px 0 0 3px; } /* On hover, add a black background color with a little bit see-through */ .prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); } /* Caption text */ .text { color: #f2f2f2; font-size: 15px; padding: 8px 12px; position: absolute; bottom: 8px; width: 100%; text-align: center; } /* Number text (1/3 etc) */ .numbertext { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } /* The dots/bullets/indicators */ .dot { cursor:pointer; height: 13px; width: 13px; margin: 0 2px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; } .active, .dot:hover { background-color: #f44336; } /* Fading animation */ .fade { -webkit-animation-name: fade; -webkit-animation-duration: 1.5s; animation-name: fade; animation-duration: 1.5s; } @-webkit-keyframes fade { from {opacity: .4} to {opacity: 1} } @keyframes fade { from {opacity: .4} to {opacity: 1} } /* On smaller screens, decrease text size */ @media only screen and (max-width: 300px) { .prev, .next,.text {font-size: 11px} } </style> </head> <body> <div id="wrapper"> <div class="slideshow w3-container w3-half"> <div class="w3-content w3-display-container"> <img class="mySlides fade" src="https://www.w3schools.com/howto/img_nature_wide.jpg"> <img class="mySlides fade" src="https://www.w3schools.com/howto/img_fjords_wide.jpg"> <a class="prev" onclick="plusDivs(-1, 0)">&#10094;</a> <a class="next" onclick="plusDivs(1, 0)">&#10095;</a> <!-- Extra plusDivs parameter refers to first (0) slideshow (start from 0) --> </div> <br> <div style="text-align:center"> <span class="dot" onclick="currentDiv(1, 0)"></span> <span class="dot" onclick="currentDiv(2, 0)"></span> </div> </div> <hr> <div class="slideshow w3-container w3-half"> <div class="w3-content w3-display-container"> <img class="mySlides fade" src="https://www.w3schools.com/howto/img_nature_wide.jpg"> <img class="mySlides fade" src="https://www.w3schools.com/howto/img_fjords_wide.jpg"> <a class="prev" onclick="plusDivs(-1, 1)">&#10094;</a> <a class="next" onclick="plusDivs(1, 1)">&#10095;</a> <!-- Extra plusDivs parameter refers to second (1) slideshow (start from 0) --> </div> <br> <div style="text-align:center"> <span class="dot" onclick="currentDiv(1, 1)"></span> <span class="dot" onclick="currentDiv(2, 1)"></span> </div> </div> <script> var slideIndex = 1; var z = document.getElementsByClassName("slideshow"); for (i = 0; i < z.length; i++) { //set custom data attribute to first current image index z[i].setAttribute("data-currentslide", 1); showDivs(z[i].getAttribute("data-currentslide"), i); } function plusDivs(n, j) { //get custom data attribute value of current image index to slideshow class index j slideIndex = parseInt(z[j].getAttribute("data-currentslide")[0]); showDivs(slideIndex += n, j); } function currentDiv(n, j) { showDivs(slideIndex = n, j); /* showDivs Not showSlides*/ } function showDivs(n, j) { var i; var z = document.getElementsByClassName("slideshow")[j]; var x = z.getElementsByClassName("mySlides"); var dots = z.getElementsByClassName("dot"); if (n > x.length) { slideIndex = 1 } if (n < 1) { slideIndex = x.length; } //set custom data attribute to current image index z.setAttribute("data-currentslide", slideIndex); for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } x[slideIndex - 1].style.display = "block"; dots[slideIndex - 1].className += " active"; } </script> </div> </body> </html>
  3. 2 points
    I don't know where there's a list. Generally you should never develop for specific devices, you should just make your layout flexible enough (with help of media queries) to wotk on any screen regardless of size. This is usually achieved by testing your page in the responsive mode of your browser and resizing the viewport until it breaks, then you add a media query to correct the layout. But for reference, I start off with a design for the following devices, then make extra adjustments later: Small mobile (iPhone 4):Up to 374px (I usually use this just for specific elements that didn't fit) Mobile or small mobile in landscape): Up to 767px Tablet portrait: 768px Tablet landscape: 1024px (breakpoint usually between 800px and 900px) Desktop: 1025px and above Some people make designs for large desktop computers (1440px and above), but that's up to you. In general, there isn't one specific strategy for responsive design, this is just the approach from the companies I work with.
  4. 1 point
    You can add argument to function to identify if input, or select to give same result. With the select, you can identify if blank or not and filter or clear filter depending on value. The highlight IF related to td cell can be applied if found equals true when looping through each cell, IF tr is can be applied when found is true same as you have to show row.
  5. 1 point
    I misread what you wrote, I thought you wrote "there is no such thing as scope". Yes, SQL queries have a scope.
  6. 1 point
    VARCHAR almost always takes less space than CHAR, because it allows fewer characters than the limit while CHAR requires the full space to be occupied. If you put a smaller string in a CHAR field, it pads the rest with null bytes. If you put the string "Hello" in a CHAR(150) field, what you essentially have in the table is "Hello\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  7. 1 point
    You have PHP session code in a html page? is it setup to run php code in html document?
  8. 1 point
    It probably makes sense to use ajax to submit the data to the server, that way you don't have to refresh the page. There's plenty of information about ajax online. When you build that page in PHP and write out the button to call the function to run the ajax request, you can pass the board ID to that function. If you don't want to use ajax then you can have your PHP form processing code on the same page, all of the PHP code like that should go on the top of the page before you display anything.
  9. 1 point
    CSS can't put gradients on text. Perhaps you can make your gradients more subtle so that the text isn't hard to read on it.
  10. 1 point
    if you looked at html through developer tools (i used firefox) you will see <div class'hidden_info'="">...</div>, clearly something is wrong! and it won't apply styling cause it does not exist, looking at code that produces this, it shows </div><div class'hidden_info'> which shows the '=' sign is missing, the browser will try its best to determine what you want, but its not perfect.
  11. 1 point
    One way is to put a hidden form element in each form with a different value that you can check to find out which form was submitted. http://w3schools.invisionzone.com/topic/12509-php-tips-and-tutorials/?do=findComment&comment=96606
  12. 1 point
    function newUser ($username, $password){ $return = ['success' => false, 'message' => '']; if (!isExist($username)) { if (passChk($pass, $conf_pass)){ // insert into the database here $return['message'] = 'Username Created successfully'; $return['success'] = true; } else { $return['message'] = "Password and confirmed password do not match"; } } else { $return['message'] = 'Username already exists'; } return $return; }
  13. 1 point
    It's fine to use that style to refer to the current page. PHP's magic constants wouldn't help though, there's not one that refers to the current URL. You can build the URL from the $_SERVER array, but it's not necessary if you're just linking to the current page.
  14. 1 point
    You are prompting for input within the scope of function to x variable, while calling the function with argument outside the scope of function. It will never be able to know the variable x equals.
  15. 1 point
    It is. If you want to get details about a certain item, that's one page. If you want to view the catalog, that's one page. There aren't any redirects or anything else going on, each request results in a response for that request. If you want to have a page where people can click on the details for each item and see things pop up instantly without sending another request you can do that with Javascript, but the issue there is that you're loading everything for everybody even if they aren't going to use it, and it's going to take a while to create that page. It seems like it's more efficient to send a request for each thing the person wants.
  16. 1 point
    Because even though they are empty, if named input exists on submission it is still set with empty value. To check if set and not empty add !empty() if (isset($_GET['phonesrch']) && !empty($_GET['phonesrch']))
  17. 1 point
    Which IP address? 127.0.0.1 (localhost) or the ip address of network o/s hosting the web site? check out https://stackoverflow.com/questions/9682262/how-do-i-connect-to-this-localhost-from-another-computer-on-the-same-network
  18. 1 point
    You need to add the second parameter when you call currentDiv, like you did with plusDivs. In order for the function to highlight the correct dot, each of those dot elements needs to specify which slide show it belongs to, so that showDivs can get the correct set of dots. One way would be to add a class name or data attribute to the dot container elements, or to the dot elements themselves.
  19. 1 point
    Yes! its possible, bit complicated, The idea is to get the previous image, and place it as a background using position: absolute with low z-index, then fade in what will be next image with higher z-index, because this image is layered above the bg image it will give effect that both are cross fading, but only the top layered image is.
  20. 1 point
    https://www.w3schools.com/tags/tag_track.asp
  21. 1 point
    * Is known as wildcard symbol so if value appears anywhere within class attribute value ^ Is 'begin with', so if value appears at beginning of class attribute value. $ Is 'end with', so if value appears at end of class attribute value. https://www.w3schools.com/css/css_attribute_selectors.asp
  22. 1 point
    toGMTString() -> Deprecated. Use the toUTCString() method instead, as stated from here https://www.w3schools.com/jsref/jsref_obj_date.asp
  23. 1 point
    Place both if conditions for setting modal and login to display none, in a single window.onclick function
  24. 1 point
    Upon refreshing, the video is still uploaded to database ? Not the folder, because i might be thinking that it displays you the page because in database there is a video saved with an url but on your host in the videos folder there is no video with the url from db, that's mostly why you have that error.
  25. 1 point
    It's a short form of scientific notation used in floating point numbers. The e represents 10 elevated to the number that follows it. 5e6 is the same as 5 * 106 or 5 * 1,000,000 = 5,000,000
×