Jump to content

Funce

Moderator
  • Posts

    602
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Funce

  1. I would argue the semantic that a programmer's main job is instead to solve problems. In my experience, maintaining legacy code has mostly been around security and stability. It's a fact of tech life that if there's something new, not everyone will use it. Some people just like to use what's already there. In other cases, the transition can be too costly to do so. (Upgraded hardware required, business downtime etc) Its quite the vague question. But very interesting to ponder.
  2. Funce

    Query Help

    Heck! Power to you, that's pretty heavy duty. Thanks for sharing it back with us.
  3. Accessing an Object is different from accessing an Array. Accessing an Object inside an Array follows the standard conventions. Objects are indexed via keyNames, and can be accessed via dot-notation (object.property) or bracket-notation (object["property"]) Arrays are 0-indexed ascending in position order and can only be accessed via bracket-notation (array[0]) Using your example where the code is doing_math.firstNumber = Number(document.getElementById("Number1").value); doing_math.secondNumber = Number(document.getElementById("Number2").value); doing_math.answer = Number(document.getElementById("Answer").value); doing_math.equals = Number(document.getElementById("Number1").value) + Number(document.getElementById("Number2").value); My_MathSummary.push(doing_math); To access the firstNumber inside doing_math you'd access it like this. My_MathSummary[0].firstNumber; My_MathSummary is an array, and the doing_math 'object' is in the first position, so we access it by getting [0] (the first index). Then we treat My_MathSummary[0] like its a 'doing_math' object (which it is) and just get firstNumber. If you added additional doing_math objects, you would need to use a for loop to iterate through My_MathSummary
  4. We may have more luck helping if you provided a bit of your code that shows the problem. Currently I'm thinking its a Margin or Padding issue.
  5. Try setting the slideIndex to 0 when it is greater than or equal to the slides.length You should make this comparison after the slideIndex is incremented (at slideIndex++)
  6. You can't access your downloads folder with a local path. You'll need to change it to a relative path, or a relative-to-root path. Surely there are better ways to play an mp3 than using HTML? If you're trying to add this to a webpage, I would recommend placing it either in the same directory as the webpage, or a subdirectory underneath the webroot directory.
  7. I just had a poke around. The tutorials use ASP.NET Web Pages 3.2 apparently. ASP.NET Core 2.1 may require something a little different. Instead of ifPost (which looks like its erroring too) try if (HttpMethods.IsPost(Request.Method)) In terms of the Request stuff, try something like this var num1 = Request.Form["text1"]; var num2 = Request.Form["text2"];
  8. Funce

    css inheritance

    I see the issue. You haven't closed off all your divs in your HTML. In your HTML, you've described Meni2 as a child of Meni. The browser fills in the gaps. See "Implied </div>" in code block below. You're going to need to place some closing div tags. Do you know where they would go? <body> <div class="Meni"> <span><i>Meni</i></span> <div class="Meni_vsebina"> <a href="test1.html">Test1</a><br> <a href="test2.html">Test2</a><br> <a href="test3.html">Test3</a><br> <a href="test4.html">Test4</a><br> </div> <!-- End of Meni_vsebina --> <div class="Meni2"> <span>Meni2</span> <div class="Meni2-vsebina"> <a href="test5.html">Test5</a><br> <a href="test6.html">Test6</a><br> <a href="test7.html">Test7</a><br> <a href="test8.html">Test8</a><br> </div> <!--End of Meni2-vsebina--> <!-- Implied </div> of Meni2 --> <!-- Implied </div> of Meni -->
  9. getElementsByTagName gets the element with the name provided., like "a" for <a> and "div" for <div class="example">. Also, if you want to create a Date, you'll need to create the object, otherwise you'll be left with the object definition to output. (Or something of the sort) You'll instead want this inside your code. document.getElementsByTagName('p')[0].innerHTML = new Date(); You can also paste code by using the code block button! So you won't need to use (very limited) attachment space putting in screenshots.
  10. The HTML validator just picked a few things up is all. Errors found while checking this document as XHTML 1.1! Result: 168 Errors, 11 warning(s) (Ideally you want this to be 0 errors) Just put your HTML in here, and check out the details. https://validator.w3.org/
  11. Hi there! We're here to help you tackle specific problems you're encountering with the creation of your website, and we're here to help you learn how to do it. Have you checked out the example navigation bar in some of the tutorials? https://www.w3schools.com/css/css_navbar.asp
  12. Which Try-it isn't working? Could you paste a link to the page?
  13. The thing you need to change is your label width, make it smaller, to get it all on one line. There are quite a few interesting things in your HTML however, I suggest you run it through the w3schools validator before proceeding. https://validator.w3.org/
  14. Filter by the div that includes them both (Looks like row). If there isn't a div that matches that, make one. Yeah, I think row matches what you're asking.
  15. Since I'm not sure how you've combined and styled the lightbox and drop-down navigation, you'd need to provide a snippet of code for us to pinpoint exactly what's going on. I have a hunch that your z-index on your drop-down nav needs to be set to something higher. For highest z-indexes I use something like 500 just to be safe. However, without the code, I couldn't be sure.
  16. Unfortunately chap, we're here to help you in any problems you may have be having with making a website. We're not here to do the work for you. There are quite a few people here(myself included) who would be able to help you if you get stuck. Try and do what you can. If you're a high school student, you aren't totally clueless. The people here will have suggestions on where to begin, or what tools you can use to get a design going. If you're having issues with the basics of websites, then try our HTML tutorial. https://www.w3schools.com/html/ Go through the CSS tutorial, to get your site looking nice. https://www.w3schools.com/css/ Go through the JavaScript tutorial to get calculations. https://www.w3schools.com/js/ Once you're done with that, check out the HTML DOM Tutorial, this is a small tutorial based on manipulating the webpage with JavaScript. https://www.w3schools.com/js/js_htmldom.asp I reckon that's the tutorial which will be able to help you with your 'popup link', if I'm reading it correctly.
  17. That humour was exceptionally dry, dsonesuk. The joke was that you haven't posted any code in the first place. An example of your code would be very helpful.
  18. Try using the Code Block button to format your code here. This is so that the forum formatting processor doesn't pick up your code as formatting. Onto the code at hand. Your Right-section width is an invalid property value. Try width: 20%; and then see what you can get out of it.
  19. Take a look at the Try-It. Can you see how its changing the 'logo'? https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_navbar_shrink_scroll I noticed that it uses JavaScript to directly change the font-size of the 'logo'. If you used an image you could change the width of the image to resize it.
  20. Oops! Well that throws my theory out the window. Good catch.
  21. Good suggestion. Though, I believe that the beverages description column is describing possible examples of beverages, and isn't meant to be taken as an exhaustive list. Of course, you could always give it a shot in the try-it and see your own update! (Until reset) https://www.w3schools.com/sql/trysql.asp?filename=trysql_asc Try something like this: UPDATE Categories SET Description = "Soft drinks, coffees, teas, milk, beers, and ales" WHERE CategoryName = "Beverages" Then run this to see your handiwork SELECT * FROM Categories
  22. To make code easier to read, try using the codeblock function. It has highlighting so that we can see the important pieces. Try editing your post to include it. In terms of the question... The JS code you've posted produces a syntax error, you need to adjust it slightly so rather than assigning a click listener to the elementCollection, you can assign it to each element. Sounds big, just change this line. Add the [ i ] acc[i].addEventListener("click", function() { If this is the exact code that is running, there may be a chance that your iPad is running this JavaScript, while your phone and desktop is running a cached(and not broken) version. What browser are you using, Mozilla? Are you using a different browser on your iPad?
  23. You have an HTML comment inside a PHP code block. You're missing a semicolon here, but I'm not sure if that makes a difference. Can you copy and paste the error messages directly? Here's a shorthand for <?php echo $variable_to_output ;?>. It might be a little faster to write. <?= $variable_to_output; ?>
  24. Your CSS contains the information required to make your HTML look nice. Make sure that you've linked your CSS back through your HTML page by using the <link> element like here. https://www.w3schools.com/css/css_howto.asp Try something like this (replace mystyle.css with your own filename) <link rel="stylesheet" type="text/css" href="mystyle.css">
  25. Try setting a higher z-index for your navigation bar. (If putting this on navigation doesn't work, try putting it elsewhere.) .navigation{ z-index: 500; }
×
×
  • Create New...