Jump to content

Funce

Moderator
  • Content Count

    535
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Funce

  1. Funce

    Slider height problem

    Can you shrink this example to use the carousel/slider only? Then you'll be able to paste the code into the forums directly.
  2. Hi there, the fix for this one will be to set your image to be .box .box-image img { max-width: 100%; display:block; /*New thing*/ } You won't find this very often from me, but I don't understand why this works. If someone could elaborate that would be good.
  3. Is the header overlapping the form? You may be able to get away with checking the z-index of the header vs the form and making sure the form is higher. But without the code you're working with, it's hard to say.
  4. Assuming that frm_order is a form, unless you've defined that elsewhere, you need to do $("#frm_order") to access it. There would be a syntax error preventing any further execution. Hence, nothing is done. The second function you want to run, just does the same thing as the first? Clicking a submit button inside a form, is just $("#frm_order").submit() with extra steps.
  5. Funce

    SQL Tryit Editor

    Trying it in Firefox yields a different result Error in SQL: Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. I'd suggest clicking on "Report Error" at the bottom of the page I linked. That will alert the devs to fix it. Here it is again https://www.w3schools.com/sql/sql_ref_drop_table.asp
  6. Funce

    SQL Tryit Editor

    Huh, that's interesting. It seems that even using the example code in https://www.w3schools.com/sql/sql_ref_drop_table.asp is enough to error out.
  7. Instead of storing your image data in the database, I'd recommend storing it in the file system, and storing the path. Do you have a database that is doing this? Then you could try this <?php require("conexion.php"); //conectando a la base de datos $select = 'select * from peliculas'; $resultado = mysqli_query($miconexion, $select); while ($filas = mysqli_fetch_array($resultado)) { ?> <div> <input type="image" src="<?= $filas["ruta_imagen"]; ?>" onclick=""> </div> <?php } mysqli_free_result($resultado); ?> Alternatively if all your file names are like the following: imagenes/imagen1.jpg imagenes/imagen2.jpg imagenes/imagen3.jpg etc Then you can also try something like this (without a database. <?php for (var i = 1; i <= 3; i++) { ?> <input type="image" src="imagenes/imagen<?=i;?>.jpg" onclick=""> <?php }
  8. Usually if a font isn't displayed on a given device, it doesn't have that font installed. It may also be referred to as something else, which is why it's important to use fallback fonts. As an example, fallback fonts for "Times New Roman" is Times and Serif So you can define it in your style as follows .example-class { font-family: "Times New Roman", Times, serif; } Also, try using the forum's code block feature. It makes it easier for us to read your code.
  9. From my experience, <a> tags have their own styling that they apply after all inherited styles, but before any styles it has assigned to the element itself. This just means that if you want to style <a> tags, you need styles that directly apply to <a> tags. You'll need to add a style like this table.table.table-striped.table-condensed.table-bordered.table-hover a { /*Styles here */ } Or add a class to the <a> tag and style that.
  10. What browser are you using for this? I just tried Internet Explorer, and it seems to have the error you illustrated. Perhaps a different browser would suffice? I was testing on Chrome in my previous posts, and was unable to recreate the error on it.
  11. Hi there, If you could please add your code using the forum code block feature, it will let other members help you easier. The setting can be found as below.
  12. So right here's you're two tasks you need to do as you've stated (just to get my head around it) Show and hide test_2 when test_1 is checked and unchecked respectively. When test_1 is not checked, you want to pass test_2 as NULL You seem to be using PHP so that makes it simple for me. Your first issue is that you aren't calling your Javascript code. You're defining it as a function, but not calling it. It isn't running. Add an onclick attribute to your test_1 checkboxes to get that JavaScript to run. You'll need to modify it as you've removed the div ids, but you seem to have that under control. The second part is a joint issue between your HTML and your PHP. You'll need to add some value attributes to your checkboxes, so some values are sent through on a form submission. Then inside your PHP you'll just have a bit of logic: if test_1 value is not set (unchecked checkboxes do not send a value) set test_1 to no set test_2 to NULL else set test_1 to test_1 value if test_2 value is not set set test_2 to no else set test_2 to test_2 value Save test_1 and test_2 into database Let me know if any of this is unclear.
  13. Well that would be because your alert code is inside your Focus function and not your Blur function. So the alert is executing (after you've focused), then when you close the alert it refocuses which causes the alert again.
  14. Your validateForm function only checks input elements as it currently stands. As a textarea element is not an input element, you'll need to add some additional code to the validateForm function. You might be able to get some solid use out of element.querySelectorAll() in this case. Something close to x = document.getElementsByClassName("tab"); y = x[currentTab].querySelectorAll("input"); If you modify what's inside the brackets of querySelectorAll, you may be able to use it get your input, textarea, and select elements. Works just like a CSS selector. Speaking of CSS, you'll also need to add an 'invalid' style for the textarea and select elements. Otherwise, it won't turn red like the others. You could copy the invalid style from the input.
  15. I would recommend utilizing something like overflow-y in your code. Set your body to the height of the screen, and set the overflow-y to hidden. That will eliminate the scrolling behaviour.
  16. Funce

    If Else

    You would be correct. Ternaries can perform multiple statements of execution. I'll point out that you're still executing one statement by nesting ternaries but the ability is there. However to use ternaries to execute multiple statements, would be... not ideal. Why would you not use an if...else? Additionally nesting ternaries exponentially reduces readability past the first.
  17. Interesting observation, thanks for clarifying my test cases. These ISO XSD-schemes are usually quite good for validating malformed data. And to enforce a consistent format of data exchange (which is the entire point of xml) You'd be correct that any further validation of what sort of data you want allowed would need to be internal. (Unless you included some bounds of the date that you'd allow, but I'm not sure on the specifics of this one)
  18. I would recommend adding the code that makes what's inside the pictures.
  19. I haven't used Python as a web backend before, so I'm not exactly the best person to consult on that. So why are you considering this feature? I don't think that its a feature that will be actively noticed from user to user. What's the plan?
  20. Click the triangle to start the spinning! (In this example) Rotation going... right?? Do you mean clockwise? Well uh, have at it then <style> @keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(359deg); } } #triangle-up { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 100px solid red; animation: rotation 0.5s infinite linear; } </style> <div id="triangle-up"></div>
  21. To add any additional validation code would dilute the example being taught here, which is the use of HTML attributes as validation. Ideally you want the various validation methods to be separate when learning, so you can understand the effects of each method of validation.
  22. What browser are you attempting to use for this? Fullscreen=yes is only supported in Internet Explorer.
  23. This is a speculative post based on my observations. It looks like rather than being constrained by any number of characters, it looks like the date format just instead needs to be delimited as allowed in the format. The letter examples seem to be merely common representations of how it is outputted. In terms of what CC means, I believe it might be referring to the century, rather than the standard year. I suspect that this might also be valid as a DateTime 1-1-1T1:1:1.1 and conversely 999999999-12-31T23:59:59.999999999999 See if you can check the above also. I'd be interested to see if there's a limit. I imagine if there isn't an arbitrary limit, the only limiting factor would be the max length of a string that is allowed to be put in.
  24. I'm not able to reproduce this, the code looks fine. Can you test this code on its own? <style> a[href^="mailto"]:link:before { content: " < "; } a[href^="mailto"]:link:after { content: " > "; } </style> <a href="mailto:xxxxx@hotmail.com">xxxxx@hotmail.com</a>
  25. The simple answer is no. You won't be able to win this one with only HTML. You'd definitely need a server side language to track what timestamp the audio is at. Minimum. I haven't played too much with media streaming so I wouldn't be able help tackle that challenge.
×
×
  • Create New...