« first day (417 days earlier)      last day (4537 days later) » 

3:00 PM
I don't know what the problem could be then
 
jsfiddle.net/AMjk2/1 if you want to have a last look
I think I need to find another way to "include" script if I want it to be launched
 
Hmm
I don't know what you mean by that
 
uhm
 
Because when you're putting this script in the textarea, as I'd said earlier, you aren't including it
 
mmm
doesn't <script src=""> recall the content of the file linked?
 
3:07 PM
5 hours ago, by tereško
tell us what you want to do , instead of how
you still haven answered to this line , @BeNdErR
 
@BeNdErR Yeah, but you never execute the <script src="">
 
@Amaan but I don't want it to execute while it's inserted into the textarea
it has to run when the content of the textarea is displayed for example in a new page
 
You want it executed later when it's echo-ed in PHP, right?
 
yep
 
Hmm
 
3:11 PM
@tereško sorry, I didn't answer because Aaman took me under his wing
maybe it wasn't his best decision mbhuahua
btw @Amaan if i remove the outer script tag, the content of inject.js is copied in the right way in each textarea he encounter, but the outer script is no longer launched
(due to the removal of outer script tag)
 
This is some annoying shit
 
for sure!
 
YOU DIDN'T ESCAPE THE /!
 
in <script> tag?
 
Yes!
In injection
The last script tag
 
3:18 PM
i'mma try!
 
And if it works, I'mma kill you!
 
auhahuahu 1 sec
not working :\
 
LIES!
 
LOL you just changed the last </script> to <\/script> in injection var right?
 
Yeah
 
