« first day (863 days earlier)      last day (4103 days later) » 

5:00 PM
well, I know I can place <script> anywhere in a html environment, or load an external .js page. but the only easy way my amateur brain could think about doing this was to put something like a html form within, but I don't think that's viable?
else {
alert('Your done');
}
(a small html form within the alert pop-up)
 
ok, now we're establishing levels of capacity and competence. (please don't take that a bad way)
 
since it was a html form that previously my php script was linked up to
 
@sn0wy what was wrong with the previous HTML form?
Keep this in mind:
 
I don't take offence, I'm rather aware I have a lot to learn and grasp still
 
You need to learn how to be lazy, but not too lazy. (this is my motto for new developers)
What that means is "don't try and re-invent the wheel".
If an HTML form does what you need, keep using it. You can add a few decorations around the outside to make things nicer, or you can hijack the form's submit to prevent it refreshing the page and sending things via AJAX. But don't try and do lots of JS when HTML would serve your needs.
I generally try and make things work with as much HTML as reasonable for the problem at hand, then add my JS to achieve the ends I need.
(unless I'm writing an SPA, in which case I do things mildly differently, but that's because I can do things with JS most can't understand, hence my having a job as a front-end dev)
 
5:06 PM
^ That. Don't use all kinds of strange techniques because you can.
Keep it simple.
 
I'm still here, jsut trying to get my words out properly.
 
@sn0wy no worries.
 
@jcolebrand OMG did you invent?
 
I want users to come to my site and rather than sit and think of a message to send to me and will out a form, I would rather them click some pre-made q/a, then for a pop-up box to come, review what they have put, slap in their e-mail address and "jobs a gud'n"
 
@BenjaminGruenbaum possibly but there's nothing new under the sun
@sn0wy So, you've lost me on something
 
5:08 PM
I'm thinking more about keeping people on my website, not having them think too much and run-away whilst doing so to another site
 
What's their motivation to send you a message in the first place?
 
@jcolebrand That was a joke :P It's a pretty known saying codinghorror.com/blog/2005/08/…
 
Haha
 
ahhh
 
Their motivation will be spread across the rest of the site with galleries, marketing, statements and such
it is all work in progress, jcole
 
5:10 PM
You don't have to defend yourself to me
I'm trying to understand your site and your workflow so I can help with your problem.
 
Sorry
 
But, I've not understood what the motivation is for them to choose a dropdown option or something.
 
I just feel like a mouse entering a lion's den and asking for help ;)
For purchase of an item or some such
 
@sn0wy you're still being too vague. Give us a screenshot of the intended usage done up in HTML.
Just a screenshot
@sn0wy meh, that'll pass the more you use chat.
 
@jcolebrand I'm really surprised at how many people get shocked when you tell them that their jQuery train of thought does not work well beyond a certain scale. I find it hard to explain
 
5:14 PM
jQuery is GREAT when you want to work with DOM elements and have effects applied consistently across browsers.
 
jQuery is often overused as well
 
jQuery is good when you want to make a web page dynamic. It's like client side php.
jQuery == client side php
 
jQuery sucks when you want to build entire applications.
 
You know what you're doing is wrong, but it's just so easy to use you allow yourself to be lazy
 
It's almost like someone should've designed a language that combines markup and intent, and maybe done it in an XML-ish structure so it could be modified easily.
 
5:16 PM
Is angularJS a good way to build apps?
 
@BenjaminGruenbaum hence "not too lazy" ;-)
@JanDvorak that is a loaded question
 
20 hours ago, by Benjamin Gruenbaum
107
A: How do I "think in AngularJS" if I have a jQuery background?

Josh David MillerThere have already been a couple of great answers! But I'll offer my perspective too, while trying to limit overlap. 1. Don't Design, Then Mark Up! In jQuery, you design a page, and then you make it dynamic. This is because jQuery was designed for augmentation and has grown incredibly from that...

 
@jcolebrand or did you mean an ss of the actual code?
 
