« first day (25 days earlier)      last day (4941 days later) » 

12:01 AM
overriding Object.prototype.toString for unique object ids: jsfiddle.net/ctrlfrk/evcLz
 
422
can I ask a question in here ?
 
@422 Sure, although if it's complete enough to be a SO question, posting it there is typically the better option.
 
@422 welcome to the chat, the better option is just to jump on in
 
422
just wondering if z-index can be used within js css
thanks btw :)
 
@422 can you provide us with the code you're debugging or thinking of using?
we work better with code most of the time
 
422
12:04 AM
sure, what shortcuts can be used in here <pre> or <code>
<script type="text/javascript">
jQuery(function($){
$('input.latLng').css({
width: 300,
height: 18,
backgroundColor: '#fff',
border: '1px solid #ccc',
borderRadius: '3px',
padding: '3px'
}).locationPicker();
});

</script>
 
just tap the code we'll figure it out
 
422
ahh it just pastes in thats cool
 
You can paste a multi-line snippet and press the fixed font button on the right.
 
so you're referencing this question then?
3
Q: Styling input with jquery

422Ok I have the css sorted: Now to style the input box ( but this isnt working ) any suggestions. Think my js is messed up. The html element: <input name="latLng" class="latLng" id="latLng2" type="text" disabled /> The JS: <script type="text/javascript"> jQuery(document).ready(func...

 
422
yes Drach
 
12:05 AM
fixed font button? Where?
 
hrmmm
top.location.replace(top.location);
I'm ending up at the iframe's url
 
so to answer the question, yes, you should be able to use the zindex property in that CSS block, and that's technically the jQuery css command
if you want to shortcut it in the future so people know what you mean you could always just have $.css()
 
422
@drach, it doesnt seem to work... in fact breaks the js
 
we would pick up on that fairly quickly, I would think. that is the command you're using
@422 well then, I must be wrong, lemme dig
 
422
thansk
thanks
may I post a link to the form we are creating ?
 
12:07 AM
hey there you go, you're figuring it out ;)
certainly
 
422
thankyou
 
You have to make sure that you quote it as 'z-index' if you're trying to use it as an object property name, or zIndex probably works without the quotes.
 
422
k you ned to fill in form fields 1 2 3 then click the map check button agentdb.com.au/add_listing_land.html
thanks tim i have tried most derivatives
 
@rchern That....seems wrong, hrm.
 
422
Whats occuring is when the map overlays the form fields, they are still viewable thru the map
 
who knows the address for that interactive api viewer?
 
422
qooxdoo.org ?
 
back
@drachenstern - for what?
 
422
gday Nick
 
gotapi.com?
 
12:10 AM
for jquery
 
oh
 
grrr, someone shared it the other day and I was impressed
 
sorry, the source browser
 
12:11 AM
I get hung up on the api all the time :(
 
Tek
All right, I just had some time to mess with this but according to @drachenstern

I should be able to pass $.get data to $.post callback like this, right?

$.post('ajax/test.html', function(postdata) {

$.get('ajax/test2.html', function(getdata) {

});
$('.result').html(postdata+getdata);
});
 
anybody feel like testing my example and confirming it is acting weird?
(:
 
@rchern I'll test but I don't promise good results
@tek afaik you should be able to
 
use jsfiddle! i'm really enjoying it
 
@drachenstern that seems out of date, can't even see .delegate()
 
12:12 AM
Hmm, I see the same on jsfiddle
 
@rchern Working on it :P
 
put this into jsfiddle and run it
if (top != self) {
    top.location.replace(top.location);
}
 
@Tek, it needs a change:
 
Tek
:O
 
$.post('ajax/test.html', function(postdata) {
  $.get('ajax/test2.html', function(getdata) {
    $('.result').html(postdata+getdata);
  });
});
 
12:13 AM
@NickCraver true it only goes back to 1.4
 
getdata isn't available outside that callback
 
Tek
aaaaaaaaaaaaah
I was wondering that
Thanks so much for the clear up!
 
I said you had to nest it :p
 
@tek woohoo it works, yay!
 
Tek
12:14 AM
Yeah, but I didn't know to what extent the variable was available
 
ah, the joys of scoping
In computer programming, scope is an enclosing context where values and expressions are associated. Various programming languages have various types of scopes. The type of scope determines what kind of entities it can contain and how it affects them—or semantics. Typically, scope is used to define the extent of information hiding—that is, the visibility or accessibility of variables from different parts of the program. Scopes can: * contain declarations or definitions of identifiers; * contain statements and/or expressions which define an executable algorithm or part thereof; * nest or be...
once you leave a function the variables aren't around anymore (assuming we're not talking about a class where we've instantiated an object and assigned the object to a variable, but then again, it's still scoped :p )
 
ummmm that depends, be careful now
 
@rchern It redirects the page? What is it doing for you?
 
this is JavaScript, it's not block scope like most languages
 
Tek
@drachenstern yaaaaaaaaay! thanks
@NickCraver and thanks to you too :p
but I should have known better
hehe
 
for(var i=0; i<20; i++) { }
alert(i); //alerts 20
in most languages that wouldn't be the case
 
@NickCraver interesting example...
@422 working still, hang tight
 
i would be available to the end of the function
 
422
thats cool thankyou
 
var a = 1;
function b() {
    a = 10;
    return;
    function a() {}
}
b();
alert(a);
what will be alerted?
 
12:20 AM
@rchern Firefox and IE just get angry, Chrome shows the iframe's page
 
@david 10?
 
422
brb <3
 
@drachenstern nope, 1
 
@TimStone, yeah, seeing the iframe's page in Chrome.
Hmm, guess I should test this in IE since that's all I care about rofl
Access Denied.
 
@david putting a function with the name in there eh?
 
12:24 AM
yeah. After reading through that guy's blog my mind was blown
 
@422 so you should be able to use zIndex in that table and it work, if it doesn't, say something else
 
@rchern Yeah, I was trying to see if there was any exploit in IE you could use, hahah
 
I can't find any evidence to support it not working
 
thought maybe the referrer would give me the parent url, but location.referrer is undefined.
 
422
@drach , i have tried z-index: 1 and -1 ... does it need " " or ' ' round the numeric
if so have also tried them lol
 
12:27 AM
@422 try instead of z-index this -> zIndex
 
422
ok brb
nope breaks the code again, oops wait I may be trying to apply it to the wrong element ..... grrr
I am such a knob, I was applying to the input element, and not the map element, thanks drach, thats wicked :)
 
you're welcome
really tho I didn't tell you that first, I think it was @TimStone
24 mins ago, by Tim Stone
You have to make sure that you quote it as 'z-index' if you're trying to use it as an object property name, or zIndex probably works without the quotes.
 
422
nope still breaking fpmsl
I have now:
locationPicker: function() {

var options = {
width: "500px",
height: "360px",
backgroundColor: '#fff',
border: '1px solid #ccc',
borderRadius: 10,
padding: 10,
defaultLat: 51.500152,
defaultLng: -0.126236,
zIndex: '1'
};
this is the function to display the map
 
This sucks that they're going to have to put our url into their code
Grrrrrrr
 
422
apologies Tim
 
12:35 AM
I believe z-index is a numeric value right?
so no quotes
 
422
tried both, will try again
 
funny story about type coercion ...
css properties can always be defined by strings. e.g. border radius really should be '10px'
 
@rchern I haven't given up on IE spilling the secrets yet :P
 
@Matt yeah I was just looking at that
 
Is anyone else here a little anal about putting quotes around the left hand object names? like {"width":"500px"}?
 
12:36 AM
Perhaps a larger z-index value for good measure? :P
 
@david I don't but I don't have much call for it
@TimStone you're reading my mind
 
;)
 
@422 are you just using z-index of 1? Try z-index of 1000 :D
 
@david why would you waste those precious bytes??
 
@TimStone and I thought I was being clever with checking the referrer. |:
 
12:38 AM
@rchern It was a good idea. Damn security, heh :P
 
422
that really didnt make any difference whatsoever. If you clicked on site link ( i posted above ) and instigated the map, zoomed in, and then switch to streetmap ( you see the field titles bleeding thru the map ) and soon as you drag the map, it breaks.
 
hrmph
 
422
tried 1000 made no difference, it could be a quirk of gmaps
 
I didn't see the field titles bleeding through the map
 
422
@drach what browser are you using
they are very faint incidently
 
12:40 AM
oh I see them now
chrome
 
It should all be gzipped anyway >.> And i'm secretly sad that you can't do something like:
var a = "prop"
var b = {
a:"laser"
}
alert (b[a]);
 
422
was thinking of using modal, but then im bloody lost again, .. i could parse using ajax i suppose
yeah i am using chrome and ff
 
LOL I got beat on answering an IRC question on SO.
 
@rchern Jeff is so against IRC that he hunts down people who answer IRC-related questions and beats them?
 
@422 are you applying the class to latLng2-picker?
 
12:43 AM
oy
Someone answered 30 seconds before I did.
 
Seems a bit drastic to me.
 
and this amuses me.
 
Heheh. :P
 
422
<<< just checking my code ( could have a false variable )
only place i can see is the issue is: $(this).after(picker);
var mapDiv = $("<div class='picker-map'>Loading</div>").css({
height: options.height
});
 
where are you defining the zindex and on what element?
 
422
12:48 AM
here:
//This is where you write your plugin's name
locationPicker: function() {

var options = {
width: "500px",
height: "360px",
backgroundColor: '#fff',
border: '1px solid #ccc',
borderRadius: 10,
padding: 10,
defaultLat: 51.500152,
defaultLng: -0.126236,
zIndex: 1000
};
which looks right to me
 
well it's not getting applied in the page
not onto that map
 
422
nope lol
 
or if it is idk where at
I see a bunch of stuff with zindex 0
 
422
are they the form fields
 
no on the map itself
 
422
12:51 AM
k, will check.. unless google api is throwing them up ( never looked that closely )
 
oh found it
the locationPicker is apparently on the bottom edge of the map
where the terms of use are
 
422
hmm ok.... so zindex is being rendered to say 1px by 1 px lol
so need to apply to the div somehow
drach your a star
fixed it
I have appended it to the picker ( which i think you intimated )
var picker = $("<div id='" + id + "-picker' class='pickermap'></div>").css({
width: options.width,
backgroundColor: options.backgroundColor,
border: options.border,
padding: options.padding,
borderRadius: options.borderRadius,
position:"absolute",
left:"373px",
top:"-50px",
zIndex: 1000,
display: "none"
});
 
so what are you going to apply it to then?
 
422
^^
 
yeah, try that
did you upload it already?
I'll test it here
 
422
12:54 AM
just doing it now mate
 
heh, I noticed your url ended in .au >.>
 
422
yep Drach , fully working
gday David
 
woot
 
sup, i'm heaps beached
 
glad we could help you
 
422
12:56 AM
lmao @ heaps beached bro
sincerely appreciate it drach , it has been driving me bonkers
 
who here knows their C well?
 
422
fush n chups
 
EXTERN_C Thread* GetThread(); means it's probably implemented at a lower level huh?
since the comments read thusly: // These guys are implemented in ASM and won't touch any of the argument // registers, the C++ compiler won't take advantage of this however. ...
 
422
just a quickie: the lat and long that appears in the search field ( sorry input field ) are we able to grab that in anyway ? for the db
 
if it appears in a box on your page, you can grab it
do you mean in the input field or in the latlng box?
 
422
1:02 AM
one mo will amend the form, to show the hidden field:
<div class="field"><label for="landlatlong">Latitude / Longitude </label> <input disabled id="landlatlong" name="landlatlong" size="50" type="text" class="medium" /></div>
wanted to grab it from the form box , and whack it in this field, so it submits to the db ( have amended the form ) to show this hidden field now
when i view source i see no value for it ( within that input field )
 
so long as there is a value in there, you can get it out. just use document.getElementById('landlatlong').value;
so try alerting that value, see what you see. attach it to a button for testing.
or use the console
alert(document.getElementById('landlatlong').value);
 
422
thanks will give it a go :)
 
just for the record @422 jsfiddle.net/drachenstern/heDPq
ok, it's 7, it's time to go find beer and pizza, or something equally bad for me
 
@rchern Heh, I found a way to (sort of) pass data. ;)
It makes the HTML/JavaScript gods cry though.
 
