Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
kedo
Nov 27, 2007


What version of IE is giving you the problem? I'd bet a dollar it's because your container is like one or two pixels too narrow in IE due to rendering inconsistencies, so the third box is getting pushed to the next line (which isn't visible). Try either increasing the container width? or maybe setting overflow-x to visible (nah that probably wouldn't work)

Sadly jsfiddle is like "LALW NOPE" when I try to open it in IE8 and it's working correctly in IE9, so I can't test that for you.

kedo fucked around with this message at 23:11 on Aug 8, 2013

Adbot
ADBOT LOVES YOU

Pilsner
Nov 23, 2002

Thanks for the help with the divs. I gather that the <br style="clear: both;" /> thing is a bit of a hack, so I wrapped my text in a div and set overflow: auto (via a new CSS class). Works. :)

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



kedo posted:

What version of IE is giving you the problem? I'd bet a dollar it's because your container is like one or two pixels too narrow in IE due to rendering inconsistencies, so the third box is getting pushed to the next line (which isn't visible). Try either increasing the container width? or maybe setting overflow-x to visible (nah that probably wouldn't work)

Sadly jsfiddle is like "LALW NOPE" when I try to open it in IE8 and it's working correctly in IE9, so I can't test that for you.

It happens in both IE8 and IE9.

I'll give that a go and see what happens. Browser stack using the jsFiddle was working fine to but I'll see whats up.

What's painful is that this is all local and to see any changes I need to commit and create a entry in SourceTree. But thanks! :)

Fuck them
Jan 21, 2011

and their bullshit
:yotj:
Is having a button show a load pinwheel a good practice if what the button is doing is taking a few seconds and we want the user to wait without flipping out, but it doesn't warrant the entire page being loadscreened? It's a certain ajax call that is sometimes slow due to stuff beyond our reach (a legacy DB way way out there) and we want to make sure the user doesn't just button mash or get annoyed and start slapping buttons.

Also, if this isn't a terrible idea, can anyone point me to a good case of a button going all pinwheeley instead of the whole page?

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



I shrunk the boxes down by 12 pixels and it looks like it works in IE9 which is good news. IE8 is all kinds of hosed up but im going to run Google Analytics and if it's less then say, 10% users - gently caress it.

Pilsner
Nov 23, 2002

2banks1swap.avi posted:

Is having a button show a load pinwheel a good practice if what the button is doing is taking a few seconds and we want the user to wait without flipping out, but it doesn't warrant the entire page being loadscreened? It's a certain ajax call that is sometimes slow due to stuff beyond our reach (a legacy DB way way out there) and we want to make sure the user doesn't just button mash or get annoyed and start slapping buttons.

Also, if this isn't a terrible idea, can anyone point me to a good case of a button going all pinwheeley instead of the whole page?
Isn't it quite easy to just disable the button until the call is done?

kedo
Nov 27, 2007

Pilsner posted:

Isn't it quite easy to just disable the button until the call is done?

Might be nice to both disable it and display a pinwheel.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



I have a weird problem. I'm doing a pretty simple jQuery animation on a DIV to set its height. Doing that makes an absolutely-positioned child element invisible in some situations in some browsers. Chrome and iOS Safari both have the problem, but it goes away in Chrome if I run as close the the same code as possible on jsfiddle (haven't tried iOS).

This works as intended on Chrome and IE: http://jsfiddle.net/qC7RM/1/
This breaks (the DIV with the X in it disappears) on Chrome, iOS and IE: http://pastehtml.com/view/dbwi3x6dq.html

Both work on FF. Is this a bug or am I doing something incredibly stupid?

kedo
Nov 27, 2007

Munkeymon posted:

I have a weird problem. I'm doing a pretty simple jQuery animation on a DIV to set its height. Doing that makes an absolutely-positioned child element invisible in some situations in some browsers. Chrome and iOS Safari both have the problem, but it goes away in Chrome if I run as close the the same code as possible on jsfiddle (haven't tried iOS).

This works as intended on Chrome and IE: http://jsfiddle.net/qC7RM/1/
This breaks (the DIV with the X in it disappears) on Chrome, iOS and IE: http://pastehtml.com/view/dbwi3x6dq.html

