Jump to content

rink.attendant.6

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by rink.attendant.6

  1. Is there any way to disable the native datepicker in Opera (and now Chrome) on <input type=date> elements? I know an obvious solution would be to use <input type=text> but that's not exactly what I'm looking for. A JavaScript solution is fine (it might be the only way to do it), as I really don't care if the datepicker comes up if the user has JavaScript disabled. It is currently clashing with the jQuery UI Datepicker element and I've done some extensive googling with little success. I've tried e.preventDefault() but that doesn't work for some reason.
  2. I'm not sure how many (or if any) of you are familiar with the Twig templating system, I'm just starting off with it (might as well give it a try I suppose, Smarty seemed to be overkill). Everything has been going well so far, except I'm a bit confused as to whether I'm supposed to have the entire contents of my page in one variable. In the example in the documentation here: http://twig.sensiolabs.org/doc/templates.html , under "My Webpage" it has {{ a_variable }}, which is where all the content goes. My template is similar to that, with a header, sidebar and footer. I'm just wondering whether I'm supposed to put all of the HTML of the main content into one variable and pass it through like that or is there something I'm missing? I plan to use one page to parse everything (the "controller"), just like how WordPress uses one page to display all of the public area of a site through fancy URL rewrites.
  3. Hmm... well the site is hosted on a dedicated server with no domain. I'm not sure about the size of each entry (each entry with the index is approx 8 kilobytes in the database, if that helps). As for the audience of the site, there would be a maximum of 10 concurrent users (that's the most extreme situation and most likely would never happen, 1-3 users is normal). Most of them have high-speed broadband connections, though a few of them are in remote communities with lite-speed DSL (not sure what speed that is). Everyone should have access to computers with Windows 7 and IE 9 by the time the database is deployed (again not sure if that matters). The expected amount of records per year (for the particular table I'm concerned with) would be 1200-1500. Would it be a good idea to retrieve a whole year's worth of data (by JSON or whatever) and have DataTables paginate that or would that be too much? I've consulted with the server administrator and he couldn't come up with an answer... so that's why I'm asking
  4. I understand that client-side pagination is more appropriate for little sets of data and server-side is for large sets of data. With the DataTables plugin it seems a bit easier to implement server-side pagination. All this seems fine, however I've googled many resources and nowhere does anyone define what a "large" data set is (number of records/number of fields). So I'm wondering, approximately how large of a data set would be large enough to choose server-side pagination over client-side pagination?
  5. You must use CSS to control the presentation of the page. Here's an example: #navigation button { margin: 1em;} I highly doubt you're using "button" elements but that was just an example. Read up on the CSS tutorial for more information about margins.
  6. Ahh ok... I did quite a bit of reading on the Model-View-Controller and Model-View-Presenter frameworks and it seems that I have the model completely separated, but my "View" is mixed with my "Controller". I shall try to fix that, Smarty seems to be overkill for what I'm doing.
  7. You had me until you said template engine.... Currently the application logic (processing of data, form validation, database operations) is separated from the presentation. Other than that I'm not quite sure if I'm doing it right. :/
  8. I'm not really sure where to post this... Anyways, I have an HTML5 site built and I would like to create a mobile version of it as well. I'm looking towards jQuery Mobile, but I can see that requires significant amounts of restructuring of my code despite the fact that it is already very semantic. (e.g. jQuery mobile uses unordered lists for some things that I use <section> and <div> for.) One solution that I am thinking of is to detect the mobile device via PHP and set a variable (say, $mobile) then output HTML accordingly: <?php if($mobile) { ?><!-- some mobile HTML here --><?php } else { ?><!-- some desktop HTML here --><?php } ?> However this solution seems quite messy and I'm not sure whether it is the best way to go. Another idea would be to copy the entire site into a subdomain and maintain two versions of code but that really does not fall under the DRY philosophy. Besides, that will make adding features and stuff very complicated. What would be the best way to do this? I'd really like to stick with jQuery Mobile if possible, it seems to have a wide range of support on devices.
  9. Same concept with shorter code: $dateIn = (isset($_POST['date_in'])) ? $_POST['date_in'] : '';
  10. Actually I found out that by using <object> or <iframe>, Firefox does not recognize the block-level link that surrounds it (i.e. the SVG image isn't clickable) so I guess I'm going to stick with the <img> tag with conditional comments.
  11. See I'm reading through the HTML5 spec and it says that <iframe> is for inserting a nested browsing context, and a browsing context is defined to be: However, the <object> element says: Whereas <embed> is still more appropriate than <iframe>, however it implies that <embed> is for interactive content. Is <iframe> still the best option here?
  12. I'm designing a web application for a company and I'm given the opportunity to use nice vector icons. I'm told that most (if not all) of the computers will be upgraded to Windows 7 with Internet Explorer 9 by the end of the summer, however I still need to aim for compatibility with IE 7 and 8. I'm using HTML5 and therefore I should be able to do inline SVG, however obviously this doesn't work in IE 7 or 8 so I'm left with two options: <object data='example.svg' type='image/svg+xml' width='128' height='128'><img src='example.png' width='128' height='128'></object> Or <!--[if lte IE 8]><img src='example.png' width='128' height='128' ><![endif]--><!--[if gt IE 8]><img src='example.svg' width='128' height='128'><![endif]--><!--[if !IE]> --><img src='example.svg' width='128' height='128'><!-- <![endif]--> I was unable to properly test the first version, as I am using a development (localhost) server on a computer that has IE 9, and there seems to be a bug in the Developer Tools in that SVG images will render even if you set the Browser mode to Internet Explorer 7 or 8. So I'm wondering if the PNG fallback will even appear (I don't have a computer with IE 7 or 8 to test this on at the moment.) Another issue with the first piece of code is that I've heard Firefox and Chrome (and possibly Safari) downloads the alternate image in addition to the SVG: http://stackoverflow...bject-tags?rq=1While this isn't a huge deal considering they are small icons, I'd like to avoid it if possible. Finally, I'd also like to mention that I'd like to stay away from <iframe> and the Raphael.js library if possible. Any idea on how to do this?
  13. After doing some rather quick Googling I found that it was possibly SQLBase http://www.unify.com/Products/Data_Management/SQLBase/default.aspx
  14. I would definitely not use <header> for that, the header would be the top bar with the logo and the navigation links (optionally wrapped in a <nav> element). Section would be used only if it was logical to add a heading to it, and while you can say that you can put "Portfolio" or whatever, I would think it would be more of an <aside> thing... http://html5doctor.com/aside-revisited/ Or if I'm wrong, <div> is the next best element.
×
×
  • Create New...