3:24 PM
I did it too + some changes where the opening <script> was
not working :(
 
Hmm :/
 
@sebas is FF 3.3 really a concern? You know we're on FF 8 right?
 
@Amaan on fiddle works also with the latest fix, but not on my page..
is now a matter of honor
 
Then forget this project and do something worthwhile!
 
is now a matter of honor
 
3:28 PM
God. Why do people have to bend to the will of the nitwit. client: HURR DURR! Y THIS NO WORK IN NS4 ... me: STFU
 
@BeNdErR ಥ ಥ
 
2
A: JavaScript: Passing parameters in to an indirect, anonymous function

Phil KleinMaybe I'm not understanding your question correctly, but it seems like you want to assign a function to pokerObjects.getPokerCard which would allow you to later call pokerObjects.getPokerCard(f, s) which returns the object with getFace, getSuit, and to_s. pokerObjects.getPokerCard = function(f, ...

Let's all bash on the "private state" monkeys and tell them to stop doing it wrong
@rlemon NS4 ? srs
 
0
A: Class vs. ID - Readability

IncognitoHow to stop obliterating semantic HTML. Most people learn HTML from looking at source code and of HTML and tinkering with it, learning how <tag>foo</tag> looks and running along with it. They don't really gain a deep understand of it, but they go on to do things that require a deep u...

 
you think I did? maahuaha
 
@BeNdErR Steve Jobs didn't code.
You may want to try starting from scratch. It helps, sometimes
 
3:33 PM
crappy edit
 
@BeNdErR steve jobs was successful.
 
Lmao
 
btw take that as a not funny joke.
 
lol
I'm screwed
 
3:34 PM
sadtrombone.mp3
 
btw I meant the other Steve Jobs, the one who coded, and coded a lot.
 
@Incognito Upvoted for the tl;dr :P
But seriously, well done. Why would you put so much effort into an answer? You must have something really important that you didn't want to do.
 
@Incognito getAllEmentsByName -> getAllElementsByTagName
 
@Raynos I'm not specific to any language, my care factor is 0.
Actually I should care, one sec.
 
@Incognito Also document.GetElementByID("whatever")
 
3:36 PM
It's a DOM API typo
 
@Raynos Yeah that's why I care, the API in JS isn't specific to JS.
so I'm editing it.
 
Its specific to java ¬_¬
thats why the dom api looks and feels like java
 
any nyromodal users here?
 
do you mean camelCase
 
nyroModal*
 
3:39 PM
@Esailija I mean verbose as fuck
 
@Raynos I know but the DOM API describes how they're named so it's reasonable to expect it named that way in any language.
 
well it's not as verbose as true java :D
 
I know,
it's just ugh other platforms, rage
 
Element.byId() would be cool
just speaks natural language
or Fragment.fromHTML() which would parse html and return fragment that you can append
 
pfft.... $ can do all of that and clean your car. get with the program.
 
3:44 PM
the $ is root of all evil, it's why some people might think of jQuery as a separate language or something, it just doesn't look right to a newbie :D
it is understood as a magical car cleaner
 
It's caused by the high accessibility and expressive power of JS. The design goal of jQuery was to be even more expressive, thus it's very popular.
It's a success in the sense that it lets people who don't know what they're doing, do things.
 
It's a failure if you look at in in terms of professional quality software.
 
@Incognito have you seen gist.github.com/1417030 ?
 
actually jQuery has a method called clean
 
3:47 PM
@Raynos Yes, I have it starred.
 
now I just need to select my car and call it on that
and make a question on SO if it doesn't work
 
Ah ok
 
it can't be worse than 10 downvotes
 
One last thing before I head out, wanted to share an amazing project that has the potential to really revolutionize genetics and is being built on web technology (ie, a bio lab in the browser)
@Synbiota, Earth
a bio-lab in every browser
29 tweets, 39 followers, following 27 users
They're in the mozilla accelerator.
Cheers everyone!
 
cheers
 
4:06 PM
Hi ,
Anyone use browser lab ?
 
nop
 
HTML5 shivs don't seem to work on it , it that because the screenshot doesn't support javascript?
Do you normally need to shiv with IE8?
 
i have question about <noscript> tag, is there a tag that represents the opposite regarding html
 
yes its called <script>
 
i can do this with <noscript>:
<noscript>
<p> No Scripts Enabled. </p>
</noscript>
i want to do something similar with scripts e.g:
<script>
<p> Scripts Enabled. </p>
</script> (this doesn't work)
 
4:17 PM
You cant
thats not how it works
<p> Scripts Enabled </p>
why do you need HTML thats only for scripts enabled?
 
making a form, one that has javascript and one that is for those without javascript
 
then your doing it wrong
you dont serve different content for javascript users
you enhance content you server to everyone with javascript
and server an extra sign to noscript users giving a warning
Progressive enhancement is a strategy for web design that emphasizes accessibility, semantic HTML markup, and external stylesheet and scripting technologies. Progressive enhancement uses web technologies in a layered fashion that allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing those with better bandwidth, more advanced browser software or more experience an enhanced version of the page. History "Progressive Enhancement" was coined by Steven Champeon of [http://www.hesketh.com hesketh.com] in a ser...
 
warning... as in "gtfo of my site" :D
 
4:33 PM
is it possible to do a selector like this: $("#id1 #id2")
like if an element is in multiple ids
 
what, like select id1 and id2 both?
$("#id1, #id2")
 
like this: <div id = "rt"> <div id = "test"> <p> l </p> </div> </div>
 
what do you wanna select there
 
now let's say we have another <div id = "test"> outside
is there a way to select the first one in rt
 
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
 
4:37 PM
id, by definition, is unique
identifier
 
If you have multiple elements with the same id im going to fucking execute you in cold blood
 
get it?
 
ok so <input type="reset" value="reset form" /> will reset the form the it's default states... how would I go about just clearing the form? (I know how to in js, trying to write as little js as possible)
 
you never have elements with same id
because that would defeat the whole purpose of id, identifier whatever
 
@rlemon why do you want the form cleared?
 
4:38 PM
filter options.
three buttons [apply] [clear] [reset]
it's not live, so they make sense.
[reset] really offers nothing besides showing you want filter options are in place to give you your current view
Types for input.
button
checkbox
color
date
datetime
datetime-local
email
file
hidden
image
month
number
password
radio
range
reset
search
submit
tel
text
time
url
week
I got the list from w3-ftards so I don't really trust it.
is my best option to do something like this <input type="button" value="Clear" onclick="clearForm()" />
 
Again why do you need to clear the form
If you write onclick=... again ill shoot you
3
I dont see any use case for clearing the form
 
user1385191
form resets are nearly always unwanted
 
user1385191
and they're miles better than "clearing" a form
 
my use case - i have like 15 filter options for a inventory list. the user creates a specific filter for an order or product they are working with (no ability to save filters yet) and wants to return to the default view (they can either click the inventory link and be taken back to the main page / default view, or I can give them the ability to clear the form and submit an empty view)
ahh, fuck it. [apply] [remove filters]
 
user1385191
need a visual example
 
4:53 PM
hrmm. it's hard to find an example that someone has already made.
i'm dropping the clear anyways. more trouble than it's worth.
i'll give two buttons - one submits the form and actually uses it's data - the other will just submit the form with no data (basically reload the page with no GET values)
 
NOOBS Y U NOOB
 
@Esailija see my comment
 
so also uses cdn.static.net :)
have you read the post by jeff atwood
 
user1385191
a HEAD request for an image? really?
 
4:57 PM
they boosted SO load time by 350% in finland or so \o/
 
user1385191
the image is the response body...
 
user1385191
> The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
 
yeah the request is just to check if the image exists
after that you make an actual image and request again if it exists
 
user1385191
using HEAD is only for responses without a body
 
yea but the 404 status code is enough which HEAD request is enough for
 
user1385191
4:59 PM
a 404 has a response body too
 
but the ajax request purpose is just to check the status code, not body
the problem is that it doesn't work if the domain is not the same
 
user1385191
I'll need to read the HTTP spec some more
 
you are correct but he just needs the status code
if it's 404, he will not try to load the image
 
user1385191
why not a GET with Accept: image/png or something similar?
 
because you wouldn't do anything with the response body anyway
 
5:07 PM
what a tool.
 
sigh
I don't know a single firm that would say no to building an app to be scalable from beginning
even if they don't have visitors at the moment, you don't want an app that cannot be scaled without rewriting the whole thing
 
i'm giving up - i think the point was made .
 
0
Q: How can I config sublime text excute javascript with Mozilla Rhino

eurekaI want to excute javascript file without a browser. I found Mozila Rhino, but I wonder that how can I config sublime text or another text editor run my .js file directly (i.e without run command line).

 
Anyone here?
 
yeap cannot really make the horse drink the water:P
 
5:16 PM
@Parek > look to the right. tonnes of people here
oop. one just left.
 
hahaha
Im new to this site and aren't that familar with the User interface hehe
 
SO has too much logo based navigation
 
Maybe, but it's kinda cool. Do you guys master javascript?
 
It masters me.
 
Haha. Could you guys please check out my question? Or is it legal to refer to questions in the chat?
 
5:20 PM
@Parek before we go any further - when you say "master javascript" do you really mean "write JQuery" because if you do....
 
user1385191
no, he means this:
 
"Where: Online! Learn JavaScript in your Pyjamas"
haha lmao
 
2
Q: Inserting data in Database from Google Maps using asp.NET C#

ParekIm currently developing a project using Google Maps. The whole function that im stucked in is going to let the user create a track on google maps. The user will be able to select the start and finish position on the track using 2 different markers, each of those markers got an radius which also i...

that question?
 
user1385191
"Just $529!"
 
5:21 PM
I already got 2 answers but i don't really understand them. :p
 
spend a few months writing code without jQuery and you will inherently understand js better.
 
user1385191
s/js/the DOM
 
pfft, yea yea
semantics. he (likely) won't understand the difference anyways.
 
@rlemon is the bate master
 
hell yea - 25 year perfecting those techniques.
 
user1385191
5:25 PM
"bait"
 
@rlemon Did you read my question?
 
lol - i took that somewhere else.
@Parek maybe the real question is "Why are you not using MVC"
seems your problem would be solved.
/trolling - yea I'm going for lunch sorry no time to look.
 
@rlemon Maybe i should use MVC.
 
@Parek, your question asks how to run c# code from javascript?
 
@Esailija Yes!
 
5:31 PM
 
Could you bring me a sample code?
 
@Parek There is no way to run c# code from javascript
You have three things, a server, a client and a http protocol
the server has c#
 
@Raynos , refer to my wiki link instead of smashing your head to a brick wall
 
the client has js
and the http protocol links the two
 
Oh i see.. But how am i going to use that js context menu for c# use then? Maybe it's not possible.. If it would be possbile to create that menu using c# the problem would be solved but....
 
5:35 PM
heh the new guy here asks me
 
@Parek, just read the first paragraph in the link
 
"hey have you done anything with this new html5?"
 
it's all you need to know :D
you will be enlightened
 
/me is behind on his wiki readings
 
all your c# code does from the client point of view is building a string and sending it... you could call this the message from the server to the client
 
5:38 PM
if I have two submit buttons, how can I tell which was pressed??
form.onsubmit = function(event) {
  // if one button is pressed do validation and submit the form
  // if other button is pressed do something else then submit the form.
};
 
event.target or event.srcElement for the grandpa ie
would that work?
 
<input type="submit" name="notsubmit" value="submit" />
<input type="submit" name="notsubmit2" value="submit2" />
@Esailija both returning the Form element itself.
 
oh well
 
user1385191
no no no
 
user1385191
never name a form element "submit"
 
my god matt ITS AN EXAMPLE
happy?
 
@rlemon, console log the event object and view the properties
in case there is something that might be of use
 
@rlemon just remember impressionable people come here
 
user1385191
it's one of the most maddening DOM "bugs"
 
user1385191
usually costs at least an hour to dig up
 
5:41 PM
lol
 
user1385191
(from a layman's perspective)
 
@MattMcDonald I understand your grief with it. I always get annoyed when i'm trying to type up a quick example so i use hurr durr names and functions thinking it will be known that is what i'm doing.. but people still correct me on it.
 
@rlemon Y U TWO SUBMIT BUTTONS
 
@Raynos BECAUSE FORM HAS TWO SUBMISSION METHODS DEPENDING ON USER WANTS
 
@rlemon NO IT DOES NOT. BOTH SUBMIT BUTTONS SUBMIT THE FORM WITHOUT JAVASCRIPT
ONE SHOULD BE SUBMIT FOR NO JAVASCRIPT ONE SHOULD BE BUTTON FOR JAVASCRIPT
Y U NO PROGRESSIVE ENHANCEMENT
 
5:44 PM
both require javascript.
 
@RAYNOS Y U CAPSLOCK PARTY
 
i'm trying to be lazy and reuse the form.onsubmit
 
@rlemon so your form doesnt work without javascript
 
ok seems the event object is useless =) so you need the unfortunate hack of binding clicks or similar
 
How the hell can you break a form without javascript
 
5:44 PM
nope
well it will, but the results wont work.
 
useless :D
 
@Esailija i've already discovered that
 
ah ok nvm :)
 
@Raynos it's internal application - js is required, <IE9 is not supported.
actually, js is not required. - I found it to be less code to transform some of the data on the client side before submission rather than on the server. (normally I would never do this, however for the purposes of this application it is ok)
but i will likely have to do things right because these little 'hacks' are always more trouble than they appear to be from the start.
 
@rlemon seriously, forms. Bloody forms
dont put js reuqirement on forms
@rlemon oh its an internal app, its ok to hack to pieces. Surely our internal users wont abuse it
Your making the big mistake of trusting users
 
user1385191
5:50 PM
forms are probably the most robust feature of HTML
 
As made apparent by Zend Framework to abstract it in PHP and accomplished a steaming pile of shit
 
$abstraction->forms->formElement->getHTML();
// "<form></form>" congrats
 
hi all
i just wanted to ask, I have a php page that has emebede flash element in it. I am creating new window with js and loading the php page with the player in the new window. Is it possible to make the new window transparent, i.e to see only the embeded flash element?
 
Trolls, trolls everywhere
 
what is a transparent window yet has visible content
can you make a picture with paint
 
6:02 PM
better yet: screenshot from where you have seen such behavior
 
user1385191
the embeddable flash element can be transparent
 
user1385191
but no, the window cannot
 
@Esailija I made mistake I mean not really transparent I mean is it possible to hide the window frame so that we see only the flash content?
 
user1385191
define "frame"
 
the frame of the wondow itself, not html frame
 
6:05 PM
I suppose you cannot do that, how would one close the window then
 
for example I create new window with js and set some parameter to it
 
user1385191
what you just gave was a recursive definition
 
user1385191
"define foo" "bar's foo"
 
???
 
user1385191
6:06 PM
you're using the word to be defined to define it
 
@Esailija you are right.
 
why don't you just create a popup in the page
like a lightbox or whatever it is called
why is it called lightbox anyway
 
user1385191
blech, modals suck
 
user1385191
they're more hassle than they're worth
 
user1385191
I'd rather close a window than have to dig through the DOM to delete the modal
 
6:08 PM
"Dig through"? Store a reference when you open the thing in the first place.
 
well the requirements are these, I have a table of records and when I press on a single row, new window opens with flash element which loads data from that record.
 
user1385191
no, I mean on other sites
 
user1385191
for example, when served with a modal ad page
 
user1385191
with (ugh) a timer
 
@Vlad , must it be a window ?
 
6:09 PM
@Esailija so lightbox creates popup in the same window?
@tereško I cannot think of other solution
 
I don't know what lightbox really is, what I mean you just create a div that will stand out because you dim the background
 
user1385191
a visual example would be nice
 
you can also do it with iframe
 
@Esailija lightbox is an ancient jquery plugin which does what you described
 
yes but i have to have ability to open several windows with that flash element at once
 
6:11 PM
sorry of triple-highlight
 
user1385191
it actually started out as POJS (lightbox)
 
np
 
user1385191
lightbox is a silly fad that really isn't necessary
 
brb guys
 
then open several windows and tell your boss you can't hide the window frame
you can hide lots of stuff from it but not all
how else would I close those livejasmin popups
 
user1385191
6:13 PM
lol
 
user1385191
opera handles windows nicely (as tabs)
 
@Esailija yes my boss exagerates :)
 