You're * lol
 
snowy: The page you are trying to browse to is categorized as "Pornography"
 
5:18 PM
Thanks Benjamin ;)
 
@kush c'mon, it's just a drilling machine that only looks like a penis
 
@sn0wy this is what I meant.
 
Tell that to Microsoft ForeFront. o.O
 
Now, let me ask a specific question
 
@jcolebrand the red (on the bottom right) simply represents the questions and the green will be answers to click
 
5:19 PM
What is their motivation to send you a message.
 
can someone pls help me with about 50 lines of code in private?
 
!!/google microsoft forefront
 
@C-TZ why do you want privacy?
 
wikipedia is best
Microsoft Forefront is a family of line-of-business security software by Microsoft Corporation. Microsoft Forefront products are designed to help protect computer networks, network servers (such as Microsoft Exchange Server and Microsoft SharePoint Server) and individual devices. Components Forefront includes the following products: ;Forefront Online Protection for Exchange :A software as a service version of Forefront Protect for Exchange Server: Instead of installing a security program on the server, the customer re-routes its email traffic to the Microsoft online service before rec...
 
5:20 PM
kthx:)
 
jan because then we can concentrate on the problem and nobody will talk through it. Seems legit right?
 
@C-TZ you fundamentally misunderstand how chat works
Also, you misunderstand how "a large group of experts helping you at once" works
 
Count me out from your group of javascript experts. I am a noob here.
 
I just need some help with a couple of lines of code, it's not an expert problem I have, just something I'm missing but if you both can't miss the time maybe someone else can
 
@kush then you wouldn't give him feedback on his code ;-)
@C-TZ it's not that we can't/won't help you.
It's that there's no benefit to doing so "in private"
If you want help, ask the room.
 
5:22 PM
!!> var str="";for(var i=0;i<50;i++){str+="code in private\n";}str;
 
I'd like to see what feedback others give so I can learn. :)
 
@BenjaminGruenbaum "ReferenceError: str is not defined"
 
ok here we go
 
@BenjaminGruenbaum "code in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in private\ncode in (snip)
 
there's this script
 
5:22 PM
@C-TZ ^
 
Also, is there a chance your problem is not "too localised" and it should be shared with the future generations?
 
