|
substitute posted:Everyone go view source on this poo poo. It's hilarious. What's worse is that it's the ViewState. That has to be processed on the backend for every request. Who's betting the keywords metadata is also stored there...
|
# ? Apr 26, 2014 20:01 |
|
|
# ? May 9, 2024 10:29 |
|
Bastard posted:Open DevTools, click on the gear icon, enable the "Disable cache (while DevTools is open)" option. I'm a moron. Chenghiz posted:Work in an incognito tab. If you're working with offline web apps this is also nice for having a fresh cache for testing and development. Is this still valid if the site requires sign in?
|
# ? Apr 26, 2014 21:29 |
|
supermikhail posted:I'm a moron. Not really, I've met quite a few developers who didn't know that option existed. Most just use the elements, network and console tabs for basic debugging usage, while DevTools offers so much more.
|
# ? Apr 26, 2014 22:43 |
|
substitute posted:Everyone go view source on this poo poo. It's hilarious. This is an incoming client of ours. hehhehehe
|
# ? Apr 27, 2014 18:49 |
|
supermikhail posted:Chrome after a while stops reloading JavaScript and gets it from the cache which is annoying when I'm editing it (supposedly it's not just JavaScript, but this is what's annoying). How do you work this thing? (Right now I "Clear Browsing Data"). When dev tools is open, you can right-click on the reload button and select Empty Cache and Hard Reload
|
# ? Apr 29, 2014 15:44 |
|
Munkeymon posted:When dev tools is open, you can right-click on the reload button and select Empty Cache and Hard Reload Thank you!
|
# ? Apr 29, 2014 15:59 |
|
Hard reloads also have easy keyboard shortcuts in Chrome: Cmd + Shift + R on Mac, Ctrl + F5 on Windows. Use shortcuts for everything if you're a real man.
|
# ? Apr 29, 2014 16:04 |
|
Personally I like Devtools > Settings (cog icon) > General > Disable cache (while DevTools is open)
|
# ? Apr 30, 2014 01:56 |
|
In case you haven't seen it yet, this is worth a read: http://stilldrinking.org/programming-sucks A painfully, hilariously accurate portrait of our industry.
|
# ? Apr 30, 2014 15:14 |
|
I don't think I'll be able to sleep tonight.
|
# ? Apr 30, 2014 16:38 |
|
supermikhail posted:
Yeah, they do a good job hiding useful features. Did you know you can make the dev tools dock to the right of the content instead of below it? They hide that option pretty well, too. kedo posted:Hard reloads also have easy keyboard shortcuts in Chrome: Cmd + Shift + R on Mac, Ctrl + F5 on Windows. Empty Cache and Hard Reload doesn't have a shortcut
|
# ? Apr 30, 2014 16:55 |
|
As a side project, I've decided to migrate my resume out of Apple Pages and into html - the idea being that I can version control it properly, etc. I'd like the CSS to roughly look like a paper resume at desktop device size, be appropriately responsive on mobile, and competently 'print to PDF' such that the resulting PDF looks like it came out of a word processor and not a web browser. I know this is vague, but can anyone give me any pointers on getting started? The markup and responsive stuff will be easy enough, but I'm not sure how to tackle that third requirement.
|
# ? May 4, 2014 18:25 |
|
Lexicon posted:As a side project, I've decided to migrate my resume out of Apple Pages and into html - the idea being that I can version control it properly, etc. I'd like the CSS to roughly look like a paper resume at desktop device size, be appropriately responsive on mobile, and competently 'print to PDF' such that the resulting PDF looks like it came out of a word processor and not a web browser. Make sure you have a 2nd stylesheet for media="print" and set sane pinter type sizes and hide stuff that doesn't make sense to print. Body copy at or near 11pt (note the points, not pixels for printers), headlines around 14-18pt, etc. Type should be larger on screen because it's read at about an outstretched arms length away, while print is read at "bent arm" length, so it's smaller. (An aside: this is why people use who 11/ 12 px type on the web should all be tarred and feathered.) This is my print.css form my resume: CSS code:
|
# ? May 4, 2014 18:39 |
|
Lexicon posted:As a side project, I've decided to migrate my resume out of Apple Pages and into html - the idea being that I can version control it properly, etc. I'd like the CSS to roughly look like a paper resume at desktop device size, be appropriately responsive on mobile, and competently 'print to PDF' such that the resulting PDF looks like it came out of a word processor and not a web browser. I'm not really sure what you mean by 'looks like it came out of a word processor' but you can specify different css files for print than for screen, so you can optimize your layout specifically for a sheet of paper easily enough. e;fb
|
# ? May 4, 2014 18:39 |
|
Lumpy posted:Make sure you have a 2nd stylesheet for media="print" and set sane pinter type sizes and hide stuff that doesn't make sense to print. Body copy at or near 11pt (note the points, not pixels for printers), headlines around 14-18pt, etc. Type should be larger on screen because it's read at about an outstretched arms length away, while print is read at "bent arm" length, so it's smaller. (An aside: this is why people use who 11/ 12 px type on the web should all be tarred and feathered.) Thanks, that's helpful - will give that a shot!
|
# ? May 5, 2014 04:26 |
|
There's a data science article about rap lyrics flying around Twitter right now: http://rappers.mdaniels.com.s3-website-us-east-1.amazonaws.com/ To my surprise, the font used is Source Sans Pro - one that I've typically not liked when I've used it myself. However, it looks beautiful on this page. I just tried to replicate it myself with the same obvious CSS rules and Google font reference - and lo and behold - it's back to looking like crap again: Why is my version (bottom) so hideous compared to the top?
|
# ? May 5, 2014 04:31 |
|
It didn't work in your version. That's Helvetica Light.
|
# ? May 5, 2014 04:34 |
|
noob hereHTML code:
|
# ? May 5, 2014 13:27 |
|
Make a jsfiddle.
|
# ? May 5, 2014 13:29 |
|
Because your function name is different than what you're calling.HTML code:
|
# ? May 5, 2014 13:34 |
|
Mister Chief posted:Make a jsfiddle. Thanks, it seems quite handy. So I used jsfiddle to tidy it up, but the JScript still fails to check the forms? After corrections: HTML code:
|
# ? May 5, 2014 13:40 |
|
kedo posted:Because your function name is different than what you're calling.
|
# ? May 5, 2014 13:48 |
|
Sorry, just realised..... ugh i'm stupid is this correct? HTML code:
|
# ? May 5, 2014 13:53 |
|
lufty posted:Thanks, it seems quite handy. ... put it on jsfiddle, save it, and post a link so that we can look at it there.
|
# ? May 5, 2014 14:09 |
|
EAT THE EGGS RICOLA posted:... put it on jsfiddle, save it, and post a link so that we can look at it there. http://jsfiddle.net/X8q9L/
|
# ? May 5, 2014 14:18 |
|
Exhibit A: validateForm() Exhibit B: validationForm() These things need to be the same. Also, never, ever, ever, ever, ever put a RESET button on your form. People only click on those by mistake, and then will hate you and your site when the form empties out instead of submitting. http://jsfiddle.net/Us486/1/ Once you fix that, you'll find out that the form submits no matter what. Look into the form's onsubmit handler, as that's what you need to use to prevent it from submitting based on client side validation.
|
# ? May 5, 2014 14:44 |
|
Fayez Butts posted:It didn't work in your version. That's Helvetica Light. Christ, I'm an idiot. I was editing the wrong layout file, and so the font never made it into the page - it was falling back to Helvetica as you correctly noticed. So now I'm closer, but it still look wrong. I'm guessing it comes down to inherited properties that differ, but even this same element CSS leads to a pretty different outcome: code:
Any ideas? (ps: mad respect to any design folks who work magic with type. I knew this already of course, but this silly example just reaffirms it - it's incredibly hard to get right)
|
# ? May 5, 2014 15:07 |
|
Try playing around with antialiasing styles. For example:CSS code:
CSS code:
This is what I tend to use for all my projects because I find that subpixel-antialiasing makes fonts weightier than they should be: CSS code:
kedo fucked around with this message at 15:29 on May 5, 2014 |
# ? May 5, 2014 15:14 |
|
Lumpy posted:Exhibit A: validateForm() Why doesn't it recognise the fact that I've called the validateForm() function to check what is submitted? edit: solved it, looked through w3schools for examples of form validation, much thanks. changed HTML code:
HTML code:
lufty fucked around with this message at 15:56 on May 5, 2014 |
# ? May 5, 2014 15:33 |
lufty posted:Why doesn't it recognise the fact that I've called the validateForm() function to check what is submitted? If I understand you correctly: because you don't replace the default event handler, you just add another one in. So on 'onclick' it processes your custom code, but it never blocks the original code (the 'process the form' code). You can add an 'event' parameter to the function definition and then first thing inside it hit 'event.preventDefault()'. And then if everything is okay you call the 'submit' on the form at the end of the javascript function.
|
|
# ? May 5, 2014 15:50 |
|
lufty posted:Why doesn't it recognise the fact that I've called the validateForm() function to check what is submitted? code:
|
# ? May 5, 2014 15:50 |
|
Sulla-Marius 88 posted:If I understand you correctly: because you don't replace the default event handler, you just add another one in. So on 'onclick' it processes your custom code, but it never blocks the original code (the 'process the form' code). Reality posted:
solved, thanks anyway edit: wait now i can't submit anything edit2: after making a few changes i'm really close to giving up http://jsfiddle.net/D9tG7/1/ lufty fucked around with this message at 16:50 on May 5, 2014 |
# ? May 5, 2014 15:54 |
lufty posted:solved, thanks anyway Because button is just a button, it has no tie to that form. here: http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml e: Also w3schools is the worst website ever, from memory. For HTML/low-level javaascript stuff it might not be too bad because that's simple enough, but for PHP or anything else it's absolutely terrible, so be wary what you take from it. Sulla Faex fucked around with this message at 16:49 on May 5, 2014 |
|
# ? May 5, 2014 16:46 |
|
Sulla-Marius 88 posted:e: Also w3schools is the worst website ever, from memory. For HTML/low-level javaascript stuff it might not be too bad because that's simple enough, but for PHP or anything else it's absolutely terrible, so be wary what you take from it. Indeed. http://www.w3fools.com/ e: Sadly this page used to be way longer as it detailed dozens of places where w3schools was providing incorrect information, but it appears they removed it. Still, w3schools is pretty terrible. kedo fucked around with this message at 17:01 on May 5, 2014 |
# ? May 5, 2014 16:59 |
|
kedo posted:Indeed. http://www.w3fools.com/ w3schools changed most of the quotes to equally bad information, and they got tired of maintaining it and answering emails about "oh hey is this correct now?"
|
# ? May 5, 2014 17:03 |
|
https://developer.mozilla.org/en-US/ MDN is a much better place for documentation
|
# ? May 5, 2014 17:06 |
|
kedo posted:Indeed. http://www.w3fools.com/ Thank you, sir/madam. I haven't, in fact, noticed any bad information on w3schools myself, partly from being a newbie, partly because I use the site only when I need some really basic info or the handy web color picker. But I feel nice finally being pointed at good alternatives.
|
# ? May 5, 2014 19:53 |
|
This thread might not be the most appropriate for my question, so apologies in advance if it isn't. I've done a lot of software development but not much web development, and I'm working on a project on the side. It would involve an app and a partner website of pages generated by content from the app. What is the current architecture thinking for such a construction? I have been prototyping it out with Python Flask, with the intent to expose some API end points for the apps. Reading about Angular and other JavaScript frameworks seems to indicate the current designs revolve around basically having your input/output exposed as an API and using Angular to pull in content, rather than have the server render a page for way request. Basically having your server just serve as the model in MVC and instead of containing business logic, just collect or expose your data. I see the reasoning behind this, as presumably spending more time on an API that is used for both the app sides of things and the web page cuts down on development costs, as well as making requests smaller and more efficient. Am I on the right track with this? Does anyone have a good "web page/app backend design" tutorial/blog post to go through?
|
# ? May 5, 2014 20:45 |
|
ruden posted:Reading about Angular and other JavaScript frameworks seems to indicate the current designs revolve around basically having your input/output exposed as an API and using Angular to pull in content, rather than have the server render a page for way request. This is a reasonable and modern way to do it. Another reason for this is that your web page feels more responsive, native, and interactive to your end users. Angular is great, but you might want to spend a bit of time comparing some alternatives. Right now I'm really liking React.
|
# ? May 5, 2014 21:39 |
|
|
# ? May 9, 2024 10:29 |
|
kedo posted:Try playing around with antialiasing styles. For example: Thank you so much! You've just opened up a Wonka-like world of wonder for me
|
# ? May 5, 2014 23:51 |