when i select something on the dropdown menu a small selection of the code must change to correspond to that

ummmm… dunno

how exactly would i use javascript to change the height of my navbar, relative to how tall my content div is

o.o

as you can see if content is bigger than navbar.. the layout breaks

back
what means ‘poke’?

-_-

anyone help?

:p

you have a ghost =P
FlashWolf_ =P

yep
dont be afraid of my ghost :p

dont worry, it was already broken =P
would their be a way to “pause” a script?

alert(‘blah3′)

your ghost died =P

dont know how

hm

poor ghost…

it is possible to scroll a div (overflow auto) right?
I mean, with javascript?

u can make a logic to do that

“logic”?

you’re from Germany?
oh well… Brazil then?

Brazil
why?
words?

The English flaws sounded familiar

:P
correctin…
you can make a code to do that

and u, duke? germany?

Yeah ^^

http://www.ms-fuchshuber.de/walchensee.jpg

curse ghost

i cant see pics

i’m on mobile
a java applet

FlashWolf_
_
lose the underscore =P

:p

ey
you there?

meh
i hate iE

I know your pain.

yes

it doestn execute my javascript hosting and gives no errors
:/

yes
gay
=
ie

i mean
if there are no errors
why doesnt it execute it

secret
Turn on JS in the prefs?

i would be happy to just leave it and leave ie alone but sadly there are kinda many ie users lol
its on
and it works on another js

Do this

but not this one
xD
but uh opera does o.ô

‘You are a moron. Go get firefox or some decent browser and get off of internet gaysplorer. Thanks.’

night

read

lol

No really that’s what I do.
still not here?

ie doesnt look innerHTML
xD

OUCH
that’s kinda GAY!

atleast it doesnt seem to set it

http://w3schools.com might have a fix?
search javascript innerHTML
or the ladder

meh

hen you get back look her and tell me why this doesn’t work please. Confuzzed, I am. http://rafb.net/p/Ox6bGs68.html

w3c will just og like “use DOM”

.

what? xD

http://www.w3schools.com/js/tryit.asp?filename=try_dom_anchor_href
try that in IE
see if it works and you have yuour aswer

things inside a select…/select

hi
Basically, I add position absolute to an element. Then I do some calculations based on that. Then I add position relative to the container of that element. The problem is that the element is not relative absolute positioned. It needs some sort of redraw.

gosh
ie is so annoying xD
well going to bed
gn8

what doesn’t work about it?
hrm, what’s this exists() method?
null doesn’t support that
it can’t have methods

deltab:
how do i check if an element erxists then?

elements are true, null is false

so

if (document.getElementById(…)) { … }

ah ok
thx0rz

where did you get exists() from?

google
:P
So now nothing still displays.
confused
is it the path in jifGet?

is what?

um
deltab:
The path

anyone?

can jifGet read exact paths deltab ?

I don’t know what you mean by “read exact paths”

from the root dir instead of the webroot dir

javascript running in the browser won’t see a server’s filesystem, except what the server exposes through http

ah ok
that’s difficult but ok i have a solution
brb