o:
frankly, I'm quite alright with that.
 
1:11 AM
Heh. :P
Let me see if there's a less stupid way to do this..
@rchern I dunno. I can't imagine there's not a reasonable way to do this...but if you want to avoid hard coding the URL into the script, you can just say "Screw proper ID values" and do something like <iframe id="url=http://www.domain.com/">. I don't think that you can access the ID directly, but IE is nice enough to create variables on top for all of the ID'ed elements...So you can actually traverse the properties of top and then parse the value out of url=http://www.domain.com/ >_>
I consider this a crime against humanity, but...it's doable.
 
1:32 AM
hmm, does IE's console have a console.dir equivalent?
 
Hm...I'm not sure. But food time now, back in a few minutes.
 
yeah, already plugged in FBL hehe
 
1:58 AM
@rchern So yeah, grabbing the URL the way I described and plugging it into top.location.replace() seems to work as you wanted....albeit in terrible style. ;)
 
422
wb Tim
 
Thanks
 
422
getelementbyid only works if that element has a value doesnt it, but what if the value is created by js
 
@TimStone, checking to see if I can pull custom attributes or data attributes
might be a bit more clean
 
@422 the value doesn't matter, as long as it has an ID you can find it
and that ID needs to be unique
 
2:11 AM
@rchern Yeah, definitely. I tried to go that route, but no dice for me, I may have missed something though. :)
In other news, Twix bite size ice cream bars = amazing.
 
