Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Buttons are inline elements, so they need to be centered by setting text-align on the parent element.
  2. Setting a relative position is going to mess up your layout, as well as using align-items. Use text-align to center the text. <div class ="container"> <div class ="itilblock" style= "width: 150px; line-height: 50px;">something and something else</div> <div class ="itilblock" style= "width: 200px; line-height: 30px;">something and something else</div> </div> div.itilblock { background-color: rgb(3,173,181); border-style: outset; text-align: center; color: white; height: 75px; padding: 3px; display: inline-block; } Remember that inline blocks have a small space between them unless the tags in the source code are on the same line with no space in between them.
  3. Goodness, no. In this case jQuery does not have some magical pre-built solution to the problem. You need to have a mousemove event. Each time the event fires, subtract the element's position from the mouse's position. That will give you a direction vector which you can use to generate text-shadow coordinates. There are details you need to take into account: The pivot point of the element starts off at the top left corner. You probably want the pivot point to be in the middle of the element, the middle is at [x + width/2, y + width/2] The vertical coordinates for text-shadow might be inverted.
  4. AJAX is Javascript, so you have no choice but to use Javascript if you want to use AJAX. You can sort the nodes, but it's not trivial. Do you want to change the order in the DOM itself or just what is being displayed to the user? The sort() method of Javascript arrays can make your job easier: https://www.w3schools.com/jsref/jsref_sort.asp You will need to make a custom sorting function to deal with DOM nodes.
  5. You will need Javascript to do some math and calculate the shadow's direction, then generate a text-shadow value for it.
  6. If you actually want to keep track of all the seats that are sold so that other users can't buy them then you definitely need the data sent to the server-side. A client-side application would serve, at best, as a simulation of a seat reservation system, but if you're not keeping track of who bought which seats on the server then you can't actually sell real seats at a real theater.
  7. You'll need a server-side application built to read and update seats, then you would use AJAX to make the system work without reloading the page. Generally you would use a database instead of a text file to store the information about the clients and seats.
  8. My guess is that either TM_code is supposed to be a string or $access_code has an unexpected value.
  9. Make sure the figcaption element is a block and that there is no code floating the img element.
  10. Every time you create a new row you're adding another event handler to all the rows. The newest row will have just one event handler, but the older rows will have as many event handlers as times you've clicked the "new" button.
  11. That's very inefficient. eval() should never be used. Why exactly do you want a function that does a math operation when you can simply do the operation right where you would be calling the function. // Short and efficient var theResult = 50 + 20; // Long and inefficient var theResult = doMath(50, 20, "+");
  12. You need to use a server-side programming language to display the same template on all the pages.
  13. No, you can't. I would recommend making multiple functions, one for each operation, just to keep things organized, but if you absolutely need to do it all in the same function you can pass a string to indicate which operation to do. function operate(a, b, operator) { switch(operator) { case "+": return a + b; case "-": return a - b; case "*": return a * b; case "/": return a / b; default: return 0; } }
  14. The Javascript file doesn't exist: http://kgoellner.com/js/jflickrfeed.min.js
  15. Ingolme

    parse XML

    In PHP you can use the DOMDocument class to read XML using standard DOM methods. You can use cURL to get the XML string from the other server.
  16. I'm pretty sure browsers can't open powerpoint files on their own. If your browser is showing anything at all, there's probably a plug-in running, you would have to see if the plug-in offers such a feature.
  17. Keydown and keyup events occur instantly. In text fields you can use the oninput event which detects whether a character was put into the input whether or not a keyboard did it. You shouldn't use HTML attributes for events, if you use proper event techniques you can determine which element fired the event. Now here's an example of how Javascript can make code shorter than jQuery does. <html> <head> <title>Example</title> </head> <body> <input type="number" id="interval_size"> <input id="generalization_next" type="button" value="Next" disabled="disabled"> <script> document.getElementById("interval_size").addEventListener("input", valueChanged); function valueChanged(e){ var inputValue = e.currentTarget.value; var target = document.getElementById("generalization_next"); target.disabled = inputValue == ""; } </script> </body> </html>
  18. You can also do this without jQuery using the rowIndex property of the table row element: https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement/rowIndex If you have a reference to the image, you can get to the table row using the parentNode property
  19. My first guess would be that the backslash is escaping the closing quote for the string. Try '\\'
  20. I don't believe they've ever given much attention to the forum. They likely just clicked an "Upgrade" button and let it do its thing. The quality of development in a company is often dictated by how much money the business branch wants to spend on it. I think they just didn't want to bother spending the time and money to do a proper migration process since the forum does not really generate money for their company.
  21. Unfortunately, we have no way to find out, since the site owners are not very communicative.
  22. It looks to me as if IPB upgraded the forum software version.
  23. When you open the XAMPP control panel what do you see?
  24. Create the element first, then in the same function, you can call getElementById() and change the second element as well. function CheckColors(val){ var element=document.getElementById('color-test'); var element2 = document.getElementById("something else"); if(val=='pick a color'||val=='others') { element.style.display='block'; element2.style.display = "block"; } else { element.style.display='none'; element2.style.display = "none"; } }
  25. You can select multiple things using the comma. With an ID, you never need to prefix it with any other selectors because it's unique on the page. To search for something that contains two classes, attach both classes to the selector. #desc, .ui-block-a.titles {
×
×
  • Create New...