Both work on FF. Is this a bug or am I doing something incredibly stupid?

When you animate height (and many other things) jQuery sets overflow: hidden on the animating element. Your child element is outside of the normal, visible bounds of the parent element, so it's getting hidden while the animation occurs.

Possible solutions off the top of my head:
- Move the thing outside of the parent element
- overflow: visible !important (boooo)

e: Another option which I've done before in similar situations is to have the thing that's getting hidden fade out before the animation occurs and then back in once the animation finishes. It's not a perfect solution, but at least then it looks intentional.

kedo fucked around with this message at 19:42 on Aug 9, 2013

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

kedo posted:

When you animate height (and many other things) jQuery sets overflow: hidden on the animating element. Your child element is outside of the normal, visible bounds of the parent element, so it's getting hidden while the animation occurs.

Notably, overflow:hidden isn't being unset after the animation finishes.

If you don't give a poo poo about older browsers, you should try using CSS animations: http://jsfiddle.net/QGXnh/

EDIT: Tweaked a bit for browser compatibility: http://jsfiddle.net/QGXnh/3/

Bognar fucked around with this message at 19:45 on Aug 9, 2013

Sudden Infant Def Syndrome
Oct 2, 2004

Not sure if this is the right place to ask, but I have a problem I'm hoping someone here has dealt with.

I need to put Like buttons on recipes and calendar events on my work's website. For some reason it doesn't get the info (title, picture, etc) when you click it, but if you refresh and click a second time all the info is filled out. If I check the page with the FB Debugger it works just fine. If I use the debugger on a new entry and then Like, it works as well. It looks like it just doesn't scrape right on the first pass.

It looks like when an item is created in the future, I can have FB scrape it at creation, so it will always have the information. Is there a good way to go backwards and automatically scrape all previously created entries?

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



Is that "var" really necessary too? Unless that is going to change why not just use the regular selector.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



kedo posted:

When you animate height (and many other things) jQuery sets overflow: hidden on the animating element. Your child element is outside of the normal, visible bounds of the parent element, so it's getting hidden while the animation occurs.

Possible solutions off the top of my head:
- Move the thing outside of the parent element
- overflow: visible !important (boooo)

e: Another option which I've done before in similar situations is to have the thing that's getting hidden fade out before the animation occurs and then back in once the animation finishes. It's not a perfect solution, but at least then it looks intentional.

Adding overflow: visible to the completion callback of the animation fixes it for my purposes because the whole container is actually hidden at the beginning in the real code for which this was a repro, so it looks perfectly natural live. Thanks. Still doesn't explain why the same (well, same-ish) drat thing is fine on jsfiddle and broken on the static HTML test.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
Is the jsFiddle using the same jQuery version as you?

kedo
Nov 27, 2007

Sudden Infant Def Syndrome posted:

Not sure if this is the right place to ask, but I have a problem I'm hoping someone here has dealt with.

I need to put Like buttons on recipes and calendar events on my work's website. For some reason it doesn't get the info (title, picture, etc) when you click it, but if you refresh and click a second time all the info is filled out. If I check the page with the FB Debugger it works just fine. If I use the debugger on a new entry and then Like, it works as well. It looks like it just doesn't scrape right on the first pass.

It looks like when an item is created in the future, I can have FB scrape it at creation, so it will always have the information. Is there a good way to go backwards and automatically scrape all previously created entries?

Using open graph meta tags could help it scrape correctly on the first go around. And if you add those it might help old entries, but I'm not sure about that. I doubt Facebook is doing any retroactive scraping... there's just no point.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Thermopyle posted:

#web on synirc.

Done.

Go there.

Hooray. I'll idle there during work (I'm veddermatic in IRC land) 9-5 EST. I run a couple channels and familiar with all things IRC if you need or want ops / hops.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Bognar posted:

Is the jsFiddle using the same jQuery version as you?

Not the same file. Same version from jsfiddle and from Google, though, so that could be it.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

I'm doing some page speed optimization for someone because they've freaked out on Google using mobile performance as a metric, and after Google overhauled the page speed output page. So far relatively simple, I've sprited up some stuff, minified some others, etc etc. One thing that keeps coming up though is this, from the Facebook Like button:
"Compressing the following resources with gzip could reduce their transfer size by 99.5KiB (69% reduction).
Compressing http://static.xx.fbcdn.net/rsrc.php/v2/yh/r/9Fgi3KsB6QZ.js could save 99.5KiB (69% reduction)."

