okay serious question what would make a script work on a site in IE and FF then copy and paste the javascript
(new Date(0,0,0,0,0,1183350511)).toLocaleString()
1 AM
Nup
heheh
well all the show dates and time stamps are stored in EST on our mysql server. I was going to calculate their timezone using javascript then calculating the difference with the servers before displaying in php.
ah ok that worked a treat thanks CommandPrompt
Anyway, get the epoch into a date object and you can get the locale string back out
woosta*:
Ahh
What do you do if they go straight to that page without going via the tz test?
well, thats what i've been working on earlier. i store their tz into a php session cookie, if the tz value isn't set it redirecrts them to the page they were on but with *.php?tz=the_java_script_detected_time_zone
and then it stores it into teh session cookie for any future browsing
i'm new to this though, so im open to any better solutions
www.protonradio.com)
.
(new Date()).getTimezoneOffset()/60
0
.
(new Date()).getTimezoneOffset()
0
what do you think of my idea?
It will work, but a reload is annoying
What will happen to non-JS people? reload loop?
the reload is done via js
(I guess not, if the reload is JS)
so it wouldn't reload if they didnt have js
right
once I have this done though, I can offer them to store their TZ value in their user profile
You'll need to output a default TZ on the page that says to reload
well without an offset it would just display it in the standard EST.
i think?
in the end the offset will just +/- our date output ,so without an offset, it would just what it already is… in EST.
(Edt atm)
Yeah, just so long as you're aware, it doesn't matter how you handle it
And then I'll let the users store a value into their user account if they are logged in for non js people
it's bad fu to store datetimes in local TZs
yea i didn't write our site
You have 2 x 2am one day of the year and 0 x 2am on another
can you think of a way to do it without a re-direct for php webhosting to grab it?
if i have a namespace'd method, i'm getting an error when i do var fooMethod = namespace.foo.mooMethod; fooMethod(); i get an error
encodeURIComponent("http://ps2.pickstation.com/playlist_user_favs.xspf?user=$user2")
but if i call it with a qualified name, it works fine
write(encodeURIComponent("http://ps2.pickstation.com/playlist_user_favs.xspf?user=$user2"));
Anyone know if there's a chatroom for Rhino in particular?
anybody know why document.myform.elements[1].disabled = true; doesn't work with opera 9? is there another function i can use?
I'm trying to get started with Rhino, but I'm not exactly sure where to star
start*
it does
it doesn't seem to work with opera but it works ie6
it does work in opera
it depends on what you have
i think its because of my checkbox names. they contain stupid characters
hehe
how do you check for the type of the object you click on?
hi! what is an anchor ?
a link
check its nodeName
`dom ref nodeName @ treehaqr
dom ref nodeName: Returns the name of the current node as a string. (http://developer.mozilla.org/en/docs/DOM:element.nodeName)
thanks
somehow an image object has .href property which confuses me :*
CommandPrompt then what is anchor() and what link() in javsacript ?
`js ref anchor
Creates an HTML anchor that is used as a hypertext target. (http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objectstring:anchor)
`js ref link
Creates an HTML hypertext link that requests another URL. (http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objectstring:link)
they make a link off a string, using the string as the text to be clicked on the link
but anchor cannot be clicked
….?
yes it can
Thanks, CommandPrompt heh ;p
you solved my problem
…
img have/use src
I assume you meant its parentNode is a link
i have a bunch of images w/ onclick=();
and their imbobj.href isn't undefined
tags and redirect the page to an iframe
so far that only works in FF but not in IE
how can i access the parent getelementbyid from a frame (a frameset page)? parent.getElementById doesn't work, return undefined
document.frames
i want to access the page with the frameset, from one of the frames
not one of the frames from the frameset page
oh
thanks anyway
i have my document.onclick handler return false everytime i click on a hyperlink but the browser (IE) takes me to the page anyway
is there a way to stop the event from bubbling up in IE?
that does the trick in FF though
http://www.stringify.com/words/2006/07
treehaqr, did you try to set it to all the a?
I have error on IE like Invalid Argument. but FF not error. howto debug it?
with getElementsByTagName('a') and while ?
hmmhmmdon't know
ei sucks
hmmhmm, don't know*
ie*
hehe
damn, too much vodka
the parent for all will be window.top
IE said line 2149 and Char 3. but I haven't line 2149
window.top.getElementById ?
well
haha CommandPrompt
document.getElementById() is a document method
what are you doing here
window.top.document.getElementById ?
i did "document.onclick=function(){alert("booya"); return false;};
heh
:P
`paste @ tulga
paste: Paste links, not code: http://erxz.com/pb/ http://pastebin.parentnode.org/ http://paste.css-standards.org/
thanks mate!
that really helped me
you know http://test.theanglersresort.com/hotel.php
CommandPrompt, i love you
not in a gay way
Thanks flannel
FF is ok, but IE has Invalid Argument
not in a gay way (are you sure?)
yeah, pretty sure :X
right,but on what line IE borks?
"not that there's anything wrong with it, cuz…. there isn't" — seinfeld
IE said line 2149 and Char 3. but I haven't line #2149
oh, yeah
good episode!
i love seinfeld
IE counts external .css/js
as part of the line
then howto find it?
add up all the lines from your external CSS/JS above that js file, subtract that from the line number, subtract html lines above the js, then that's theline in the Js file
IE very stupid
can javascript hosting return "highlighted text"?
sure can
cool deal
`js ref getSelection @ wycats
crap
`js ref getSelection
well, the bot doesn't have it
haha i found it thanks
can it return the elements?
so if i highlight text in p id=2 and p id=2 and can return me references to those elements or no?
.. w0t?
ehehe
if i have a page with two paragraphs
you want the nodes? no the plain text?
yes
i want the node
s
yikes
is there a way or would i have to capture the nodes using onmousedown, over, up etc?
well, there's an interface to address that
oh yeah?
the not-so-well-documented by either geckos or MSDN, Range interface
but both have it
like createRange?
`dom ref range @ wymetyme
yea
createRange()
bye bye
`dom ref createRange @ wymetyme
dom ref createRange: Returns a new Range object. (http://developer.mozilla.org/en/docs/DOM:document.createRange)
so i could use onclick, on release to createRange huh
yes
CommandPrompt I found the differences between anchor() and link() !!!!!!
a name="something"some text/a
a href="something.html"some text/a
I accidentally discoved it
right
on is for a hyperlink the other is local
is there a way to see the ajax queries in IE like you can with firebug?
don't think so
debugging tools in IE are well… not many and the few… aren't very great
yeah i know i hate IE
wow great
firebug lite just says "error"
like that helps me.
when you remove a layer does it automatically remove all the child layers?
or do you have to remove them manually?
it removes them too
ah cool ;p
thnx
does anybody know if it's possible to trigger an event when a youtube video finishes?
you there?
http://paste.css-standards.org/18155
okay serious question…. what would make a script work on a site in IE and FF, then copy and paste the javascript and HTML, upload it to your server and the script ONLY work in FF?
can we call a function inside a function directly in js ?
hey, how can I add the onchange event listener dynamical in javascript ? inputElm.OnChange does not seem to exists
try onChange ?
that's also undefined
did you make the element an object?
guess I need to use addEventListener
yes, it's a HTMLInputElement object
inputElm.addEventListener("change", function() { … is triggering on submit
can't make keyPress work either
is inputElm definitely what you think it is? .onchange should be fine
HTMLInputElement when doing a alert(inputElm) …
..onchange happends SOMETIMES , it's way to rare
I have use keypress but can't make that work either
what kind of input is it?
text
IIRC, onchange doesn't fire until text inputs lose focus
it seems a bit random, but yeah
how to listen for a keypress/textchanged/anything do I can fire a event there?
hello
is it posiible to set the style attribute of a div using the setattribute function??
why would you do that?
well, if you want to set the entire style string in one go, instead of one by one?
use .className
and set another CSS class
well, the thing is i want to add a division in response to some AJAX stuff. should i use parent.innerHTML= " the div html hosting code " + parent.innerHTML; will that work
Avoid innerHTML, it's non-standard and can be tricky. Stick to the standard DOM instead.
i have the code of a div and i want to insert it into the code. what the standard way then?
document.createElement, document.createTextNode, ELEMENT.insertBefore
but its a div. how do you create a div
document.createElement('div')
oh. thats good. thanks.
i've got an onchange event in an element
is it possible to fire the onchange event from js, i.e tell the element, you've changed, run the events on you
How can i track down a "Type mismatch" error?
It only happens in IE - meaning the DOM console / Firebug don't give the error
It says it's on line 101 - the file has 31 lines..
how does a person get unbanned in a room?
can it illegal to ask php questions in this room?
is it*
You ask an op for the channel you are banned from. PHP questions are off-topic for this channel.
but its not fair. i get banned because of someone else, just because i am behind a router, and a 200 people have the same global ip. Anyway if i cant join the room how do i ask the op. for eg. i am banned in the ##php room. i want to ask some php question
Chanserv can tell you who the channel owners are. /msg chanserv help.
alternatively try a different IRC network. EFNet has an active #php channel (or used to, at least)
bleh peopel in #php suck, they banned me when i was asleep
and nobody ever replies
0) (Mace[work]) (Greenberet) Dorward: but its not fair. i get banned because of someone else, just because i am behind a router, and a 200 people have the same global ip. Anyway if i cant join the room how do i ask the op. for eg. i am banned in the ##php room. i want to ask some php
in ##php^
yeey
Mace[work]: IE is giving you the wrong script URL
it may be a file that's included then
yes. install a debugger that can show you the right location
the Microsoft Script Editor included with MS Office is good
I've heard there's a Visual Studio one you can download too
`js mse
install the Microsoft Script Editor to debug in IE: http://erik.eae.net/archives/2005/07/04/21.49.50/
Hello all.
hey brain
lo xorc
dont you just hate it, when all the people in the office go and hold a meeting
and your wasting your time completely on wikipedia and slashdot
:P