Jump to content

Funce

Moderator
  • Posts

    602
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Funce

  1. This doesn't require anything particularly special. If you want AJAX, you can change the `getValues()` function to send an AJAX request with the FormData object as the payload. Look here: https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects If you don't need AJAX, then a standard form submission would take care of this easily. Remove the onClick method and change the button type to "submit". That would submit as per a normal form. (Sending through the action URL)
  2. Funce

    user id

    There's gotta be some error messages in that last lot of code you posted, Html. I can see a syntax error in line 14, an undefined error in line 21. Copying the error messages helps us more than describing them.
  3. Is your server located with a hosting provider? They should have some instruction on if they allow FTP or otherwise. If they allow FTP, you can try FileZilla as a program to use.
  4. Usually font discrepancies indicate that the fonts specified on a website, aren't installed on the machine you're viewing it on. This is usually prevalent if you're specifying a font, but not including the font library on your webpage for those that don't have it. However, you stated that you're using google fonts. How are you linking these? Can you create a small example of this? I suspect that your link may have something wrong with it (Maybe a typo or something).
  5. Here's one which may have some alternatives for you to explore: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local This one however doesn't run on Firefox, Opera and IE
  6. I see, you'll probably need a server side language like PHP instead. I've misunderstood your issue.
  7. What's your code looking like? It sounds like the document.getElementById("MATCH") isn't matching up with your <div id="MATCH">
  8. Funce

    Universal selector

    You'll need to do H1, h2, h3 and so on https://stackoverflow.com/questions/7539125/can-i-target-all-h-tags-with-a-single-selector
  9. Have you tried using an .htaccess file? https://stackoverflow.com/questions/17709500/how-to-redirect-all-pages-only-to-index-html-using-htaccess-file-and-not-redirec
  10. Have you seen: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time <input type="time" min="9:00" max="18:00" /> This one works on 24hr time.
  11. No worries Roddy, I'm not too familiar with PHPMailer myself, (I went hunting viciously for what msgHTML() was) but from my cursory evaluation (without a PHP parser) it otherwise looks okay.
  12. Hi there Roddy, I'm going to poke some holes in the implementation. require_once shouldn't have an `=` in it, semi-colon at the end. You're calling your PHPMailerFactory as if it had a constructor function, from your latest post it seems like it doesn't. Instead call it like: <?php $newsletter = PHPMailerFactory::create('newsletter', $username, $email); ?>
  13. This code seems to work fine, are you making sure that your 'systemp_pos1.txt' has the number 45 in it.
  14. Perhaps this has more information for you: https://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format The field that's shown is locale specific to browser. The date picker I see(Chrome) inputs as DD/MM/YYYY as that's how dates are written in New Zealand. If you're referring to the output of the date input, then you'll need to look into string manipulation. Anything with locale based input should always output in a standard fashion. This allows any program using the output to function in any locale.
  15. Seems to work alright for me. When I expand the page, it gets bigger, and the opposite applies. What' isn't happening?
  16. One possible implementation is to have a counter that's incremented each interval. Then the corresponding variable is displayed.
  17. I've done some investigating for you, and it seems that w3-table actually overrides the colgroup styles. Disabling the styles associated with the revealed the Colgroup styles as normal. That codepen you linked looked especially good. What happened with that one?
  18. https://www.w3schools.com/jsref/prop_html_innerhtml.asp The innerHTML property just gets anything that's in between the tags specified in the selector. Checking whether (x == 0) would only function if you had "0" inside your <p> tags. Instead of updating the InnerHTML, comparing the innerHTML and then updating it again based on that. Why don't you instead x = this.responseText and then continue as normal.
  19. Hi there Sonalk! In terms of your second half: This one is a really easy one to overlook. I don't blame you for getting tripped up on this one function specificName() { var x = document.getElementById("myTopnav"); if (x.className === "topnav") { x.className += " responsive"; } else { x.className = "topnav"; } } Your JavaScript is looking for an element with an `id` attribute of `myTopnav` but your `<a>` tag seems to be missing an id attribute altogether (Which I assume is the tag you want to retrieve). If you add an id that matches your JavaScript, I reckon you might get a better result.
  20. It might be something to do with your <a> tag styling in your CSS. Do the dots always appear when there is a valid link? What styles are applied to it?
  21. The most information you'll be able to gather from my page, is that it updates every 5 minutes, is slow to load the first time, and works nearly instantly from thereafter until the next 5 minute rotation. Here's the link: https://www.championfreight.co.nz/currency (It has a note on when it was last updated) The slow loads are updating the Database with the API, then displaying the data. The fast page loads are loading from the Database without updating, as the Data hasn't aged enough for me to need to update from the API. A very high level overview: RAM vs Disk. Disk is slow, and updates the RAM. The RAM is fast, and can respond to multiple commands quickly, as it can access its own data very quickly, but would need to update from the Disk if it gets a request it isn't expecting, and lacks the data required. In this scenario: Your Matomo would be the Disk, with the absolute values required at any time. The RAM would be a database you create and host on your own server. Its super fast, due to it being hosted in the same place, but periodically needs to get the up to date values from Matomo. I store a timestamp with the values I retrieve, so I check the timestamp, and if its too old, I get new values. In your case: AJAX asks for Data from PHP PHP gets Data from Database and checks when it was received If its recent enough, PHP returns the data back to AJAX, If its not, PHP asks Matomo for the Data Matomo reports and returns the Data to PHP PHP updates Database with Data, and a timestamp for checking later PHP then returns the Data back to AJAX If you don't like the idea of a slow load, if your hosting provider allows scheduled tasks, just run the page on the scheduler. The page load from the Scheduler will pull all the Data required, and none of your users will experience any slowdown of experience.
  22. You could pass along the SlideShow's ID as an argument. That's the most simple way. (Instead using separate IDs rather than classes)
  23. What issues are you having in regards to it? I need something a bit more specific. Is it the webpage doesn't reach the bottom of the browser in some resolutions? That's fixable. Is it layout issues, and has nowhere for it to fit? That's fixable.
  24. My suggestion is to not use a fixed footer? Just put it in at the bottom of the page.
  25. I've created this implementation with a Currency API that has very stringent limits. I managed to get it, so even if someone was always using the page that needed the API data, it would never go over. By reusing the old data with a data age check. (By storing what time the data was saved) AJAX call into 'controller' which then checks the Database, to see how old the data is. If its new, I get the data from the Database and return it. If its old, I get the data from the API, update the database and return the information. It works quite well. It also makes 'subsequent' calls to the 'controller' lightning fast.
×
×
  • Create New...