The problem of course being, it's on a Facebook CDN, and I can't make them compress it (nor find an alternative way to get it). Am I just screwed, or is there another method to render a Facebook like button that I haven't found?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Scaramouche posted:

I'm doing some page speed optimization for someone because they've freaked out on Google using mobile performance as a metric, and after Google overhauled the page speed output page. So far relatively simple, I've sprited up some stuff, minified some others, etc etc. One thing that keeps coming up though is this, from the Facebook Like button:
"Compressing the following resources with gzip could reduce their transfer size by 99.5KiB (69% reduction).
Compressing http://static.xx.fbcdn.net/rsrc.php/v2/yh/r/9Fgi3KsB6QZ.js could save 99.5KiB (69% reduction)."

The problem of course being, it's on a Facebook CDN, and I can't make them compress it (nor find an alternative way to get it). Am I just screwed, or is there another method to render a Facebook like button that I haven't found?

Don't those lazy-load by default? If not, lazy-load them. Nobody's going to be rushing to Like whatever is on your site within half a second of the first request.

kedo
Nov 27, 2007

Munkeymon posted:

Don't those lazy-load by default? If not, lazy-load them. Nobody's going to be rushing to Like whatever is on your site within half a second of the first request.

I think Google still includes asynchronous requests when it calculates page performance. I'm not aware of a way around that problem though, Scaramouche. Also assuming you've tidied up most everything else, you can probably let 99kb slide.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Yeah, it's not a matter of when it loads (first, synchronous, asynchronous) but rather the total amount of kb loaded and whether it's compressed or not. The weird thing is I googled around and can't really find anyone talking about it, which is weird in that I assume there's some page load perfectionist out there who would be bitching about it.

kedo
Nov 27, 2007

I found a few unanswered SO questions about it which leads me to believe it's probably not possible. Maybe you could figure out some sort of hack to prevent the script from loading / compress and cache a copy of it on your server and deliver that script up instead (who knows if that would even work), but otherwise I think you're trying to accomplish the impossible. Since it's being requested on page load and is coming from Facebook, even if you could gzip it somehow on your end you'd still have to download it in an uncompressed form first.

That is unless I'm terribly mistaken about something here.

Count Thrashula
Jun 1, 2003

Death is nothing compared to vindication.
Buglord
Since I'm new-ish to web development, coming over from lovely .NET Enterprise intranet-webapp development, I have a question about what language to work with.

I've dabbled in Rails - is it only best suited for database-heavy applications such as blogs and forums where the MVC structure is really helpful? I have an application in mind that (after logging in) will basically be a single-page web application with not a whole lot of model/database stuff. If something like JS/PHP that's less framework-y better suited for that?

Or am I totally overthinking this and should just stick with Rails anyway since I'm already sort of comfortable with it?

jony neuemonic
Nov 13, 2009

QPZIL posted:

Since I'm new-ish to web development, coming over from lovely .NET Enterprise intranet-webapp development, I have a question about what language to work with.

I've dabbled in Rails - is it only best suited for database-heavy applications such as blogs and forums where the MVC structure is really helpful? I have an application in mind that (after logging in) will basically be a single-page web application with not a whole lot of model/database stuff. If something like JS/PHP that's less framework-y better suited for that?

Or am I totally overthinking this and should just stick with Rails anyway since I'm already sort of comfortable with it?

You could always write something using Sinatra to respond to your JS.

I'm starting to feel like all I do is plug Sinatra (mostly offline, my poor colleagues), but it really is just that nice to work with. If you already know some Ruby from dabbling in Rails it's worth a look.

Count Thrashula
Jun 1, 2003

Death is nothing compared to vindication.
Buglord

fidel sarcastro posted:

You could always write something using Sinatra to respond to your JS.

I'm starting to feel like all I do is plug Sinatra (mostly offline, my poor colleagues), but it really is just that nice to work with. If you already know some Ruby from dabbling in Rails it's worth a look.

Wow, that's... wow. Really simple, but basically just what I'm looking for.

