Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 09/07/2011 in Posts

  1. Here you can be welcomed to the forum. Just introduce yourself, so we can get to know everyone better. This is not a place for questions, so keep that in mind. My name is Chocolate570 and I am a moderator of this forum. You can PM me any concerns RELATED to this forum. What about you? ~Chocolate570This has not been stickied for a reason. If I see alot of replies, then i'll sticky it. Otherwise, it'll just occupy more space in the pinned section.
    2 points
  2. You can add a <meta> robots tag to the page telling search engines not to index the page. <meta name="robots" content="noindex nofollow">
    2 points
  3. Hi All! I'm the coding projects manager at [link removed] and I'm very thrilled with W3Schools' latest developments. These signed-in learning paths and forums are great! I'm from New York, and Ruby on Rails is what I/we code with the most. But I'm excited to be learning more here at W3Schools. If any of you are interested, we have a bustling and supportive coding community at [link removed] --- we are the world's first not-for-profit social media community, where we help our members worldwide DIVE for their big BREAKs in life. I hope you'll come check it out--not only are we always looking for new members, but we're always looking for new volunteers to join our official team! Nice to meet each of you! -Monroe
    2 points
  4. That was the days of html4 with strict doctype no longer supporting it, it was my main gripe as there was not cross browser support for anything else similar, so you had to use transitional doctype which allowed iframes. Then whoever realised what a major blunder they made, and it was resupported in html5
    2 points
  5. Hello, everyone. I'm going to be working on becoming a web developer. I'm probably more interested in back end developing but hoping to learn as much as I can as I would like this to be my next career. I love gaming. I do live streams sometimes. I am currently a house husband and raising and will be home schooling our 7 year old daughter. My time will be pretty full. Anyway, so far I'm really enjoying w3school. I love how it's totally free. I'm not rich so this is best avenue for me to learn atm. I'm also using the free part of codecademy and bitdegree. I just started about a week ago so very new still. I recently moved from Oregon to Iowa. Loving the slower pace of life out here and how less crazy and crowded everything is out here. Love the price of houses out here also. Anyway, that about wraps it up for me. I have a question though. Is there a way to create a profile on w3schools so it will remember my progress or do I just need to notate somewhere where I leave off?
    2 points
  6. Hi, guess I'll introduce myself as well: I'm Jurgen, from Belgium. I'm actually by skill a strength and conditioning coach (which I do as a side-hustle), and always have mostly worked lower management and sales jobs, but through sheer circumstances am now also working on websites. However I'm still a very big amateur, so expect frequent questions about sometimes very basics things hahahahahah.
    2 points
  7. You should call exit or die any time you're redirecting a user to prevent the code from executing any of the instructions that are further down. Nothing about the header() function tells the code to stop executing. header('Location: /Logon/Logon.php?From=Home'); exit;
    2 points
  8. Just get started on your 10,000 hours. I used the w3schools tuits for my start.
    2 points
  9. Use flex box <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Document Title</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="author" content=""> <!--<link rel="stylesheet" href="css/styles.css?v=1.0"> --> <style> *{box-sizing: border-box;} .layout-wrap { display: flex; min-height: calc(1px + 40vw);} .layout-col1{ display: flex; flex: 1 1 100%; max-width: 40%;} .layout-col2{display: flex; flex: 1 1 100%; max-width: 60%; flex-wrap: wrap; justify-content: space-evenly; } .layout-col2 >div, .layout-col1 >div { margin: 10px; border: 3px solid #000;} .div1 {flex: 1 1 auto;} .div2 { flex: 1 1 auto; max-width: 40%; margin-right: 5px;} .div3 { flex: 1 1 auto; max-width: 60%; margin-left: 5px;} .div4 { flex: 1 1 100%; max-width: calc(100% - 20px);} </style> </head> <body> <!--<script src="js/scripts.js"></script> --> <div class="layout-wrap"> <div class="layout-col1"> <div class="div1"></div> </div> <div class="layout-col2"> <div class="div2"></div> <div class="div3"></div> <div class="div4"></div> </div> </div> </body> </html>
    2 points
  10. I generally prefer to support the least common denominator to give the users of my website the best experience regardless of which browser they're using.
    2 points
  11. class whatever { function func1 { do stuff } function func2 { do stuff } } object = new whatever(blah,blah2); object->funct1(); object->funct2();
    2 points
  12. Gosh! you and rizwansyed must be working with identical school exercise book, both working with a circuit board, communicating with server and file on sd card, and now same identical form inputs requiring the SAME effect on selection, must be biggest coincidence in the whole milky way galaxy. hmmm Also you could use required attribute that will give a warning that selection is required if first option has empty value.
    2 points
  13. Regardless of native JS or JQuery, perhaps this would help with your understanding: <script> var globalVar = 'globalVar'; function parentFunc() { // no function parameters var parentVar = 'parentVar'; function childFunc() { // not function parameters var childVar = 'childVar'; alert('childFunc has access to:\n'+childVar+'\n'+parentVar+'\n'+globalVar); } childFunc(); alert('parentFunc has access to:\n'+parentVar+'\n'+globalVar); } alert('body has access to only:\n'+globalVar); parentFunc(); </script>
    2 points
  14. I tested and the scoped attribute does not work. According to MDN, Firefox should support it, but it also says that the attribute is deprecated so it's best not to use it. Since the scoped attribute is deprecated, <style> elements should only go in the <head> section of the document.
    2 points
  15. No one has to use your form, if you have a page that accepts input from $_GET or $_POST anyone can send anything they want to that page. Make sure you validate your inputs.
    2 points
  16. By changing the prototype of a data type, you change every single object of that type. In this example, they are changing the prototype of the String object so that all strings have a trim() method. The trim() method removes spaces from the beginning and end of a string. The code you see in the replace() method /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g is called a regular expression, it is used to do complex manipulations with strings. There is a tutorial page about regular expressions here: https://www.w3schools.com/js/js_regexp.asp
    2 points
  17. To be responsive, you shouldn't us a fixed width using px, unless you use media queries to adjust width and html content structure as the device increases or decreases. You are using max-width: on wrapper div, which makes this element responsive up to a specific max-width. Most responsive sites use percentages widths for inner html structure within the fixed width container element, these also will use media queries to change from 3 to 2 to a 1 single column structure for mobile devices. Once this responsive page is working as it should, you can then think about adding all the other features like shopping cart images etc.
    2 points
  18. No. UPDATE is what you use to start an UPDATE query when you are updating the table. It is not a command on its own. You might be thinking of commit, but you only need to commit if you're using transactions, which it doesn't look like you are. When you insert a record outside of a transaction there's nothing else you need to do to actually insert the record, just the insert query will do it. My condolences.
    2 points
  19. The purpose of an object template, such as "Person" is for organizing code. In any part of your software, if you are given an object of type Person you know for sure that you can find a name and age property on it. If the object has no type then you don't know what properties it might have. You would use an object template if your software uses the same kind of object a lot. If you're only using the object in one place then you can use the shorthand {} to define it.
    2 points
  20. Included files must have <?php ?> blocks around the code.
    2 points
  21. 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 points
  22. Unfortunately this site has no connection with the administrators of w3shools.com, posting this error here, won't receive any attention to fix this error, but I suggest you go to 'About' page on W3schools.com then at bottom of page, click report error link.
    2 points
  23. 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>
    2 points
  24. 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.
    2 points
  25. Hi! My name is Nara. I'm from Yerevan, Armenia. I started to study HTML, CSS for about a month, but I do not feel very good, because I'm 45 ((((. Do you think I have a chance?
    2 points
  26. Like astralaaron said using closest class and the index class in jquery you can get the index of the tr, have a look at the fiddle. https://jsfiddle.net/8hL46ftj/ hope this helps $('img').click(function(){ alert($(this).closest('tr').index()) })
    2 points
×
×
  • Create New...