Jump to content

Funce

Members
  • Content Count

    81
  • Joined

  • Last visited

  • Days Won

    3

Funce last won the day on October 4

Funce had the most liked content!

Community Reputation

10 Good

1 Follower

About Funce

  • Rank
    Newbie
  • Birthday April 24

Profile Information

  • Location
    New Zealand

Previous Fields

  • Languages
    HTML, CSS, Javascript, PHP, SQL

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Funce

    alert in AJAX

    This code seems to work fine, are you making sure that your 'systemp_pos1.txt' has the number 45 in it.
  2. Funce

    date format change

    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.
  3. Seems to work alright for me. When I expand the page, it gets bigger, and the opposite applies. What' isn't happening?
  4. Funce

    data change based on rotational

    One possible implementation is to have a counter that's incremented each interval. Then the corresponding variable is displayed.
  5. Funce

    w3 table column hover highlight

    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?
  6. Funce

    value from getelementbyid

    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.
  7. 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.
  8. Funce

    Problem with Images!

    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?
  9. Funce

    AJAX - A Question of Strategy

    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.
  10. Funce

    Multiple SlideShows on same HTML page

    You could pass along the SlideShow's ID as an argument. That's the most simple way. (Instead using separate IDs rather than classes)
  11. 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.
  12. My suggestion is to not use a fixed footer? Just put it in at the bottom of the page.
  13. Funce

    AJAX - A Question of Strategy

    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.
  14. Funce

    Feedback on web page's semantic elements

    A lot of these things that you've asked about will be unique to you unless you're working with enforced styling such a development team. Code wise, a lot of it looks good. Only things that I'll pick out it: Try throwing your CSS into a separate file. It will unclutter the main HTML code, and you'll be able to reuse it for other pages. In my opinion <br /> tags are kind of a crutch? They have their place but, most of the time, you'll be able to do better with CSS And on the note of the <br /> tags, one of them doesn't have an ending slash. This just looks like its been forgotten and it isn't make or break, however something that's really important is to be consistent across your tags. Your <a> tags inside the <footer> have spaces in between the href and = whereas the ones on your <aside> do not. Just the main thing is to be consistent. Have a look into the DRY principle. "Don't repeat yourself"
  15. You've stated that you have a page that requires users to be logged in to view. Could you duplicate the code that checks if they're logged in and place it before the code you've posted?
×