Pilsner
Nov 23, 2002

So, I was about to submit my newly deployed site to Bing just for the heck of it.

I loaded up https://www.bing.com/toolbox/submit-site-url and it looked sober enough, clean page. Woops, hadn't enabled javascript on bing.com...



I'm about to submit my website and you display news about a "Rihanna nip slip"? gently caress it, I think I'll do the world a service and NOT submit my site to you.

some kinda jackal
Feb 25, 2003

 
 
Hi guys,

I have a couple of questions. I haven't touched HTML or CSS in literally maybe six or seven years so this is all really overwhelming again. I'm trying to do a quick one-page thing and maybe I can run some questions by you guys:

http://cssdesk.com/RUcr6

The header image is just a placeholder, but the intended dimensions are correct. The goal is to line up the bar in the header image with the borders on the page, which my code has clumsily done.

The problem is, the browser reserves the full size of the header image even though I've repositioned it higher, so "text" appears halfway down the page instead of under the header. I'm not sure how to best achieve the effect I'm going for without manually repositioning the header image div, or without leaving a giant space under the header image div.

I'm sure there's just something about div positioning that I'm not understanding, but I'll be damned if I can find out what it is. Any suggestions?

The end result would be something like this:

Oh My Science
Dec 29, 2008

Pilsner posted:


I'm about to submit my website and you display news about a "Rihanna nip slip"?

Not even, just at risk of a nip slip. Thanks Bing.

Diabolik900
Mar 28, 2007

Martytoof posted:

Hi guys,

I have a couple of questions. I haven't touched HTML or CSS in literally maybe six or seven years so this is all really overwhelming again. I'm trying to do a quick one-page thing and maybe I can run some questions by you guys:

http://cssdesk.com/RUcr6

The header image is just a placeholder, but the intended dimensions are correct. The goal is to line up the bar in the header image with the borders on the page, which my code has clumsily done.

The problem is, the browser reserves the full size of the header image even though I've repositioned it higher, so "text" appears halfway down the page instead of under the header. I'm not sure how to best achieve the effect I'm going for without manually repositioning the header image div, or without leaving a giant space under the header image div.

I'm sure there's just something about div positioning that I'm not understanding, but I'll be damned if I can find out what it is. Any suggestions?

The end result would be something like this:



I would take the header image out of the content div, like this:

code:
<div id="header_image">
      <img src="https://dl.dropboxusercontent.com/u/58959/Sites/temp/dummy_header.png" />
</div>
<div id="content">
        text
</div>
And then change the CSS to this:

code:
div#header_image {
  position:relative;
  margin-top: -159;
}

Oh My Science
Dec 29, 2008

Martytoof posted:

The end result would be something like this:



Pretty much the same solution as Diabolik900, but the header is still located in the same spot. Basically position absolute is something to avoid if possible.

http://codepen.io/mrlee-io/full/xcybI

some kinda jackal
Feb 25, 2003

 
 
Thanks gang, the advice helps a lot!

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I don't think this has been mentioned yet, but there's a new attack that allows recovery of data from SSL encrypted sessions that are compressed via gzip.

Here's a surprisingly readable paper on the attack.

The current mitigation involves disabling gzip compression on your server or framework.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Thermopyle posted:

I don't think this has been mentioned yet, but there's a new attack that allows recovery of data from SSL encrypted sessions that are compressed via gzip.

Here's a surprisingly readable paper on the attack.

The current mitigation involves disabling gzip compression on your server or framework.

See! All those people wasting time on "security" are suckers!! My boss is totally right to rely on our cheap, easy to implement "hope nobody every tries anything on one of our servers" strategy. :colbert:

Lumpy fucked around with this message at 03:13 on Aug 12, 2013

Sudden Infant Def Syndrome
Oct 2, 2004

kedo posted:

Using open graph meta tags could help it scrape correctly on the first go around. And if you add those it might help old entries, but I'm not sure about that. I doubt Facebook is doing any retroactive scraping... there's just no point.

I have all the tags in place. It works just fine on the second go around.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
Debugging Javascript in Firefox just got a whole lot better:

https://hacks.mozilla.org/2013/08/new-features-of-firefox-developer-tools-episode-25/