which is invoked by this piece of code
if (containsFile) {
$("#"+id).iframePostForm ({
json : true,
post : function () {
var message;
if (!$('.message').length) {
$('#feestje').after('<div class="message" style="display:none; padding:10px; text-align:center" />');
}
if ($('input[type=file]').val().length) {
$('.message')
.html('Uploading file&hellip;')
.css({
color : '#006100',
background : '#c6efce',
border : '2px solid #006100'
})
.slideDown();
} else {
$('.message')
.html('Please select an image for uploading.')
.css({
color : '#9c0006',
and I don't understand the correlation between them, so I'm unable to use it.
 
I'm looking into doing a little canvas experiments for a primitive game in JS (Maybe something like Asteroids). Could anyone bring me up to speed on some techniques, guidelines, frameworks, and what not?
 
@C-TZ fiddle it, it's too long, also when you paste code press Control+K to format it
 
!!/tell c-tz format
 
5:24 PM
@c-tz Format your code - hit Ctrl+K before sending and see the faq
 
@jcolebrand Not entirely sure why that matters, it's embarrassing in this scenario I must admit
 
I love the bot
 
I don't know how it works so I don't know how to fiddle it.
 
if (containsFile) {
    $("#" + id).iframePostForm({
        json: true,
        post: function () {
            var message;
            if (!$('.message').length) {
                $('#feestje').after('<div class="message" style="display:none; padding:10px; text-align:center" />');
            }
            if ($('input[type=file]').val().length) {
                $('.message')
                    .html('Uploading file&hellip;')
                    .css({
                    color: '#006100',
 
it's from this site, maybe that will help, there's a working "example"
 
5:25 PM
@sn0wy because if we understand how it's supposed to work we can give better advice. Right now I'm going to tell you to replace the alert with a bit of js that removes the dom and replaces it with a thank you message.
 
I don't understand..
 
@C-TZ ok, we've got code. What's the specific question?
 
@RoelvanUden This:
$g html5 canvas tutorial
 
it's supposed to make fileupload possible with jquery using iframes. I don't know how to get it working, basicaly I don't have enough knowledge to make it work so I need a hand which guides me in the right direction
 
@jcolebrand I want to try starting out at building websites
 
5:27 PM
@C-TZ why not use the fileupload plugin?
 
@KendallFrey Well yeah, I can google. I'm more looking for the guidelines, what is good, what isn't, what is popular in frameworks and whatnot, etc.
 
@jcolebrand their motive will be if they decide they think I'm capable, they can either contact me or just fill out this quick questionnaire
 
jan thnx for the info but I'd like to use this piece of code, because I've looked at the fileupload plugin and I don't understand it. The code I posted I feel like I can understand
 
@RoelvanUden I'm on a bus, but I saw a really good post on the game development stack exchange (arcade was it called?)
 
jQuery Ajax Upload API;

iframeID : 'iframe-post-form'
The iframe's ID & name.
json : false
Treat the server response as a JSON object, apply jquery.and return the parse JSON object (new in version 1.1).
post : function ()
When the form has been submitted.
Returning false in this call back function will abort the submission of the form (new in version 1.1).
complete : function (response)
After everything has been submitted and completed.
@sn0wy You are putting the cart before the horse. Learn how to build webpages and websites. Learn how to do JS/HTML/CSS. When you are ready to build sites for other people, you'll know how to do what you're asking about.
 
5:29 PM
jcolebrand, I don't understand where it's getting it's iframeid from. the alert just keeps showing "#iframe-post-form"
 
Seriously. Please understand me. You need to focus on learning how to do things before you start trying to get people to give you money to do it.
@C-TZ have you lookd at the source of that page?
 
@jcol
@jcolbrand yes
 
@jcolebrand I do understand you, but that's also why I'm taking my time and trying to do things I don't know about on my own website before I even let this go live
 
it's kinda confusing hehe, it's allot.
and some of it is loaded dynamicaly
it uses anchor id, but when I use it in my project it's just not doing anything
 
@sn0wy What you're trying to do is a valid learning exercise, but you're also suggesting that you want to use it to tell people you can do this professionally. It's a catch-22.
Let me ask this:
 
5:33 PM
I've changed the id to "feestje", and where the example page neetly loads the processing and result page, there's not much going on on my page, it'snot even sending a httprequest
 
Have you sat down and written out what you expect it to do, step by step? Not as a programmer, but as a user interacting with it?
@C-TZ did you see the last DOM element in the body on that page?
 
which element u refering to?
 
the iframe
 
@jcolebrand there was an original draft to the site yes, and as I progressed through, the plans changed, developing nicer/better ideas/possibilities
 
it doesn't contain an iframe?
 
5:34 PM
@sn0wy you and I got separated
You should be focused on that one feature
One feature at a time. Write down everything it's supposed to do.
That's how software development works. It's called "spec". You have to have a specification for a thing before you write code.
 
@jcolebrand but this implies no room for improvisation or improvement? The original site specs had already been established. I'm now trying to progress both my site and my skills before release
 
@sn0wy no. You write a feature to a spec. Then when the feature is done, you can rewrite the spec then, and re-work the feature.
 
jcolebrand thats what the script loads during execution, but it's not on the initial html of the page
 
If you modify the spec while the development is ongoing it's called "scope creep" and that's how projects die.
 
I'd like to know how to get the script to kickstart
 
5:37 PM
@C-TZ oooh >.<
 
somehow it transfers some stuff to it which then is used to upload the file
options = $.extend({}, $.fn.iframePostForm.defaults, options);
this is one of the lines I don't understand
 
Yeah, I would just rework my workflow.
 
somehow it gets 'options'
 
@C-TZ ok, so let's discuss that
 
where does it get it from??
ok
 
5:40 PM
@jcolebrand well, I will not debate with you further since I do not mean to show disrespect. Thank you for conversing with me anyway :)
 
I assume extend is a jquery function
"Description: Merge the contents of two or more objects together into the first object."
okkkk breakthrough, I now understand that the 4 lines of code at the bottom represent the defaults
so #iframe-post-form is default when no options.iframeid is available
or something like that
 
@sn0wy I mean, you're asking how to do something that's above your skill-level so you can earn money doing that. That's what you've said.
I can't enable that behavior, it's anti-professional.
@C-TZ yes
Sorry, I had a phone call
 
np
 
@C-TZ yes, you're on the right track here.
 
@jcolebrand But if I don't ask for help in how to do things, then I will not learn?
 
5:44 PM
so how do I manually SET options.iframeID?
 
@sn0wy this is true. But you have to start at square one.
Write a spec.
 
where does it even load the iframe?
 
@C-TZ $(selector).iframePostForm({ iframeID: 'selector', json: true, post: function(){}, complete: function() {} });
Notice that the two function declarations have been reduced to function() {} for the sake of discussion.
 
I have returned
got a knee brace on now
iz helping a little
 
@rlemon maybe you can help @sn0wy with his question about how to make an external file interact with his base page and choose a random question that captures their email information and PHP sends an email.
 
5:47 PM
@jcolebrand then maybe you can leave me with some advice I didn't expect. My parting question now is, what would you call this collection of steps (squares)? so I can take perhaps a deeper look into documenting more professionally my progress/work
(where e.g writing a spec is square one)
 
checkpoint?
 
maybe
 
no I mean like... if index is page one, the thing I'm looking for is 'book'
 
hold on need a smoke && adjust my brace
 
Hmm, never was great with putting myself across
 
5:49 PM
@jcolebrand ok I kinda get it. So for this one iframe the id doesn't really matter
@jcolebrand I've found out the script keeps choking on this line:
status = options.post.apply(this);
 
1) When the user visits the page, I want to show a text on the page that invites them to ask me for more information.
2) The user can click this text to be presented with a form in a javascript popup.
3) When the form loads it presents one of a random questions.
4) When they complete the form and press submit, the information is sent to a PHP page.
5) The PHP page sends an email to me.
6) When it completes they get a response on the webpage "done"
 
in this few lines

element.submit(function () {
alert('#' + options.iframeID);
// If status is false then abort.
status = options.post.apply(this);
if (status === false) {
return status;
}
 
@sn0wy this is a spec for your feature
 
the alert always pops but when I put the alert after if (status ... it never shows
 
@C-TZ the first selector in my example is for the form specifically that's being submitted.
 
5:50 PM
ooooh really?
 
lemme revisit the example
 
so the iframe id is the same as the form id which is submitted?
or, needs to be the same??
why is that? don't understand
ok
 
$('#formWrapper form').iframePostForm({ iframeID: 'uniqueFrameID', json: true, post: function(){}, complete: function() {} });
 
trying that now, lets see
 
notice that #formwrapper form can be any selector that gets you to the form. It could be form#myForm.SuperFormClass or body form or form
 
5:55 PM
Our wires seem quite crossed in what I want there. I'll hold out a little and see if rlemon has some time or desire to dedicate to it, else I'll head out and eat lunch I think ^_^
 
@jcolebrand ok so statusupdate: I now have an Iframe that is linked to the form I want to submit. the form is #newProduct and the iframe is named #iframe_newProduct
but now I need to understand why it won't submit
it never goes beyond:
status = options.post.apply(this);
if (status === false) {
 
what's your post function?
 
how do I indent code?
 
ctrrl-k
 

« first day (863 days earlier)      last day (4103 days later) »