What are the javascript IE comments?
something like /*@

Has anyone ever written an extension for t’bird?

how do I get the number of properties in an object?

count them

:P
….

folks, I have a list of objects each with an existing, unique id. I am creating a client dataobject, and my intention was to do something like data[id] = {} for each object
however the id is numeric, and the .length of the data array is out of this world..
has anyone dealt with this, and what did you do?
or what do you suggest as an alternative.. I did something like data['obj'+id] = {}, but that is ugly and imo ruins a great data structure
any thoughts?

hey folks … how to remove $ and (,) using regexp ? ;o

i need learn about regexp…
i know that regexp begins at ‘r’. just this :P

it doesn’t send my data in utf8

what’s the problem?

it sends ur data in utf-8

sure?

its the default

I simply grab data from a form and just put it in the send function

set a header

where?

ajax().setRequestHeader…

in my html document or somewhere in the javascript?

before the ajax send

is there a way to submit a form with a file field using ajax?

normally

iframe

i got it thanks.. decided not to use array

as a text input

without using innerHTML, reliably, cross-browser? or am i making a headache for myself

deltab, what do you mean?

you can have the form submission happen in an iframe

doesnt have an id set, so i dont know how to address it via DOM)

deltab, ok but is there any other way to do it using moo or prototype?

selectElement.options[i] is one way

deltab .. will that get the string displayed to the user, or the value, or an object reference, or what?

libraries don’t have magical abilities beyond what is normally allowed

i just want the string displayed to the user for that option
is selectElement.options[i].innerHTML going to work in IE? i fear not.

FlashWolf, I get a really weird error if I try to set that

they may provide some convenient way of using iframe, or java, or whatever

Hey guys can you help me with this,

are you named after a fat caching server or something else?

I have this one html page

don’t use innerHTML

basically, when i select something on the dropdown menu, a small selection of the code must change to correspond to that.

how else can i achieve it?

bobnormal, no

and i heard this could be done using javascript?
how would i do this?

select onchange=”alert(‘write js function here’);”…/select

`innerHTML @ bobnormal

innerHTML: http://slayeroffice.com/articles/innerHTML_alternatives/

yes i know about DOM but in this case how do i get that data

theTextValue = yourOpt.textContent || yourOpt.innerText

textContent! rock on. fantastic, thanks

NO

thanks a lot too

FFS

getElementsByTagName

bobnormal, i’m not quite sure how to do this, since, i’m not very good with javascript.

Why do people not read what I say?
You need the whole thing

ok

The “|| yourOpt.innerText” makes it work in IE

comprehende

My current header:
req.setRequestHeader (‘Content-Type’, ‘application/x-www-form-urlencoded;charset=UTF-8′);

its right

help, guys, could someone write what code I’d need to put in my html page please?

Available Plugins: oeis jeval spell cpan shorten rt topic squeeze rbeval acronym change managementspeak reverse join translate bibleit core imdb insult tv help echo eval convert jseval mangle restart quit deparse part pyeval reload_plugins goobooblink heap_test rss

still doesn’t work

take a look in my lib
impactoweb.info/iw_lib_v0.1.zip

whenever I use é or other weird characters, é is just skipped or replaced by “?”

wait I’ll make it more open

the site still isnt using this lib

what is it?

when i select something on the dropdown menu, a small selection of the code must change to correspond to that. and i need a javascript code that i can insert into a html page that would do this, can someone help me ?

Hello, I have a function that is executed onmousemove from a div… I send the information of the div by simply passing ‘this’ so foo(this). However, I need to send the even information too
event information*

foo(this, event)

my ajax based js lib

guys, please helpe
help

Available Plugins: oeis jeval spell cpan shorten rt topic squeeze rbeval acronym change managementspeak reverse join translate bibleit core imdb insult tv help echo eval convert jseval mangle restart quit deparse part pyeval reload_plugins goobooblink heap_test rss

are u using php?

your question is too complex. Try googling for it first, then ask questions once you can’t work out something

daedeloth:
are u using php?

yes

ah
this ll solve ur prob
suspense…
set a header() in beginnin of the php page

header(“Content-Type: text/html; charset=utf-8″);

forgot te parameter…

Does this have a bug? – “divtag = document.getElementByID(‘Page’);”

not utf-8

why not?

use ISO-8859-1

I don’t want to use iso stuff…
my database is in UTF8

if u wanna display é

utf-8 should be able to display é

I searched for jifGet and found your post!

ur db should b latin-1

FlashWolf, if I manually add it (using phpMyAdmin) I can display it without any trouble

If your text document isn’t utf-8, and you have a utf-8 header, it won’t work

hi

(Apprently “divtag = document.getElementByID(‘Page’);” doesn’t work…

you have to make sure the content type and the document type match

utf-8 isnt able to do that

what’s that?

you don’t have an element with that id at that time

utf-8 is not able to display “é”?
utf-8 is able to display friggin chinese… ofcourse it can display é

no.

“div id=”Page”" thats in the page

not using a latin-1 encoding

If it’s latin-1, then it’s not utf-8 :-D

but look, if I add it in phpMyAdmin I can display it without any trouble

are u sure?

9] 9teh1ghool: Woosta: hen you get back look her and tell me why this doesn’t work please. Confuzzed, I am.
2 hours ago

something happends while I post the data to my php webhosting script

I pointed out that exists() doesn’t exist

remove .exists()
heheh
And even if it does, it will cause a fatal error if the element doesn’t exist :-D

what’s the doctype of the page with the form on it?
er, encoding I mean
form submissions occur in the encoding of the page doing the submitting

should be UTF-8
http://projectx.daedeloth.be/
have a look, it is

Content-Type: text/html; charset=utf-8
I’d say your data isn’t really UTF-8

can you use the new operator as part of value in json assignment?

no

like {‘dataevent’ : new CustomEvent(‘dataevent’)}
ok, thanks

see http://json.org/

use iso-8859-1 with latin-1

at a guess you’re asking the wrong question :-D
no you don’t

i use this perfectly
so, why not?

can javascript form validation be used to check if one of a bunch of radio buttons has been checked?

Woosta, what do you mean?

what do I mean by what?
you use either one or the other :-D

in my site, in example

scroll up

like you see, it’s displaying the “é” perfectly

yes, though you shouldn’t rely on it

i say, iso in php header and latin-1 in db
both

{‘dataready’ : function() var obj = new CustomEvent(); return obj; {}()} .. anyone see any pitfalls or have thoughts on that?

no. I’m not really planning to launch in china tomorrow, but I don’t want to limit my possebilities

err…

latin-1 is a subset of ISO8859-1 for at least the first 127 chars .. so it ‘just works’ for you

can you tell me how it’s done?

function() { var obj = new CustomEvent(); return obj;}();

you’ll need a loop that checks each of the radio buttons to see if it’s checked

“mmpf” at 71.6.194.243 pasted “why doesnt this work” (8 lines) at http://erxz.com/pb/4117

thx

the alert doesnt get tripped (im mmpf), nor does the navbar get resized

(until it finds one that is then it can stop)

does anyone have any idea why?

height should have units

so I can’t do a simple if (value==null||value==”")?

“mphill22″ at 71.6.194.243 pasted “this is the actual page code” (65 lines) at http://erxz.com/pb/4118

where does value come from there?

ahh thats one thing. but that doesnt explain why the alert is ignored.. i added px to it and it still doesnt change

does alert(null); do anything?

`getRadios @ sodani_
`getRadio @ sodani_

getRadio: Get the value of the selected radio button: http://rick.measham.id.au/javascript/radios_and_checks.htm

I was thinking something like if(frm.radio_button_value.value…

nope

thx

hi, is there a way to get the page height?

document.body.offsetHeight should work

ah ive fixed it nevermind

hey fellas
night for u

it shows as 0

i’m going now

how can I fix the annoying fact that it’s 0?

document.documentElement.innerHeight
x-browser

maybe you need to wait until it’s calculated

that’s undefined
when is it calculated?

after the dom is loaded

this function is after the onload statement of the body tag..

worked?

after?

after??

Actually it seems to work in IE, but what I need is something else
after
it’s inside
I need the maximum top+height of all objects in the body
that’s the height that I mean

woosta, i tried searching google, nothing is helpful

offsetheight only tells me a number such as 461

document.documentElement.innerHeight
itll work

WTF is documentElement? Sounds like a MSism

x-browser

that doesn’t work
in any browser
not in firefox or IE

it’s in http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

Yeah, just found it
It has an offsetHeight

but why can’t i find it?

But then, so does the body, and that’s more directly what you need

and why won’t it work
parallel universes?
don’t you mean innerheight?

Eh? No. offsetHeight

Okay since I don’t seem to be able to force javascript to send me UTF-8 I just utf-8 encode it on my server

documentElement.offsetHeight?
how does javascript send anything?

document.body.offsetHeight as I said in the first place

xmlHttpRequest I mean

but that’s just the page height

XHR is *always* in utf8

daedeloth, try this code… it works with utf-8

Woosta, okay, but I don’t *receive* it as utf-8

“agamemnus” at 71.6.194.243 pasted “somecode… la la la” (46 lines) at http://erxz.com/pb/4119

yes you do.

nope, I really don’t.

OK, then file a bug report with your browser maker :-D

woosta… is there something that actually gets the height of the entire page?
……..

WTF do you mean?

the result is 461

Woosta, it doesn’t work if I do’nt call utf8_encode on the server

the biggest image, which is absolutely positioned on top:0, is 1181 pixels

if it’s not javascript that is fuckign it up, what is?

it should be 1181!
daedeloth, try my code

then try scrollHeight

oh, right. thanks, i will
nono
maxscrollheight or something
that is what i need

Just hunt through the DOM Inspector until you find the value you expect

idk
it just tells me 461
ok, good idea
but how do I get undefined values?
I can only see stuff that I defined already
???????/
??????????????????????????????????????????????????????

Agamemnus, well, that actually worked
oh wait
no it didn’t

why didn’t it?

I forgot to remove the server side utf8_decode
Want to give it a try?
http://projectx.daedeloth.be/
0f203f66fc4eba5
You’ll have to make an account (only takes 2 seconds) and click the C button
just type something in the textfield and hit enter

:o
nice

looks like contenthight is what I need
that looks like Age of Empires/ Age of Kings images

hm we’ve replaced most of them but there still are a few in there

like on the front page
and the minimap colors
dude

mySelect = document.getElementById(‘interval_2′); — why would that return the value null ? works fine in IE but not firefox, cant figure out why

all I see are AoK images

“mphill22″ at 71.6.194.243 pasted “this doesnt work, what will?” (8 lines) at http://erxz.com/pb/4120

What are you talking about? the buildings were made by a friend of mine

the above code doesnt work but its pretty clear what i want to do

no

can someone show me how i would achieve what im trying to do?

they’re images from Age of Kings

lol, that castle and the tents are from a game
the rest is custom made

AGE OF KINGS
it’s all from age of kings

show me a screenshot that matches one of my buildigns

gladly

it’s the same friggin style, but there are no age of empire buildigns anymore

i think there is actually even an extractor program for it

hmm can’t move chat window, seems to break when it loads
daedeloth

maybe you’re looking at something else

there are 5 grasstiles from age of empire, but most of them have been replaced
i0n, any errors?

someone, anyone, please?

the gold, from age of kings

can’t tell, dont have firebug on here

yep, and the crosses, and the stone etc

using newest ff though

but no buildings

http://aok.heavengames.com/university/strategy/deathmatch/deathmatch_dominance_the_huns/Gold.jpg

javascript console?

the mine is from age of kings

oh you mean the buildings in the B those icons

and the lumber camp
as well as the mill

yeah sorry, that’s true

I can’t actually build them for some reason

I thought you meant the buildigns on the map

probably because of the error sign at the bottom :P

still lot’s and lots of debugging

=\
I can’t build anything..
all the terrain is from age of kings
the castle is very similar but it is different i think
come on now

hm the grass is photoshop made ;-)

if you’re going to “borrow” images might as well go all the way
maybe some of it
custom auto generator ?

nah I’ve made the engine and used Age of Empire images, my friend is replacing them with own images

for the terrain tiles?

dunno, I don’t handle the graphics
but jsut look at the difference between the grass under the gold and the grass on other places:

mySelect = document.getElementById(‘interval_2′); — why would that return the value null ? works fine in IE but not firefox, cant figure out why

the gold is from age of empire, the rest is totally different

i see
well
you might want to look at the age of kings resource distribution code
they spent a lot of effort making it so that everyone had equal access
your resources are just random on a square grid

?
ah, yes, i know, but it’s a work in progress. today I’m fixing utf-8 bugs, tomorrow I might be doing somethiung else ;-)

sure

+ those resources are bonusses, you don’t need them. all will be explained in the manual

it’s a start
I guess.
did my xml loader solve your issues?

nope. try clicking the “C” and write “Héllo”
btw Agamemnus are you sure you can’t build a building? that’s really weird… sure you’ve first clicked a building and then a location on the map?

where am i suposed to write it

big gray area on the bottom
(stylesheet is also something for later )

make your website compatible with 800×600 screen size

bloody hell

i got “Héllo”

why… doesn’t it work… for me?
what browser? Firefox?

because u are not as fabulous as me
i was using firefox yes

hmz probably some linux issue then

Okay, I can’t figure this out. So, I need help. Anyways, my code currently looks like this
http://paste.ubuntu-nl.org/34478/plain/

how am I supposed to build something?
i constantly get errors

which basically has five pictures with some information and links on each of the sections,

wait no I was using IE6
lawlz

and so i want to make one display at a time

myusrnm, what is the problem then

i want a dropdown menu

Agamemnus, what errors do you get?

that will change it so only one section of that appears
instead of all five

ok jQuery channel is dead

and i want to do it using one html page

anyone know how to serialize a form into JSON ?

`jif @ helloRobot // look at form2obj in my jif.js

jif: Javascript Interaction Framework. It’s just like AJAX but without an implied dependence on XML. Woosta’s JIF library is available at http://rick.measham.id.au/javascript/jif.js

no bugs in mozilla
but the link is javascript:void(0)
and i can’t do anything
myusrnm
try this one
http://www.twinhelix.com/dhtml/fsmenu/

Agamemnus, select a rune, click “construct” and click a location on the map.

oh, stupid me
I thought the HUGE menu would disappear

so I need to pass it the actual form Element?

yes

yeah I should probably hide it while you select a location

and a million other things
like actually let me scroll

?

fix the minimap

what’s wrong with the scrolling?

let me scroll around with the mouse
it doesn’t work
that’s what

have you ever implemented this with a jQuery script?

oh, you need to click and drag to scroll

what do you mean with scroll with the mouse? you can drag the map, right?

how can you click and drag while placing a building though?

ah lol

very bad

I don’t use jQuery or any other libs sorry

it needs to change to freestyle scrolling

you mean “border triggered” scrolling?

right.

hm I don’t think javascript is the right language to do that ;-)

….
you can do
you must

thanks so much
works excellent

needs a grid mode
needs a grid mode too

grid mode?

grids.
light green or light blue.

hm the page is getting quite heavy already

and when you hover over a spot entire squares should light up

drawing an extra grid would mean double heavyness

i know how to fix that

agmemnus, i can’t see how this would work with one page

myusrnm =\
with one page?

yes, in one page

use #
somepage#part1
is that what you want?

i’m sort of confused as to what you’re saying?

I don’t know what you want really…
can you explain it again?
oh daedeloth
i just wanted to say this:
if the javascript code is heavy, take out the extra spaces
if the image code is heavy, use GIFs
or JPG’s
lines would add almost no weight

hm yep but how would I draw them? with gifs?

yeah you could try 8 color gifs
or 16 color
extra light!

yep and how would I do that? 10000 1px gifs?

so, basically i have a page and i have a lot of information on it, basically it’s a lot of text/pictures/links, but most of it wont hold relevance to anyone who visits the page, and they would only want to see one portion of it. Therefore, I could have an explanation placed on the page, and a
dropdown menu somewhere on the page which changed the portion that was currently displayed to the one they want to view. It’d clear

daedeloth transparent gifs
lines, NE and SE
myusrnm, are you loading all the content at once?

yes, agamemnus, i am

daedeloth, the only concern here is that you’d be loading a few hundred lines in
myusrnm, and that’s your preferred solution??
i would have thought that someone not wanting to look at the images doesn’t need them loaded
but anyway..

oh well, we’ll see later. I’m heading to bed now

or is that not what you meant?
if you are loading all the content for everyone, then I think we can find an easy solution
but it is different than loading some of the content for some

I’ll think about it, I personally don’t think we need a grid, but I’ll see if there is more demand
cya

well, if loading all the content is easier, i’ll go with that

bed time

daedeloth not just a grid
bye
myusrnm, you’d have to be crazy to load all the content
if it’s more than a few KB
and of course we have to know how you are loading it
if you are loading it from a database using PHP… or what?
…..
?

it’’s all in the page
it’ds just a quite simple html page


if it was simple, everyone would be rich
and you know it, myusrnm (I know you aren’t here)
is anyone left?

me?

you helped me before… it still doesn’t work

hmm

if (document.getElementById(“items”)) {
setInterval(function(){ jifGet(‘/feeds/feeds.php’, {}, function(x){ items.innerHTML = x.responseText }) }, 5 * 1000);
}

`doesn’t work @ teh1ghool

doesn’t work: What do you mean it doesn’t work? What happens when you try to run it? What’s the output? What’s the error message? Saying “it doesn’t work” is pointless.

why not Woosta ?

you’re using a variable called items; is it given a value?

got any advice on scaling pages, anyone?

div id=”items”

do you have var items = document.getElementById(“items”); ?

noep…
wouldn’t that kind of recurse then?

then your condition can be if (items) { … }
no

okey but is there a difference?

yes

explain please

names of variables exist in a separate namespace from element ids

ok .
sweetful 1 second
Is there any indication that this div is being refreshed every 5 seconds?
any activity in the page loading bar?

output a timestamp

doesn’t refresh
why isn’t it working? hum
/methinks you know exactly the problem with it
‘Ey where’d everyone go?

i killed them

ouch
do you know why it isn’t working?

who or what

http://rafb.net/p/VuTHSj31.html

hey folks … pic (8.6kB) converted to data uri using ( http://software.hixie.ch/utilities/cgi/data/data ) is like 180 lines … is there any other way to shorten a bit those lines ?

in a minute

you mean compress it vBm?
You could always write a compression algorithm.
you said in a minute?

maybe more than a minute

hehe so it’s not just me is it? .
Any closer?

k

yay
Does that mean you know what’s wrong/
?

n

ohk

i am in css discussing my page layout

weird
though you saiid you was gonna help me

so what is the problem with ur code
that’s why i told you to wait….

doesn’t refresh the innerHTML of that div
http://rafb.net/p/VuTHSj31.html

is the function called?

That’s not a function. It’s instantly executed on page load.
I think…

is there an error message?

/script

nogo
er
negative

but is it executed?

i’m assuming

add something to find out, such as alert or console.log

k
Negative.

it is not executed
?

i did document.items.innerHTML = ‘blah’;
Didn’t display ‘blah’?

do an alert in it as well
it should be document.body.getElementbyId(‘items’) instead
or just items..

alert(‘text’,'Ok’) ?

yeah maybe the problem is that it’s not saving “items”
but probably not
never know though
if that is the global scope, then no provs
otherwise it might be a problem

um
how do i do an alert?
alert(‘text’) ?

(“var” somevar sets an item to that scope that you’re in)
yes
take out the var and it’s global

It’s not executing the script.

take out the var
oh
no alert()?

noep

paste the example you had with the alert..
just to make sure..

http://rafb.net/p/TMrFiL74.html
there ya go

no

no?
..

double no
it’s not even executing there
you should have put it in the items.innerHTML function

right
it’s not executing outside of it

it’s not even saying what the function that doesn’t work is
so the entire script doesn’t work

right

probably this is to blame:
src=”php echo $html-url(‘/js/jif.js’)?”
what are you trying to do there?
trying to load script in jif.js?

echo a URL from php

a URL from php

lol

it’s preprocessoed so no problem

make another tag

and the source code shows it going to the rigth place

oh I see
so what should the src be?

/js/jif.js which is woosta’s library

src=”js/jif.js”?

That’s what the source says. Just like it should be.

you need a second script tag then

oh?

without an src
for the other part

whereat?

line 2

oh i get it
DUH
lol
i’mdumb

sure

lol

tell me if that works
hurry….

50%
renders the feed, but doesn’t refresh
Agamemnus:
:o

ok
doesn’t refresh

no

that means the inner function you have there don’t work?

woosta gave it to me… and it’s his library

setInterval(function(){ jifGet(‘/feeds/feeds.php’, {}, function(x){ items.innerHTML = x.responseText }) }, 5 * 1000);
doesn’t work?

sec’x

?
k..
it should refresh every 5 seconds

nogo

take out the var

k

though since u have a global scope
i guess it won’t make a diff 99.99%
var items = document.body.getElementById(“items”);

Which code are we talking about?
Can you pastebin it?
use a nice pastebin too like pastie.se :-D
`poaste
`paste

Paste links, not code: http://erxz.com/pb/ http://pastebin.parentnode.org/ http://paste.css-standards.org/

waa
doesn’t render now

that last one is good :-D

why isn’t it working?
it’s your function

Give me the code and I’ll tell you
The whole rendered code, no PHP BS

the php just echoes /js/jif.js
i pasted it above
http://paste.css-standards.org/23357
Woosta:

OK, you can’t do it quite like that
2 secs

oh?
[You gave me that code]

http://paste.css-standards.org/23358
No, the code I gave you is not the problem
it’s the way you wrapped it to check if the div you’re pouring into exists

nogo Woosta

you can get rid of the ‘language’ attributes on your script tags

k

What happens?

nothin

If it’s not working, and you tried the suggestion in the notes, then get me a URL to the actual page where it’s not working and I’ll have a look

doesn’t display anything in the source
blank

‘in the source’??

view source

Eugh

and

of course it won’t

night

it’s cakephp
maybe that a problem?

I don’t care if it’s cake pony, once it’s in the browser, it’s HTML, JS and CSS

it’s a framework so i think maybe it has to reload the whole framework from the beginning to refresh it?

Don’t just guess. If the change in the notes doesn’t fix it, get me the URL

I’m talknig about the php file I’m retrieving with your function. It might have blank variables in it because it gets all its assignments from its controllers which are not executed in the refresh?

so .. call it yourself and see what result you get

how code pic of almost 9kB brings ~20kB of text made by data uri
*how come

blank!

so fix that first

oboy
this is gonna be a few…

can i use div.style.width to get a width that is automatically set?
div id=”test”Hello World/div
how do i get the width of that div?

offsetWidth, iirc

ah right! thanks

The width of a block element is 100% of the available width

http://img237.imageshack.us/img237/3244/logo2ou9.png

maybe is something wrong at my end

vBm, did you try the data URI kitchen? you have to use base64
http://pastebin.ca/665199

The paste 665199 has been copied to http://erxz.com/pb/4121

vBm, with base64, it should always be 1/3 larger than before

tnx peepsalot … that is smaller then what i’ve got ;/
peepsalot, can you please give me the link to conversion page ?

http://software.hixie.ch/utilities/cgi/data/data

hmm … i’ve used the same … but didnt used base64

vBm, yeah you have to check the box at the top

peepsalot, so … base64 is a must when i use data uri ?

vBm, just if you want the smaller filesize. otherwise the non character data is converted to URL escapes, which use 3 characters for each byte. very inefficient

peepsalot, tnx for the info

base64 always uses 4 characters for every set of 3 bytes

one last question peepsalot …. i’ve read somewhere that i should “devide” data uri into lines with no more then 130 chars … should i use less or i can go with more ?

never heard that before, i’m not even sure that would work. sorry don’t know.

how do i change the html of the whole page?
innerHTML of the html tag
?

lol, am I the official qustion answerer now

yes
answer peepsalot ?

change the document.body.innerHTML

changes the head too?

so impatient
what you need to change in head

well
something
can i do document.innerHTML or document.html.innerHTML?
[I'm bypassing cakephp here!]

i don’t think you can edit the html tag directly like that. i don’t know what cakephp is either

php framework
hmmm
[i hate frameworks]

i think you can replace page with document.write also

document.write(‘text’) ?

i don’t remember the details, but under some circumstances, it just add to the end of the page, and under other circumstances it replaces the document
i would google it if I were you, or jsut try it and see

trying

http://www.scalora.org/projects/uriencoder/

nice encoder … used for greasemonkey scripts with 80 chars per line

peepsalot:
i want to catch the same page and replace it with the current
without actually reloading it
so it loads in the background then updates everything

teh1ghool, i don’t know what you’re saying, you just want to refresh a page?

basically but without it messing up the user
i mean
i want it to refresh without it looknig like it, so it loads everything in the background then repalces the page wit the new loaded one

why not just update the parts of the page that need updating

How can I set a single attribute in javascript? For example I want a checkbox to be checked like: input type=checkbox checked. setAttribute( “checked” ) doesn’t work. What does?

Because it use cakephp framework and to assign the vars in the page that has the updated content i need to refresh the entire framework

teh1ghool, i think replacing the document will still cause a little flicker that will be noticeable like a page refresh

right but it won’t be so lnog liek a page refresh
it will just be momentarily, even for people with slow internet
long*
any chance i can do that peepsalot ?

de1, you have to give it a value, in the case of checked, the value is “checked” http://developer.mozilla.org/en/docs/DOM:element.setAttribute
for boolean attributes like that, the value is the same as the attribute name
teh1ghool, document.write doesn’t work?

doesn’t refresh…
so um
no

element, “checked” is alone, unlike type (which can be set by setAttribute( “type”, “checkbox” ). How can I set “checked” or “unchecked” like this?

de1 i told you you give it the attribute name, and the attribute value. in compliant XHTML all attributes have to have values, for attributes like “checked”, the proper value is “checked”
setAttribute(“checked”,”checked”)
or you could just screw all that and say element.checked = true;

ok I tried setAttribute(“checked”,”checked”) and it worked
Ya I was using .checked, but would like to be standars compliant or what not
thanks

yw

i’m having a mental blank. best/most elegant way to traverse tr’s in a table? (dom)
i’ve done this numerous times but can’t find the pages.
wanting to set alternate colour rows on a table as ‘thinly’ as possible (in a server framework that doesnt allow an easy way to do it serverside)

“b0nn” at 71.6.194.243 pasted “regexp” (17 lines) at http://erxz.com/pb/4122

Hi all, I am having trouble with my regexp
I have pasted the relevant code at http://erxz.com/pb/4122

hi im adding tinymce dynamically(using div/js) in a page, but its not showing up the controls..for textarea..
how can i do that

I have a script which don’t work on this #@! internet explorer
http://pastebin.com/m7fbfb9ee any idea what could be wrong ?

dynamically

im = frm_div.appendChild(document.createElement(“img”)) and im.src = ‘uploadlogo/’+document.getElementById(‘hdnLogo’).value; are used to add image to div
Now i wan to reduce the image size while showing in a div

field

field, so it would be like the option tags are directly added to the select field?

because i dont want to directly add em

hmm anyone know how to make tinyMCE leave the html untouched? ie no formatting for the whole document
theres like a million switches for that but easier to ask if someone made it

uh
using dom, how do i delete ALL child nodes of a node?
node.childNodes = null? xD

`empty @ HolySheepy

empty: A function to empty a node of content: function empty(node){ while(node.firstChild) node.removeChild( node.firstChild ); return node }

uh

what type of garbage collector does firefox 2.x use for javascript?

I believe it’s a Mack truck with a 20-tonne pneumatic compactor and a wheelie-bin grab-arm

how can i add new rows to a table ?
with javascript
anyone can show to me a tuturial please ?
im on google only found tuturials for divs

if you can do it with divs, just change the bit that inserts the divs to the table tags

but didnt work

8-)

anyone familiar with tinymce? i need to create an instance of tinymce that doesnt format the html at all, and how to unload it?

hi all, i need a help, how can i do something like the third column in http://www.guardian.co.uk/

I need some advise/pointers about Javascript, character sets, multibyte, and displaying character sets correctly etc. Anyone have any experience with this (I could pay you a little for your time)

afaik it supports multibyte fine
but i have to run, unfortunately

np

i just handle text as it is, works fine when the text is utf8 and documents encoding is set to utf8

Yeah – I can’t do that though
Running Joomla
I need to convert output to windows-1251 (Russian)
— or maybe the answer IS to convert the site to utf8 – there IS aparently a way with Joomla – I will look in to it

hmmm if i have a function x(bla, bla) and i call x(bla) will it fail or will the second bla be un inited?
‘undefined’

try it?

hi, I have seen in many JS codes things like $()something(). Where can I learn about this?
(how is it called…?)

thats usually with a framework like jquery/prototype

but, from the pure syntax point of view, what is it?

where is a good place to announce software ( it is ajax related ) ?

cuco go to #jquery

gracias

that’s invalid syntax

or jquery.com

maybe you mean $(something)

I see this code: $(function() { $(‘#nav’).tabs(1); })

yes, not $(‘#nav’)tabs(1)
$(‘#nav’) is a function call
its result’s tabs method is called
and that’s all inside the definition of a function passed to $

i need to learn much more ;-)

$ is just a function name

there was a site with css menu popups.. I can’t find it back, does anyone remember what I’m talking about? i know it’s been mentioned here plenty of times.

names can contain letters, digits (not at the start), _ and $
you can define a function using var foo = function () { bar(); }

cuco – that is jquery – it is very easy go to their site

this is a very easy reference for jq http://visualjquery.com/1.1.1.html

ugh, jquery gives $ five different meanings

allisnone, suckerfish dropdown menu?
its on the htmldog.com site

devians, thanks
deltab, yea.. they’re sorta ruby fans, ruby does that
they think it’s very smart, I use it, and you get used to it, but it’s not smart at all
it’s similar with most of their methods, there’s probably not a single method that doesn’t accept a myriad variations of its arguments

q. i got this number 0.07440497726202011, which is a percent between 0 and 1, and i would like to round it to 0.07, how can i do that ?

zorg_the_false, Math.round(0.07440497726202011 * 100)
zorg_the_false, Math.round(0.07440497726202011 * 100) / 100 perhaps

yep, i found this using this tech http://www.javascriptkit.com/javatutors/round.shtml
but there is http://www.javascriptkit.com/javatutors/formatnumber.shtml using the number.toFixed(2) doing the same
but this is only for javascript 1.5…
i wasnt aware of those javascript version
how widely deployed is javascript 1.5 ?

“none”
i need it to be off at start

hi all
http://paste2.org/p/6178
the pb is only with IE
it work perfect with FF

verboz solvez… uninstall IE :P

looooooooooooool, i don’t have IE but client have it
:s

yeah… i know that problems
i have it too

dont resolved?

no
www.hdd.com.pt
my progressbar upload is failing
before is working on FF
but fails on IE
i put that working on IE
now failing on FF
is fuckble

looooooooooooooooool
so put the two function
you test navigator
if it’s IE or FF
and call the appropriate function

but now i dont know where is the problem
on FF work with firebug
if i disable firebug not work anymore

ff has its own error console
which runs when firebug is disbled

Wannes but no error
simply not show anything

I am using Google Maps API to get a map into my page, though it only works when i use the non-unicode html encoding, when using unicode and xhtml 1.1 it wont work
anybody know why it behaves like that?

problem resolved
:p

is javascript replacement for flash embedding the way to go?

anyone here with wrecked sleep pattern and chronic fatique

sometimes

it seems more people have javascript enabled these days.. maybe 95%
I know a little php but relatively little javascript. is there an up-to-date tutorial on javascript to get me started?

javascript the definitive guide

thanks

I like w3schools javascript

is it up-to-date?

http://www.imSPAMpro-spaetzuender.de/event.php?id=2 When i change the Content-Type it works (remove the “SPAM” from the URL)

I don’t want to learn bad habbits

you should probably stay away from w3schools

thought so

uuh I hope so, I use it as a reference, never got any wrong or old info so far

it’s getting a little old now it seems

blah
what do you guys use as js reference?
js ref array
`js ref array

anyone know how to turn off all formatting in tinyMCE?

uuhm, how to get the bot to work (see topic)

if i open a text file in a textarea and turn on tinyMCE for that textarea the LF’s etc break

Is it possible (in Safari) to mark a link as visited or unvisited via Javascript?
bIs it possible (in Safari) to mark a link as visited or unvisited via Javascript?/b

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.