Jump to content


Popular Content

Showing content with the highest reputation since 03/30/2019 in Posts

  1. 2 points
    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. 2 points
    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>
  3. 1 point
    Instead of grid, you could use flex box and set align-items to stretch. .wrapper { display: flex; align-items: stretch; } .sidebar { background-color: green; width: 10%; flex: 1 1 auto; } .archive-loop { background-color: red; width: 70%; flex: 1 1 auto; }
  4. 1 point
    </pre> <table> var child = myImgs.children; //alert(child.src); myImgs.insertBefore(child[0],child[child.length-1]); myImgs.removeChild(child.length-1); } </table> <p> </p><p
  5. 1 point
    I think you have to work from the last child instead of first
  6. 1 point
    I'll be rolling through the tutorials and have a specific question about a tutorial. It'd be cool if I could click a button that sends me here that sits next to every "try it". It looks like the "try it editors" have unique links. So right on this form, below title, submit the URL from the tutorial you have a question about. Eventually, there would be enough "tags" relating to the questions where the forum will just spit back previous questions about the tutorial when new users click from the tutorial "help" button.
  7. 1 point
    because there is no such thing as border: bottom; color, style and width is what you need to set, that is not recognised, so reverts to default.
  8. 1 point
    While you find a way to make an example out of your code, here are some tutorials you could follow for the effects you requrie. In the meantime you may want to have a look at the following tutorials: https://www.w3schools.com/jsref/event_onclick.asp For your Click Event https://www.w3schools.com/js/js_htmldom_css.asp For your color change https://www.w3schools.com/js/js_htmldom_html.asp To change the ?'s to numbers If you have any more questions, please let me know. In thread please.
  9. 1 point
    Google Chrome has just started warning me that by using W3Schools formatting facilities and Font Awesome Icons in my site, cookies are being attached to all uses of my page. Not only is this practice odious in itself, it is illegal in Europe, and THE FACT WAS NOT DISCLOSED BY W3SCHOOLS EITHER IN ITS ADVERTISEMENT FOR ITS FORMATTING TOOLS OR IN ITS ENDORSEMENT OF FONT AWESOME! A web check revealed no easy way of turning off those cookies, so now I am going to find replacement icons and do the work of removing these libraries by hand. This will not be an easy task as shown by the attached images: Button html code showing W3 Schools classes and Font Awesome icons. (The same for all pages.) Screen shot of the resulting button panel using W3 Schools classes and Font Awesome icons. Screen shot of the links to W3Schools and Font Awesome. Screen shot of the warnings posted by Google Chrome, when using W3 Schools classes and Font Awesome icons. Screen shot of the resulting button panel using W3 Schools classes but disabling Font Awesome icons. Screen shot of the links to W3Schools but disabling Font Awesome. Screen shot of the warnings posted by Google Chrome, when using W3 Schools classes but disabling Font Awesome icons. Screen shot of the resulting button panel using Font Awesome icons but disabling W3 Schools. Screen shot of the links using Font Awesome icons but disabling W3 Schools. Screen shot of the warnings posted by Google Chrome, when using Font Awesome icons but disabling W3 Schools. Screen shot of the resulting button panel disabling both W3 Schools classes and Font Awesome icons. Screen shot of the links disabling both W3Schools and Font Awesome. Google Chrome issued no warnings, when both W3 Schools classes and Font Awesome icons were disabled. I am deeply aggravated at W3 Schools for not disclosing this practice. I will do the hard work of removing links to W3 Schools and Font Awesome. I doubt that I will ever be able to trust W3 Schools again.
  10. 1 point
    Hi, I have been working on the design of this website https://www.mockofun.com and I would really like some constructive criticism. What do you think about the logo, the blue & orange color combination, the fonts, etc? Do you think the design is too busy? Thank you in advance!
  11. 1 point
    If you want to send an email based on form submission, then you'll need to use a server-side programming language. Try the PHP tutorial, and proceed onto PHP Forms for Form Handling. Then check out the mail() function after that. You can take a look at other server side languages but PHP is my bias.
  12. 1 point
    "+" is used for string concatenation. If the values are strings then they will use the string version of the "+" operator. You have to convert the value to a number before operating in order for it to work as you intend it to. var x = Number(byyr.value); var y = x + 1;
  13. 1 point
    position: fixed takes the element out of the flow of other elements, other elements will occupy the space it would have occupied, so you need to add padding the same height as the w3--top element to force it back into view.
  14. 1 point
    Always room for improvement and hopefully you'll never stop improving. Obviously you're learning so don't be afraid to break things. Experiment. Make mistakes. Decide for yourself what you think you've learned. Have the courage to be wrong. That's when I'm most likely to remember what I learned. The bigger the mistake the bigger the memory! EDIT: The most important question is what you posted good enough for you right now?
  15. 1 point
    It's a "feature" built into iPhone browsers. If you make sure that the font size of the text inside your inputs is at least 16px then iPhone won't try to zoom in to see it.
  16. 1 point
    Images are inline by default. All inline elements are placed at the text baseline. There is always a bit of space reserved below the baseline, which is for hanging letters like "g" or "y", and you see this space below the image. In order to fix this, you can either make the image a block, or set its vertical align to "middle".
  17. 1 point
    Hello @krishnanayaks Following are the differences between GET and POST Method : The GET Method : The GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ? character. The GET method produces a long string that appears in your server logs, in the browser's location. The GET method is restricted to send upto 1024 characters only. Never use GET method if you have password or other sensitive information to be sent to the server. GET can't be used to send binary data, like images or word documents, to the server. The data sent by GET method can be accessed using QUERY_STRING environment variable. The PHP provides $_GET associative array to access all the sent information using GET method. The POST Method : The POST method transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a header called QUERY_STRING. The POST method does not have any restriction on data size to be sent. The POST method can be used to send ASCII as well as binary data. The data sent by POST method goes through HTTP header so security depends on HTTP protocol. By using Secure HTTP you can make sure that your information is secure. The PHP provides $_POST associative array to access all the sent information using POST method. I hope above information will be useful for you. Thank you.
  18. 1 point
    <?php echo "What kind of issue are you having? Mind telling us more whats wrong with the code (expected results and what you are getting)"; ?>
  19. 1 point
    The first line always reset it on every reload, you only need that to happen when it has not already been set and is empty. Also the JavaScript code needs to below any element it references as the page is rendered from top to bottom, the jS code is executed before the elements it is referencing even exist producing undefined error. You are overthinking this, all you need do is set localStorage.fontsize=1; or localstorage.fontsize=2; and so on... On click event it should increment a variable on each click then reset if greater than 3 the use if conditions n++; if(n > 3){ n=1; } localStorage.fontsize=n; if (localStorage.fontsize==1){ document.getElementById("a").style.fontSize = "20px"; } // and so on... On load you should see if fontsize exists else set to defalut if (localStorage.fontsize) { if (localStorage.fontsize==1){ document.getElementById("a").style.fontSize = "20px"; } // and so on... else { localstorage.fontsize=1; }
  20. 1 point
    HTML without CSS is practically useless in the modern web. If you don't know CSS in depth then you might as well not know HTML. CSS appears simple on the surface but it is actually more difficult to master than many people think. If you intend to be a full stack developer, it is usually a good idea to master the front end before moving on to the back end.
  21. 1 point
    No, they don't produce the same result because in your code you're skipping over some comparisons that have to be made. Regardless of whether $_SERVER['HTTP_ACCEPT_LANGUAGE'] was tested or not, you have to test $_GET['language'] in order for the statements to be equivalent.
  22. 1 point
    Its always done that! Any floated element placed within a container element has no substance, so the container will collapse to height 0. Using property overflow reverses that condition for the container element.
  23. 1 point
  24. 1 point
    You've gotta modify this regex so you're using the entire string that matches as follows. (?=(.*\d){2})(?=.*[A-Z])(?=.*[a-z]).* Does this work for this one? And for this one, I've done a negative lookahead, that if it matches more than 3 digits, it won't be valid. ^(?=(.*\d){2})(?=.*[A-Z])(?=.*[a-z])(?!(.*\d){3,}).*$ Does this work for this one? Ab45 -> Match a4F8 -> Match aosjgHJ35 -> Match JsOsm4Osmf6 -> Match JsO2m4Os4f6 -> No match (3 numbers)
  25. 1 point
    It means that you can use "$0" as a variable in the console to reference the currently selected element.
  26. 1 point
    It looks like that should work.
  27. 1 point
    The page is read from top to bottom, if you cal a function that references a specific element in JavaScript before the reading of page reaches it, too JavaScript it does not exist! that is why in the tutorial it says Also you just require html content that you want to include, NOT doctype, head, html or body tags.
  28. 1 point
  29. 1 point
    Thank you Funce ! I will study this until I understand every 'jot and tittle' . You moved me to start a Folder for w3schools-Examples . http://vmars.us/w3schools-Examples/Draggable-Div-Elements-w3Schools-FUNCE.html Thanks again
  30. 1 point
    You can put that tag in the head to load that file, and the code in that file should use the DOMContentLoaded event to make sure the code runs after the page finishes loading.
  31. 1 point
  32. 1 point
    No, the problem is that you declared $result['rgb'] as a string ('rgb' => '') instead of an array, so it cannot have strings (such as 'r', 'g' or 'b') as an index. This would also be an issue in PHP 5, but you probably had the settings hiding the warnings.
  33. 1 point
    I just copied that code to a .html file on my computer and it seems to work correctly.
  34. 1 point
    It sounds like you think your code is the same as this: var jsonLikeObj = { getFoo: { value: function() { return this.foo = 1; }, enumerable: false } }; It's not, that's not what Object.create does. That second parameter is a description about how to create the object, it's not the actual object. jsonLikeObj.getFoo.enumerable is also undefined. Why? Because that's not the actual object, it's the specification for the object. It's metadata. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create
  35. 1 point
    What is wrong? You expected center center not to work in media query? You'd be wrong, it would carry on from position styling from default non media query styling, as does background size, attachment and repeat. If you want to reset to default value use background-position: initial; in media query.
  36. 1 point
    Potato and knife? Banana and fork? Apple and spoon? Or maybe chalk and cheese. 😁
  37. 1 point
    The variable "stdcd" is not defined, you need to assign an input element to it before you can use it. You can access an element using one of many DOM methods such as getElementById() or querySelector()
  38. 1 point
    Hello all! Im Timeka a 38 y.o. self taught coder from Washington, DC USA. In the 4 years of teaching myself Ive created sites for me and a few clients. Right now putting together a PHP member based site for someone
  39. 1 point
    Set those links used for image links to that of img styling with width 80%, the img tag to width: 100%. CSS: img { display: block; margin-left: auto; margin-right: auto; width: 80%; } a.img_wrap { display: block; margin-left: auto; margin-right: auto; width: 80%; } a.img_wrap img{ width: 100%; height: auto; } HTML: <img src="whatever.png" alt=""> <a href="whatever.whatever1" class="img_wrap"> <img src="whatever1.png" alt=""> </a> <a href="whatever.whatever2" class="img_wrap"> <img src="whatever2.png" alt=""> </a> <a href="whatever.whatever3" class="img_wrap"> <img src="whatever3.png" alt=""> </a>
  40. 1 point
    You haven't specified a generic fallback font (usually serif or sans-serif) and you forgot a semi-colon after the font-family rule.
  41. 1 point
    I imagine that you have a <body> and <html> tags elsewhere. Have you tried using the browser dev tools, if you select that div you can see what stylings are being applied to it. Your CSS is a little interesting, your sans-serif font declaration seems to be after your font-weight? with no semi-colon in between it may be erroring out.
  42. 1 point
    There's also the problem that your code is using curly quotes instead of regular ones. You might need a different code editor.
  43. 1 point
    Yes, only public members can be access from outside the class. It's common to make things private and then have public getter and setter methods: class AccountInformation { private $fname; public function __construct($fname = '') { $this->fname = $fname; } public function getFname() { return $this->fname; } public function setFname($fname) { $this->fname = $fname; } } $acct = new AccountInformation(); $acct->setFname('Steve'); echo $acct->getFname(); The difference between protected and private is only with extended classes. Neither of them can be accessed from outside of your class. A protected member can be accessed from a class that extends your class, but a private member can only be accessed from inside your class.
  44. 1 point
    Svg tag has its own attributes to make it proportionally responsive by setting it original width height in viewbox.
  45. 1 point
    Data translation, is that what its called? I didn't know that. Hey Roddy! I guess the issue here is that you're using the object incorrectly, as its currently defined in your class. __construct is only called when the object is created. ($matomo_action = new TranslateMatomoAction(arg1, arg2);) I can see you're trying to be clever here, and fortunately you can be super clever with a slight tweak. By instead defining that logic in the __invoke magic function, you can get exactly the behaviour you desire. Your level 3 action is already attempting to use it as such. For the inserted class, all you'd need is something like this. (untested, working off brain here) <?php if (is_array($value1) && ($key1 === 'actionDetails')) { foreach($value1 as $key2 => $value2) { //LEVEL 2 - This foreach statement traverses the set of indexed arrays whose elements are a key-value pair of indices and arrays. Each array is a value of the actionDetails element of a visit. if (is_array($value2)) { $matomo_action = new TranslateMatomoAction(); foreach($value2 as $key3 => $value3) { //LEVEL 3 - This foreach statement traverses the elements of the associative array corresponding to the value of $key2. $matomo_action($key3, $value); } } } } ?>
  46. 1 point
    You need to go to another page OR refresh current page to see the new current cookie value, that is always been the case.
  47. 1 point
    I figured this out. It involves nothing more than inserting an img into the button tag, adding the full sized image and other content to the div with the class of "modal-content." Very easy solution. Thank you!
  48. 1 point
    Hello everyone. I'm Mike. I've been studying programming for two years now and only recently started HTML/CSS/JavaScript. Look forward to building web pages in the near future. Glad to meet everyone!
  49. 1 point
    This query should work SELECT first.*, AVG(second.rating) AS ratingFROM firstJOIN second ON first.id = second.relatedGROUP BY second.rating
  50. 1 point
    PM or Personal Messages (Not allways personal )Are messages sent by a forum member to another forum member where no one else can read them.For example if i had a percific problem i could PM a spercific member of the forum to help me with that!To PM click on the username of the member...and on there profile select "Send a Personal message"TA DAHope that helped!!Welcome to the forum... (im new-ish too)
  • Create New...