2:26 AM
The most single feature, with the least impact on actual functionality I've ever worked on in any of my JS projects: Bezier curves -.-"
 
2:39 AM
hmm. I think I might be trying to pull out the data attributes wrong. Maybe I should actually look up how to do it >_<
 
@rchern How are you doing it?
 
Also, not continually getting distracted and doing more work on this than every 15 minutes could be helpful
 
Heheh, perhaps ;)
 
var url = top.myID.dataset.url
 
hi guys. i'm trying to create a front-end for a GAE app. it doesn't need to be too complicated or interact with the back end much at all; mainly i just want the GUI elements to be phrases/words/labels which the user can click to 'activate' (make part of the 'statement' they are composing), drag to rearrange their order, and have a close/deactivate button that appears upon hoverring over. what i do need though is for it to look beautiful and feel dynamic. so my question is, where should i start?
create my GUI elements in photoshop? use a jquery wysiwyg editor and then swap out their ugly components for nice ones later? start building everything from scratch with nice css3 effects?
or find some YUI components that are suitable then customize them one by one, assemble the interface later?
 
2:54 AM
@NickCraver can I ask a favor?
 
LOL
 
@rchern are you lol ing at me?
 
@rchern Did you forget that you're working with IE? :P
 
@TimStone meaning?
 
