[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/wdg/ - Web Development General
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 211
Thread images: 8
File: 1456449140972.png (868 KB, 822x552) Image search: [Google]
1456449140972.png
868 KB, 822x552
Old thread >>53654474

> Discord
https://discord.gg/0qLTzz5potDFXfdT

>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
http://www.freecodecamp.com/
http://www.codewars.com/
>Crockford on Javascript
https://www.youtube.com/playlist?list=PL7664379246A246CB

>Frontend development
https://github.com/dypsilon/frontend-dev-bookmarks

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks

>Useful tools
https://pastebin.com/q5nB1Npt/
https://libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
https://developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
http://www.programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/

> How to get started
http://www.youtube.com/watch?v=pB0WvcxTbCA
Good videos on the channel too
https://www.youtube.com/channel/UCVTlvUkGslCV_h-nSAId8Sw

>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
>>
That thread went by pretty quick.

Someone said something should be in the OP, but I couldn't find it.

If you have anything that should be in the OP then reply to this post.
>>
why web dev over general programming?
>>
>>53689541
I suppose because it's more specialised so you don't have to wade thru a huge number of replies which are not related to what you're interested.

Heck even webdev is a big enough subject, you may not be concerned with each reply, but there's more convergence in one topic, I suppose.
>>
>>53689541
Because its super easy money with no degree necessary and/or required?
>>
>>53691253
This.

I wish I knew what happened. I passed on web dev in the early 2000s because they only made like 35k max in my area. Now they make like...a GORRILIAN DOLLARS
>>
How do I make it so if I set the styling of a text input to be 100% with, it is actually 100% width instead of being larger than that?
>>
>>53691779
wat

100% width is the width of the container the text input is in, how can it be "larger" than that?
>>
Should I just give up and fall for the angular meme?
>>
>>53692185

I gave up and fell for the React meme.. and I actually like it.
>>
>>53692036
>>53691779
Uhm I believe if you set fontsize to 100% it inherits the parent element's fontsize.
>>
>>53691779
Overflow: hidden
>>
what kind of technologies are behind the big sites like facebook or twitter?
>>
>>53692308
They are both pretty open about it.

Facebook is PHP, Twitter is Java/Scala.
>>
>>53692185
Sure, if you know all the other shit, its just helpful tool, but if are jumping right at it without knowing any javascript or some programming its going to play you bad joke in the future
>>
>learning react
This is fucking ugly. It might be hip but putting all this code in JS is disgusting.
>>
>>53692324
I'm comfortable with JS, at first I didn't bother to properly learn it and didn't like using it, but then I had to use prototypes and constructors properly for my project and now everything's much more organized. Also using Django and PostgreSQL for backend.

I already have a user API where a lot of data is called with AJAX, the problem though is just templating. There's some parts of the site where I want the layout to change dynamically (no refresh), like when the user selects one of his own objects, or when the user wants to edit an object, but I just don't know if I should go all out and make it a SPA. Can I still split sections/pages of the site and not fully commit to a SPA if I use Angular? Or will that just make things confusing?
>>
>>53692333
thats what i said when i saw react. but its actually pretty legit.
>>
class Item {
constructor(options={}) {
this.seller = ko.observable(options.seller).extend({ notify: 'always' });

this.seller.subscribe(x => alert('foo ' + x));
}
}

class Model {
constructor() {
this.items = ko.observableArray([]);

this.add = function() {
var item = new Item();

item.seller.subscribe(x => alert('bar ' + x));

this.items.push(item);
}
}
}

ko.applyBindings(new Model());


Struggling with a knockout.js problem. Can anyone tell me why this alerts foo but not bar? It doesn't make sense to me that it's ignoring the subscription, even if I remove the one that alerts foo.
>>
Build "Project Flyer" With Me
where can i fucking get that shit.
i can't find a torrent.
or just recommend me something else
>>
I am at the point where I want to start using grunt or gulp for minimizing, pushing to production etc. Should I be using webpack instead? Or is it too new?
>>
>>53688891
I looked through the old thread and didn't see anything
>>
File: Untitled.png (4 KB, 819x537) Image search: [Google]
Untitled.png
4 KB, 819x537
Okay /wdg/ this may be a retarted SO question but I really can't find the answer

Pic related is what I'm trying to achieve:
- Full-width top menu
- 50px wide left menu (doesn't need full height)
- Two columns, of which the first one is 300px wide and the right one takes the rest of the available space

Don't know why I'm not able to do such basic shit but well... Could you help me out ?

JSfiddle:
https://jsfiddle.net/uv476mdq/

Problems:
- Middle and right align to bottom of menu
- Right doesn't take rest of width

Thanks~
>>
>>53694458
learn webpack, it's more powerful

>>53695714
https://jsfiddle.net/autL2d0y/
>>
>>53695714
Can't you use calc( 100% - 350px ) for the width of the right column then float:left the left and middle columns and float:right the right one?

https://jsfiddle.net/uv476mdq/3/
>>
>>53692314
>PHP
I thought they rewrote their shit in Hack and C++.
>>
>>53693709
No clue about knockout, but why the fuck are you assigning methods in the constructor?
>>
File: Screenshot 2016-03-26 15.34.02.png (112 KB, 2646x1024) Image search: [Google]
Screenshot 2016-03-26 15.34.02.png
112 KB, 2646x1024
ultra noob from yesterday

how do i make the div as big(height) as the buttons, also how do I remove the space between them ?
also give me some tips
>>
>>53696024


They used to, now with HHVM, Hack & PHP code get compiled to bytecode, then JIT compiled to x64


http://hhvm.com/
>>
>>53695714
Using flexbox
https://jsfiddle.net/jrowtqd4/
>>
>>53696096
Set margin to 0 on the buttons and padding to 0 on the div.
>>
hey guys anyone know how can I rotate the entire <canvas> in js? I looked everywhere and could only find about rotating objects inside (and no css won't do)
>>
>>53696398
>css won't do
Why not? Can't you just transform the entire canvas?
>>
>>53696504
I tried it but with css the image gets saved without the rotation I want it to get saved with it
>>
What is the best python/django IDE? I'm currently using Licliplse but it is kinda shit.
>>
>>53696724
J E T
B
R
A
I
N
S
>>
>>53696724
vim
>>
>>53696753
I also want to be able to make "commercial" products with it and I'm not paying $200+ a year
>>
>>53696398
>>53696531
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/rotate
>>
>>53696901
that rotates the inside of canvas not the main canvas square
>>
>>53696994
that's the point if you want it to save rotated.
>>
>>53697012
well can I apply it to the entire canvas? I want to show everything in a rhombus instead of square
>>
>>53696793
Pirate it. When you get rich making apps, buy it.
>>
Sometimes I wonder what it's like to manage a big website. The Daily Mail website's page load is absolute garbage. Makes me wonder why they don't do something to optimize it.
>>
>>53698062
The bigger the distance between the top and bottom of an organisation the harder it becomes to get anything done.
>>
I think I'm going to make a clickbait website.

Not one where I pretend to be a journalist either.
>>
Any good sites for stock images for templating?
I'd use some stock image sites, but they only have a tiny preview and I need quite large images.

I don't care about stamps or text across them, I just need some good example images.
>>
>>53698770
Placehold.it
>>
>>53698996
I know that one, but that makes a very boring presentation when everything is gray.
I also want to stay with the thematic topic on each page to get a feel for it if it works, so the kitten version doesn't work too well too.

I'm pulling pictures from istock now, they have a full resolution preview.
>>
I'm learning React and will probably dive into Redux as well, should I learn them together at the same time or one by one?
>>
>>53698770
try lorem pixel.
>>
>>53696171
>flexbox
If you're developing a website for yourself only maybe.
>>
>>53698770
https://www.pexels.com/
>>
How to improve?

import React from 'react';
import moment from 'moment';
import Time from 'react-time';

class TimeAgo extends React.Component {

constructor(props) {
super(props);

this.moment = moment(props.timestamp);

this.state = {
text: this.moment.local().format('MMMM Mo'),
title: this.moment.local().format('MMMM Mo YYYY, HH:mm'),
interval: 1000,
}

this.tick = this.tick.bind(this);
}

tick() {
const age = moment().diff(this.moment, 'minutes');
let text = this.moment.local().fromNow();

this.setState({ text: text });

if (age < 1) {
this.setState({ interval: 10000 });
}
else if (age < 60) {
this.setState({ interval: 60000 });
}
else if (age < 60 * 24) {
this.setState({ interval: 5400000 });
}
else if (age < 60 * 24 * 7 * 2 ) {
this.setState({ interval: 86400000 });
}
else {
if (moment().subtract(3, 'months').isSameOrBefore(this.moment)) {
text = this.moment.local().format('MMMM Mo');
}
else {
text = this.moment.local().format('MMMM Mo, YYYY');
}

this.setState({
text: text,
title: this.moment.local().fromNow()
});

clearTimeout(this.ticker);
}

this.ticker = setTimeout(this.tick, this.state.interval);
}

componentDidMount() {
this.ticker = setTimeout(this.tick, 0);
}

componentWillUnmount() {
clearTimeout(this.ticker);
}

render() {
return <div>
<time dateTime={this.props.timestamp} title={this.state.title}>{this.state.text}</time>
</div>;
}

}

export default TimeAgo;
>>
>>53699303
who the fuck still uses ie9?
>>
>>53699876
It's basically the default browser in Win7, so there's plenty of people and businesses who use it. Either because they don't know better or because they're not allowed to install their own software.

Sadly, it will be a few more years until we can safely use flexbox.
>>
>>53699937
Yeah. It's completely fucked up, though - Microsoft offers no support for anything < IE 11 anymore.
Don't these people get warning messages every time they start their browsers?
>>
>>53699876
>>53699937
>>53699956
Actually, it's even worse than that. Win7 comes with IE8 preinstalled, I think. There are big differences between 8 and 9, 8 is way way more retarded than 9 in terms of standards compliance.
>>
>>53699876
In the last 40 hours on my website only 1.9% used IE and they were all IE 11.

25% used mobile or tablet, 65% used Chrome and 10% used Firefox.

The rest is a mix between opera, safari, pale moon and stuff like that.
>>
>>53696184
didnt help me, i also added display: inline-block to the links
but when i remove overflow:auto in the #navi I solve the problem
i'm confused
>>
>>53700003
It's so fucking retarded when companies demand you to write them a "modern web application with HTML5, CSS3 and the newest JavaScript shinies"... that must also be comatible with that piece of shit browser that hasn't ever heard of ANY of those technologies.

Man, IE 8 is from a different time, bean counter retards. A time before browser behavior was properly standardized. It's not acceptable to use it in 2016. This abomination is holding the web back from being the platform it could be.
>>
>>53700047
The problem is when you have to develop for a client with a very general target, who can't afford to completely shut out some users.
>>
>>53700083
Ikr, I personally don't even develop for IE8, I only support from IE9 up. And even in IE9, I don't even try to make everything work in the same way as in the newest browsers, I just make sure the basic layout and functionality are the same. I don't care if you're not seeing the same transitions or stuff like that. Get a better browser if you want a better version of the site.
>>
>>53700084
I would just make my ideal style sheet and another 90s-tier stylesheet called turd.css that I would load on any browser with an unsupported useragent.
>>
hey in my new job im being forced to use dojo for javascript. are there are any good resources for it anywhere besides their website?
>>
>>53700142
Yeah. But those fallbacks often take a lot of time - generally, you need MORE time to develop fallbacks for olders browsers than to do the original functionality on browsers that support the new features.

Customers don't understand that. They can't understand. They want the impossible - the newest shit on browsers that can't possibly support it.
>>
>>53700186
Yeah, I do that sometimes, just to make some adjustments to how the main style is applied. But I wouldn't make a completely separate sheet just for that, that would be like reworking the whole site. I would just load those after all the stylesheets were loaded, using IE conditional comments.
>>
Are dev jobs like I imagine?

Everyone sitting in a little cubicle and some dickhead that can't even code runs around policing everyone "HURRY, YOU HAVE TO HAVE 3 PAGES DONE BY TONIGHT!"

Oh, probably important to mention that I'm American and not Indian.
>>
>>53700058
ok solved it now with margin -2px
>>
>>53700243
I've wasted maybe days pulling my hair out of my head working on fallbacks for IE versions on some sites.

The time when IE won't be used at all can't come soon enough. IMO, it should be outlawed, just like you have laws for public pollution, if your car goes beyond a certain limit, you shouldn't be allowed to drive that piece of shit on public roads. Same with IE.
>>
>>53700084
<!--[if lte IE 9]>
<p class="fuckie">
Hey you disgusting shitlord, go and fuck yourself. We at %websitenamehere% are dedicated to bringing you the nicest bla bla bla but unfortunately, the decade old piece of shit browser you are using doesn't support those. Please upgrade to one of these browsers. Alternatively, please follow our handy guide to drinking bleach.
<ul class="browserlist">
...
</ul>
</p>
<img src="ie/suicideadvice_bleach.png"/>
<![endif]-->

The final solution to the IE question.
The necessary step.
We need a web-Hitler.
>>
how can I reload json data on page after being sorted in click function? Now it just sorts the data but the data in html wont change
>>
How do I into node. It just seems so unintuitive with so much shit going on behind the scenes. Looked at it for 2 days now and I can't make any progress. should I just drop this? Anything else I should try or stick with apache and php?
>>
So...I'm in a really shitty spot in life, and for various reasons it's difficult to self-teach at home. (That's what I'm doing now, and for the last 6 months or so. I'm making progress every day, but things are...slow.) I think it'd really help me to be around other people that are tech-inclined and to have a well-defined curriculum to follow. On my own, I don't really have any bearing on whether I "know" something or not, or if I'm spending all my time on something unimportant/skipping over things that are important.

I'm thinking about doing one of those coding boot camp things. Are they all just complete scams? Or should I just continue internet-learning? Wat do, /wdg/?
>>
>>53700388
Re-render the HTML then, after you do the sorting.
>>
>>53700599
Those bootcamps work like this

>promised job offer or your money back
>teach you wordpress for 3 months for a gorillion dollars (their instructors make 140k+ yearly)
>you get out and get a job offer for a shitty wordpress farm at 10 dollars an hour that the codecamp was contracted with so you can't get your money back if you decline.

That's how I picture they run things because that's exactly how I would run things. Wordpress farms want cheap labor and leads, codecamps want students so they give the money-back-if-no-job guarantee thing.


It's better to get a roommate if you don't have one so you can survive working part-time while you learn.
>>
>>53700852
Going to Bootcamps is truly pathetic. Paying to get work? Paying to get a playlist of free videos to learn wordpress or the newest meme.js?
Hah!
>>
>>53700852

The ones I've been looking at have the graduation rates and avg salary after graduation publicly available, and the numbers seem to be consistent with junior dev salaries.

>teach you wordpress for 3 months

Most of them seem to be focused on MEAN stack or Rails, but honestly, I'd take a shitty wordpress job for a while. It's better than min wage and probably easy enough that I can get some more self-learning in on the clock.

>It's better to get a roommate if you don't have one so you can survive working part-time while you learn.

Ugh, I don't want a roommate. Had a lot of bad experiences with them. That probably is a good idea though. I'll have to think about it some more. A lot of the bootcamps are like 12 hours a day though, so not a lot of time for a part time job. I'd have to go on a really tight budget, but I'm okay with that.

>>53701031
It's not a playlist of free videos, you actually have to go to class.


Anyway, has anyone on here actually been to one or have any actual experience with them?
>>
>>53701145
>It's not a playlist of free videos, you actually have to go to class.
Yes, and watch a playlist of videos there. And work.
You pay for this.

Do not fall for the bootcamp trap.
>>
>>53701031
It seems viable to people who have no idea how to code and see how much devs make.

Just like how everyone in high school "wants to be a doctor" only because they make money.

>>53701145
I wish I could get a roommate to cut my hours. I have way too many projects to work on and not near enough time.
>>
>>53701186
I would think the guaranteed job placement is the main reason anyone does those. Guaranteed work is pretty huge in this economy.
>>
IM APPLYING IM ACTUALLY DOING IT THIS TIME

WEEEEEEEEEEEEE!
>>
>>53701186
Only school near me has Ruby/HTML/CSS/Javascript, 2 month program, part time option. Bogus or what?
>>
What are the best resources for learning shit like React and Redux (optionally with Immutable)?
>>
>HTML CSS Angular
>90k a year

I'm learning this meme. Don't try to stop me.
>>
> php sucks they said
Salary: $110,000.00 /year

Required experience:

PHP programming on LAMP platform in an Agile/SCRUM environment: 3 years

The job description said "mysql not required but preferred"

WEW!
>>
>>53701812
Damn where do you find these? I can hack a mean PHP script out in a few hours.
>>
>>53701812
>LAMP
>Linux
>Apache
>MySQL
>PHP
>mysql not required

>Agile/SCRUM
see you in the obituaries anon
>>
>>53702090
dfw, bruv
>>
js sucks
>>
>>53688891
irc channel owner, hmu
[email protected]
>>
I don't understand the grid system.

Why are their different col sizes depending on the screen?

Are you supposed to have a col for each screen-size so it knows where to put what columns?

I get the whole navbar collapsing thing, but how is this supposed to work for content with the different col sizes?
>>
>>53702529

Because you generally want to lay out your content differently depending on screen size. You have a lot more room to work with on a desktop-sized screen than a phone.
>>
>>53702529
let's say you have a row with 4 columns.
on tablets you want only 2 columns next to each other.
on phones you only want 1.

so your row could look like this (based on a grid with 12 segments)
<div class="row">
<div class="small-12 medium-6 large-4"></div>
<div class="small-12 medium-6 large-4"></div>
<div class="small-12 medium-6 large-4"></div>
<div class="small-12 medium-6 large-4"></div>
</div>


so on small screens one div occupies 12 out of 12 segments, so others get pushed down.
on medium screens one div occupies 6 out of 12 segments, so you have 2 segments next to each other, the rest get pushed down again
on large screens a segment is only 4 segments out of 12 wide, so you can fit 4 together.

the breakpoints, what is small, medium, large etc, depend on the framework.
>>
>>53702710
whops, large should be 3 segments, not 4.
4 elements with 4 segments won't fit into 12.
my bad.
>>
LEARN REACT OR ANGULAR1
?!?!?!?!?!?!?!
PLIS IM FROM INDIA HELP
>>
>>53702747
go away, pajeet
>>
>>53702529
By default, Bootstrap is based on a 12-column grid. You can customise it and create as many as you want, but for the purpose of learning you can work with the default first.

This means that you can place maximum 12 separate columns on the same line (horizontally) on any screen size.

The easiest way to understand this is by using an example in which you are using all the columns.

So, let's say you have a page layout with 4 columns, which you want to display horizontally on the big screens, you want these columns to collapse into 2 columns per line on medium screens and to display as one column horizontally on phones.

The way you do this is by using the Bootstrap classes which specify how your layout behaves between each breakpoint (breakpoints are the limits of the container element which include all the columns we're talking about; Bootstrap defines them at <768px for phones, >750px for tablets, >970px laptops, 1170px desktops).

So your classes should look like this in the markup:

<div class="container">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">A
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">B
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">C
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">D
</div>
</div>

xs - extra small
sm - small
md - medium
lg - large
>>
>>53702747
Learn "2pu>>loo"
>>
>>53702777
>>53702812
sir, i take your job
>>
>>53702844
Joke's on you faglord, I'm a high-skill foreigner so I take the jobs that manage the jobs you uneducated fuckheads take.
>>
>>53702874
stop eating the baits anon.
>>
>>53702710
OH!

This tutorial is doing an awful job at explaining that.
>>
>>53702779
I get it a bit better, thanks.

The problem is how I need to use it.

I need a 50% width column on everything but tablet and mobile. On tablet and mobile I need a 100% column.

I can't wrap my head around how to accomplish this.
>>
>>53703135
col-xs-12 col-md-6
>>
>>53703135
are you literally retarded?
>>
>>53703189
Quality shitpost. I bet you would shit yourself if you had to do js without jquery selectors. Kill yourself.

>>53703181
So you can have 12, but you don't have to define 12; got it.
>>
>>53703261
wow you can do js without jquery, what a prodigy you are!
>>
>>53703336
In 10 years when you can't learn the newest meme.css as easily as you used to, I hope you run into another version of yourself.
>>
>>53703135
I forgot to tell you something, which is useful at least in Bootstrap, if that's what you're using.

The container can also span the whole horizontal space from one side to another, not just that middle section.

For that you need to use:
<div class="container-fluid">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
This content will take up the whole space horizontally.
</div>
</div>


For your example, you need to use the classes I've just explained to you above.

So, you specify how much width your column you want to have as a proportion of the container.

col-xs-12 means the column will take the whole 12-column space on phones
col-xs-6 means the column will take only half of the whole 12-column space on phones

col-md-12 means the column will take the whole 12-column space on tablets
col-md-6 means the column will take only half of the whole 12-column space on tablets

Be careful with the md and sm classes, because they kinda intersect each other, especially when you have phones in landscape mode and tablets in picture mode. This has been a fucking pain for me in the past to get right, but you have to structure the page NOT for the device, but for the breakpoints, so anything above X pixels will display in a certain way horizontally no matter what. You have to focus on how things flow in the page horizontally first.
>>
how do i have an index page that can have new content added to it without needing to be manually update?
e.g. https://www.behance.net/collection/8271507/Logotype
this isn't php as far as I can tell. surely they're not manually editing the index to add each logo every time they update that page. how does it load in more logos when you scroll to the bottom of the page? what's dictating the order? some kind of xml document they edit when they add new content that gets parsed by some javascript?
>>
>>53703529
Thanks for the info.

Is it "better" to align columns with offsets or centering classes?
>>
>>53703649
It's called infinite scrolling. It's basically a better version of pagination.

You check if the scrollbar has hit the bottom then load the more content.
>>
>>53699183
https://github.com/petehunt/react-howto
>>
>>53699643
export default class TimeAgo extends React.Component


>
this.tick = this.tick.bind(this)

This makes no sense. Why do you need it?

this.setState({ text })


That else if chain should be a for loop with a break.
>>
>>53703702
What do you mean by aligning columns, you mean positioning them in very particular spots? Then you use offsets.


But columns are just placeholders which structure the space on the page, so you can better position the content. You can also align content inside columns in a way that matches what you're trying to get.
>>
>>53703809
>That else if chain should be a for loop with a break.
How do you mean? You want to start a loop every time the function runs?
>>
>>53704106
I mean a giant chain of else if is ugly to read and generally bad practise. Here's an example of what I meat. A for loop that converts minutes into a human readable string.
const divide = [60, 24, 30, 12],
unit = ['minute', 'hour', 'day', 'month']
for (let i = 0; i < divide.length; i++) {
if (time < divide[i]) {
return ago(time, unit[i])
}
time = Math.floor(time / divide[i])
}
return ago(time, 'year')
>>
Where do you guys get inspiration for designs?
>>
Should I actually start using Atom or is it still a bad meme?
>>
I'm using php to shoot out
<td onclick='jsfunction()'>'s
which is defined in my
<script src='javascript.js'>
will that work? is it incorrectly scoped? Can't seem to get it to call 'jsfunction()'
Anywhere I can read about this stuff?
>>
>>53704945
I draw boxes on a sheet of paper and fill them in.
>>
I'm really really slow at working on any projects.
Do you guys find this too or am I very dumb? I've been working on kind of a shitty PHP / AJAX facebook type project just to show off if I ever try to get employed, but I've spent so much time and made little progress.
>>
>>53705067

bad meme. try emacs.
>>
>>53705392
bad meme. try notepad.
>>
>>53705199

>using PHP to shit out JS onclicks

Don't cross the streams, bro. That sounds like a really sloppy hack and you should step back and think about what you're really trying to accomplish.

Without knowing what you're trying to do exactly, I would guess what you should be doing is binding a click event handler to a class/id/element.

>>53705067
I haven't used it in like 6 months, but it seemed to be really buggy for me. Maybe it matured since I've used it though. A lot of people like it.
>>
>>53705301
It happens. I progress extremely slow on personal projects unless I have ADD meds which I don't anymore. My brain moves at a snails pace.
>>
>>53705301
>>53705480
One thing that really helps me is I started eating better and exercising a little when I wake up. Otherwise I start having memory and concentration problems after a few hours.
>>
I guess this belongs here.
I'm a complete newfag on this, I know JS and HTML syntax but I don't know how to use JS shit on HTML.
Well, i have a JavaScript array. How do I show the value of a specific element on the array through HTML?
>>
>>53705474
Maybe you're right.

<td> is from an AJAX request and the onclick function I've got calls a second AJAX req to a different file.

Basically the <td> holds an image which is a thumbnail and I want when the thumbnail is clicked to bring down the full sized image.

Is my method justs bad practice?
>>
>>53705693
You can create an element with a text node inside it and assign it that value, if I understood correctly what you're trying to do.
>>
element.innerHTML = array[index];

????
>>
>>53705600
I can agree with this.

If you start mixing up languages or typing stuff that makes no sense then go do a few sets of deadlifts or run a mile and you'll be right again.
>>
>>53705776
I understand now.
Thanks senpai.
>>
>>53705693

<p id="foo"></p>


document.getElementById('foo').innerText = myArray[n];
>>
File: fuc.jpg (42 KB, 482x338) Image search: [Google]
fuc.jpg
42 KB, 482x338
>>53705854
>tfw smoker
>>
>>53705693

echo '<div class="butts">' + myAwesomeArray[i] + '</div>';

Like that?
>>
I need a decent website idea. All my ideas are shit. I've made sites before but I could never get a user base. How do you guys come up with ideas of what to make.
>>
>>53705900
echo?
>>
>>53705900
wrong language, senpai
>>
>>53705906
make something to find the nearest curry shop in my area.
>>
>>53705906
Honestly I don't know. I just have moments where I go "It would be cool if this existed"

I usually sit on the idea for a month and bounce the idea around to a few friends to see if it would be a good idea. About half the time it's a good idea.

>>53705928
Isn't that right? I'm exhausted. system.out.println then.
>>
>>53705947
Go to Yelp and type in curry in the search box.
>>
>>53705757

First of all, tables should be for tabular data only. Using them for styling has been bad practice since the 90's.

Second of all, post a pic or jsfiddle or something, it still sounds like you're doing something in a really roundabout way.
>>
>>53706013
>Using them for styling has been bad practice since the 90's.
No it wasn't. Tables were what everyone used until the early 2000s. Divs were primarily for styling blocks of content and were more often than not only used for their align attribute.

DONT TALK SHIT ABOUT TABLES. That's my childhood right there.
>>
>>53706064

Dude tables were absolutely shit, retards used them as shitty grid systems in the same way that people used images of rounded corners or actual rounded fucking corners - it was a work around for the fact that html/css couldn't keep up with the expansion of the internet

he's right, don't use fucking tables for anything other than tabular data just like you don't use divs for semantic elements
>>
>>53706114
I remember those rounded corners. Wasn't border-radius not supported for the longest time?
>>
>>53706064
tables were design specifically for row/cell layouts. they have no business being in modern design.
>>
>>53706114
>>53706064
>>53706013

I've done 0 styling on this proj.
Should i instead be using
<div float:left><img></div>
<div float:right><img></div>
>>
File: table problem.png (139 KB, 1327x627) Image search: [Google]
table problem.png
139 KB, 1327x627
>>53706207
forgot my image, I'm such a heel.

ps I've got the function to work.
>>
>>53706203
I didn't say they did. They WERE modern design in the 90s.

>>53706207
If you were to do it that way you would have to do <div style="float:left">

You can't just put CSS into HTML elements like you did.
>>
File: menu.png (738 B, 128x62) Image search: [Google]
menu.png
738 B, 128x62
Should I even bother putting the word Menu there or should I assume that everyone knows this will bring up the navigation menu?
>>
How do I give read/write access to a php page?

I'm trying to upload stuff from the client and store on server. The folder is also admined through a PHP page.

I use nginx.
>>
>>53706228
What kind of issues does using a table bring up? I guess the extra tbody element is inefficient? Its just one element though
>>
>>53706283
I think most people understand what the symbol means now
>>
>>53706283
Make it the alt text if it's a image or the title text if it's a symbol font.

Also what's your target audience? 20-25 year olds, nah. 45-60 year olds, yes.
>>
>>53706325
>I think most people understand what the symbol means now

Shitty UX: The post
>>
>>53706301
They aren't flexible and have trouble word-wrapping content.

>>53706283
If it's for tablets or phones then just the menu icon. I never want to see the menu symbol on PC.
>>
>>53706325
>>53706335
>>53706383

Alright lads, got it. And yeah it only shows on smaller screens.
>>
>>53706203
>tables have no business in modern design.
Hey guys, uh, you know how websites are laid out in a table and it actually works great and all the browsers support it and it doesn't need shit 3rd party JavaScript libraries to work and it looks consistent across all the platforms and its easy to write and makes perfect sense to everyone?
Lets stop doing that and do something else that doesn't work.
Why?
Uh... Something about accessibility? You know for screen reading software or something.
Oh so the new way will work better for disabled people?
No it will work much worse and nobody will implement the features properly anyway.
Won't we get into trouble?
No, the websites won't load properly for able bodied people either so its not discrimination
>>
>>53699643
Why not just age * 1000?
>>
>>53706411
What are you even talking about?

DIVs are way better than tables these days. Browsers style tables differently so you always have to CSS reset them and apply your own styles. Divs just work and wordwrap properly.

Never serve dynamic content in a table.
>>
>>53706411
What percentage of /wdg/ is in
>>>>>>web design
>>
>>53706443
Alright but can I use a table if it's a static image (i.e. no words)
>>
>>53706400
>And yeah it only shows on smaller screens.

Mobile is the biggest web platform in the world, saying 'mobile internet' is like saying 'color television'. If you're treating mobile UX as an afterthought then you're shit, and hamburger menus are a shitty afterthought feature because they consistently perform poorly in usability tests.

If you're going to hide some infrequently used features inside a hamburger, then fine. But don't put something essential like navigation in there.
>>
>>53706411
HTML should be style-less. You should be able to rip out the css, you should be able to restyle the entire site, (aside from moving elements up/down, but there is the order property for that if you don't support IE 9)

The HTML should describe only the content, never the style
>>
>>53706477
Can you? Yes. Should you? No.

>>53706479
On that note, this is a good tear-down of the burger: http://deep.design/the-hamburger-menu/
>>
>>53706443
I'm talking about how everything was far simpler in the old days before css
It might be outdated now but putting a page in a table was a great idea before the semantic nazis took power
>>
>>53706411
Show me a responsive layout made with tables that looks good both on mobile and on a 4k screen.

Don't worry... I'll wait.
>>
>>53706491
then why are you hack frauds encouraging me to use the style="float:left" attribute.

SOUND THE ALARUM, CSS HAS LEAKED INTO THE HTML
>>
>>53706532
not him but "looks good both on mobile and on a 4k screen" is rare even WITH divs.
>>
>>53706479
Great, lets just stack multiple menu items at the top then.
>>
>>53706491
Yes yes I know the spiel
But the fact is i have a better chance of sucking my own balls than finding a pure html page free of any style or unnecessary elements that wasn't an exercise in doing so.
>>
>>53706525
Oh I know. I was the one saying it was the standard back in the day.

>>53706532
This is easier than you think. Media queries and some CSS styling good 2 go.
>>
>>53706536
>SOUND THE ALARUM, CSS HAS LEAKED INTO THE HTML
Do you know why this is very bad practice?
>>
>>53706532
Show me a responsive layout that looks good at all. In fact show me a responsive layout because I sure as fuck don't know what that means. It sounds like you mean you want a page cluttered with unnecessary baubles of JavaScript that ironically make the page less ' responsive'
>>
>>53706569
Even a <select> element would be more user-friendly than a hamburger.

Or try putting some actual thought into your design.

How many pages does your site even have?
>>
>>53706612
Pretty obviously not
>>
>>53706621
Like a pop-up modal? It has 6 links, no sub menus or dropdowns.
>>
>>53706613
>Show me a responsive layout that looks good at all.
Show me a non-responsive layout that looks good on anything other than the screen you designed it on.

>In fact show me a responsive layout because I sure as fuck don't know what that means.
It means a layout that looks good or at least is usable on every screen size available on every internet-capable device in use today.

At work we have sites that work on 4k monitors, all the way down to old-as-fuck 2007 mobiles running opera mini that you literally have to navigate using a d-pad.

>It sounds like you mean you want a page cluttered with unnecessary baubles of JavaScript that ironically make the page less ' responsive'
If you're the guy advocating the use of table layouts I highly recommend you update yourself on the last 15 years of web development.
Maybe start here: http://www.w3schools.com/css/css_rwd_mediaqueries.asp
>>
http://www.warnerbros.com/archive/spacejam/movie/jam.htm

this uses tables. can someone who has a 4K monitor screencap what it looks like on it for shits n giggles?
>>
>>53706810
You know you can zoom out of the page?
>>
>>53706861
clearly I need sleep.
>>
>>53706325
Don't ever make assumptions like that.
>>
>>53706491
Says who bitch?
>>
I'm thinking of a way to kill the navbar completely.

I can put most of my stuff on one page with collapse. Similar to '[post reply]' here on 4chan

I want a very minimal fixed footer containing social media links and copyright info; that's it.

Actually I guess it's not too strange to not have a navbar, I've just nearly always had one.

Thanks, blog.
>>
>>53706516
Funny how his alternatives look no better than the hamburger menu. I'll keep using it until there's a major shift in preference among users, because bar the odd UI expert most people don't seem to have a problem with it.
>>
How likely is it that if I steal a plugin that has no free version (like a slideshow), that the owner will find that I am using it without having paid for it?
What's the worst that could happen - they file a report or send an order to take it down or produce license information?
>>
>>53707782
>What's the worst that could happen
they hunt you down and murder everyone you've ever cared about
>>
>>53706621
>>53706684

Don't leave me hanging bro. Would a modal be considered a good UI alternative to the hamburger menu? I guess you could still keep the button the same, but instead of rolling out the menu you show the pop-up modal instead?
>>
>>53707938
this, famm


I really hate paid software. I highly support the "pay what you want including 0" software.
>>
File: 154381-158185.jpg (14 KB, 225x225) Image search: [Google]
154381-158185.jpg
14 KB, 225x225
THERE ARE TOO MANY JAVASCRIPT FRAMEWORKS
>>
>>53708790
Yeah, and I bet you're only talkung about the front-end ones.
I
>>
You guys know web development is not really 'developing' right? running "install_wordpress.sh" dose not make anyone a developer
>>
>>53709028
I know this is bait, but by that logic no one is a programmer unless they are flipping switches. IDE's make it easier, operating systems make it easier etc. Everything makes it easier.

In the future your grandmother could be a web dev.
>>
>>53709065
I am sure my grandmother can double click on .sh files now
>>
>>53709086
My grandmothers desktop looks like a disaster. She clicks while she drags her mouse so icons are all over the place.
>>
I fucking hate you /wdg/
>>
>>53709301
Did you get fired for making your layout with tables?
>>
File: 1452781427365.png (47 KB, 331x286) Image search: [Google]
1452781427365.png
47 KB, 331x286
>>53709301
>>
>>53709306
yes
>>
>>53709347
>You will never be a loli
>>
lads my checkbox on my form is giving me on

I've used value="true" which is good, but if its unchecked i get null

should I just do:
   if (checkbox == on){
$bool = true;
} else {
$bool = false;
}
>>
>>53709674
It's more than possible to replicate the brains hormones in computer simulation and alter them to that of a loli. It's even possible to retain consciousness while altering hormones to that of a loli. It's all definitely 100% possible; not even joking. That said, we are 17 away and It's best to save your DNA now. By that time you will be able to repair your DNA with prior DNA which will reverse aging. Unfortunately this will actually happen before the cure to cancer because at that time you won't be able to change the DNA fast enough with RNA injection to change the replication portion of cancer DNA. If you care, it's the flu that is modified to do this. Call me in 17ish years when you finally figure the genome sequence enough to replicate cells before over oxidation. Do you have any idea how tall people are going to become? Anyways, cryo a dna sample or you're walshed.
>>
Okay /g/, so I'm decent at css and have a stronghold knowledge of Wordpress but my knowledge of JS, PHP and anything else is limited. The company I work for never requires it and it's a fucking circus. It's one of those half-assed small web dev companies.

How is a Wordpress site supposed to be built? Currently, I'm putting divs via a plugin called div shortcode where I can do [div class="whatever"][end-div] into the editor of the page to make the pages of their fucked up PSDs. No one has taught me the correct way to make sections of a website or how to properly do a Wordpress site.

Anyone that can shed some insight on that? I need and have to get better. I'm currently a $15 an hour developer at a broken cesspool of a company and I barely ever get 20+ hours a week.

Any resources or tips would be great.
>>
>>53709674
thank god
do you understand how bizarre it would be to go from a fully grown 6' adult male to an 8 year old girl?
>>
>>53709789
$bool = (checkbox == on)
or just omit the parens too
>>
>>53709825
Learn php at least. Also, stop working for shitty cheap companies. The thought of $15 an hour even for just a CSS guy makes me fucking uneasy.
>>
>>53706536
Cause they're idiots? At the very least you want to give it a class or id and float that left/right.

>>53706577
Its actually not that hard. Especially if you allow for flexbox.

>>53707252
w3
>>
>>53704215
This is better in that it's more concise and works with humanised formats, but it's way less readable and will take longer to understand.
>>
>>53709853
Lol, proof #100gorillion that tech positions are overestimated and ignorantly overpaid. HTML and CSS are minimum wage tier imo
Thread replies: 211
Thread images: 8

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.