6:29 PM
Hello again! Is anyone familar with Google Maps in Javascript?
 
@Parek , dont ask to ask
 
What do you actually mean?
 
@Parek don't ask a question to know if you should ask a question
 
Hi, is there a js library that can generate a color pallet from an image. Like pallet on this page designshack.net/design/zigzag-theme
 
yes. But I cant remember what its called.
 
6:44 PM
@Loktar yes that is what I need, though it seems that it is just to generate the palette there. can I take that functionality in my site
 
ohh.. you want to make something for your site to gen palettes..
I have no clue on that side of things. Knowing me I would use js/canvas and recreate the wheel.. because thats how I roll.
 
Does anyone have a good sample of Driver directions with Radius at orgin and destination point for Google Maps?
 
:) thanks
 
How do you send vars to c# code behind from Javascript?
 
@Parek, for the fourth time learn http://en.wikipedia.org/wiki/Http#Technical_overview
you cannot do it =D
 
6:54 PM
Other than your brain, are there any (good) tools for optimizing / analyzing javascript execution? I'm suspecting memory leeks, and/or efficiency issues.
Tried the Chrome Dev tools, but I have no idea how to sift through a heap snapshot and/or cpu profiling report..
 
Hahaha. But i think you are miss understanding me. Cause in my case im using the Google Map API v3 that is based on Javascripts. And when the user places a marker on the map i want the script to send those positions( lon, lat) to the code behind, where im going to insert them into an database.
 
yes you can send a message to the server via ajax and the server can handle that message but you cannot directly set any #c variables from javascript
 
Okey. Do you have any sample code of that ajax thing you talked about?
 
@Esailija this is why we hate ASP.NET
people need to learn what HTTP is and how it works
 
6:56 PM
@Raynos it's c# but yeah =)
 
user1385191
HTTP is so cool
 
@Parek, sample code in javascript or c#.. what are you having trouble with
I cannot help you with c# and this is javascript room anyway =)
 
var xhr = new XMLHttpRequest();
xhr.open("POST", "markers");
xhr.send(markerData);
@Parek your example
 
@Parek try jquery ajax
 
ASP.NET attempts to imitate state, in a horrible way
 
6:58 PM
@jondavidjohn, you need to profile isolated areas of code not your whole app
 
@Vlad jQuery ajax is a bloated piece of shit o/
 
I mean
if you just take a heap screenshot of the whole app
it will not be very helpful
 
@Esailija cool, how do I go about that?
 
@Raynos it worked for me
btw i work with php
 
well you'd need to have some experience/brain to see what code could not perform well and isolate it and test
 

« first day (417 days earlier)      last day (4537 days later) »