brb guys, time to go find greasy pizza
 
2:58 AM
@drachenstern no...of course not.
 
@Andrew Sounds like any of those would work, pick one and go nuts would be my advice
 
@rchern Meaning that .dataset isn't defined :P
But otherwise that's correct.
 
The example said it worked in IE ):
 
I call shenanigans
 
ok, thanks. i can't really think of any comparable interfaces i've seen on the web (or elsewhere) for what i have in mind, guess it's quite novel
 
3:01 AM
(I tried to set the value in the parent and it told me that .dataset was undefined)
 
grumbles and goes off to figure out the IE way |:
$("iframe")[0].getAttribute("data-url") meh
 
@Andrew is this kinda what you're after? jsfiddle.net/ctrlfrk/A4K4t
 
@rchern How does that work to get it from inside of the child though?
 
yeah, working on that
 
I tried top.id.getAttribute(""), but the method isn't defined in that context...somehow.
 
3:11 AM
@david thanks i think that could help a lot for rapid development of the interface. cheers
 
@TimStone, @#$#%^$@#
 
@rchern No luck? :(
 
I thought I had it, damn.
 
Heh, I had it print out all of the properties of the top object et al and tell me which ones were accessible and which ones were protected to see if there was anything I was missing, but doesn't look like it.
 
/me has greasy pizza and soda and a soda covered kitchen
/me hasn't got the scripts installed /facepalm
 
3:23 AM
@drachenstern That's the biggest tragedy of all
 
/me wonders if chrome is good enough to apply them without a restart ....
sandbox here I come
 
F5
 
yarr, did that
shows that it works
 
(:
 
just wasn't going to keep posting to the room to prove it to myself :p
 
3:24 AM
so seems like I'm stuck with the id
should probably cut and run with it
 
@rchern You can take solace in the fact that it's still better than their code.
 
@rchern does it work?
 
Thankfully I can safely assume you work in a different industry than I do, so I'll never have to worry about coming across this vendor in the future ;)
 
yay for vertical markets :D
 
Heheh :P
 
3:55 AM
hm. maybe I don't have it. I can get it when I know the id. But in the real scenario I don't have the id. Need to pull the element. Which is proving interesting, of course
 
@rchern I for(var key in top) -ed it and looked for the url=, but I don't know if that's a sufficient method for you.
 

« first day (25 days earlier)      last day (4941 days later) »