You will be able to control which JS files/libraries are "black boxed". If the debugger lands inside a file that you have marked as a black box, then the stack trace will continue to unwind until you are no longer in a black box file. Never again will I land in some arcane minified jQuery library during debug sessions.

Lightning Zwei
Aug 7, 2013
So I'm starting out learning web development with asp.net/C# and I want to build a website to actually practice as I go.

It's all a bit overwhelming at first and I'm suffering from information overload. I understand Object-Oriented Programming and I'm currently taking Java II and C++ at school simultaneously. My problem is that I don't even know where to start with what I want to do with my website (I don't even know what to search for in google to get the correct tutorials).

I've already done the series of tutorials for getting started with asp.net on the asp.net website but I haven't quite figured out where to go next.

Here's what I want to do:

Create a website with a landing page (easy enough - already finished this part).
Have sign up and log-in form on the landing page.
Have users sign up but require their registration to be manually confirmed by the admin before they can log in.
Have users log in and see their specific "profile" page with info that belongs to only their account.
Have two different types of users, one type of user will log in to read info, the other type of user will log in to publish/upload info.

My problem moving forward is that I simply don't know where to stat with dealing with user profiles and log-in/registration.
I understand that what I'm trying to accomplish is much more complicated than it sounds but I sincerely would like to learn how to implement this system myself without using a CMS.

What is the design logic and can I do this using only asp.net and jQuery? Does anyone know of any tutorials specific to what I'm trying to accomplish?

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
Sounds like you need to also start working with a database if you're gonna be storing/editing user information. Microsoft's recommendation is to use Entity Framework to make dealing with your database easier. Let me ask you, though, are you using ASP.NET or ASP.NET MVC?

If you're trying to learn the basics of web dev, the ASP.NET MVC tutorials are generally more up-to-date than vanilla ASP.NET and they will usually cover some basics of Entity Framework.

Mrs. Wynand
Nov 23, 2002

DLT 4EVA
How set are you on starting web-development with C#?

Don't get me wrong, it is by no means a bad web environment, but as "my first web project"... it is no surprise you're getting overwhelmed. One of the endemic problems of Microsoft technology stacks is that they are all very high-architecture projects that are designed to be monolithic, but end up being replaced before they are even fully finished by Microsoft itself, so the end result is a very splintered environment, especially when it comes to frameworks and core libraries. Take ORM for example: used to be LINQ was the poo poo now Entity Relations is the new thing except there are like 3 flavours of that and I think most people still use LINQ anyway.

There is also the problem of .NET being a very very loving huge framework used for all sorts of crap and as you already found out, filtering for just the web bits is not always trivial.

It's not insurmountable, but you really don't need all that junk if you are just starting out.

Django (Python) and Rails (Ruby) are both web frameworks, also object oriented and have a lot less overhead you need to be familiar with. They have very straight-forward documentation and don't assume you have a MSSQL™ 2013 ran by a Certified Microsoft SQL Engineer™ to build your hello world app. Plenty of tutorials out there that will cover everything, including relevant jQuery bits and pieces.

Even PHP would be fine to get your bearings. Sure it encourages some god-awful practices, but it's a very very quick way of learning the plumbing: HTTP basics (headers, request/response formats, status codes...), persistence, authentication etc. All that will carry over to back to .NET and you'll be in a much position of at least knowing what to dig for.

kedo
Nov 27, 2007

Any particular reason why you're using asp.net?

e: /\ /\

e2: Also, tbh all of the best web development tools these days are on Ruby/PHP/Python and they're also mostly free, while asp.net crap tends to cost $$$ in my experience.

kedo fucked around with this message at 16:39 on Aug 15, 2013

Adbot
ADBOT LOVES YOU

SlightlyMadman
Jan 14, 2005

My boss is asking me to write up a comparison of Google Maps and MapQuest for a client who currently uses MapQuest but is considering switching. I've of course tried googling but the comparisons are mostly based on UI and usability, and for the most part are several years old (which makes sense, considering most sites made the switch back then already). Does anybody know of a good resource out there for a feature comparison from a development standpoint? I'd like to be able to point out things that they can do with Google Maps that would be expensive or impossible with MapQuest.

SlightlyMadman fucked around with this message at 17:48 on Aug 15, 2013

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply