Hey guys I am developing a WebOS called XiaOS I am busy writing the code for the terminal but I am coming across

hi guys, i’m trying to use ajax to grab a select box i have generated on a seperate file, so what i was trying to use is div to be updated.innerhtml=RETURN HTML but in Ie this isn’t working it shows the text but not the select box i return

does splice(-1,1) remove the first element of an array?
select?

yes

try .value

hm?

instead of updatinh .innerHTML

with it? alright i’ll try

yeah that’d actually do it
I was thinking textarea

irc://freenode/css
#css
sorry
http://pastebin.ca/639179

The paste 639179 has been copied to http://erxz.com/pb/3836

g’day. Probably a silly question, but does an embedded javascript from someadserver.com have access to the DOM of the page where it is embedded, on example.com
?

can someone help me with this library http://stickmanlabs.com/lightwindow/ ? I have a link that opens a iframe lightwindows in the same page but as this link is in a section that gets reloaded by ajax the events don’t get re’hooked on the link.
I’ve added this code http://rafb.net/p/Nh1MrD30.html in the html fragment that updates the section but it doesn’t work out. can anyone help?

http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_21872844.html ? I’ve got the same issue as this guy, but I don’t want to register for a sex change
any ide whats wrong?

wintercount that doesn’t do anything then when i use the .value

can I re-insert javascript hosting via AJAX?

span doesnt have .value, update its innerHTML with your whole select

wintercounti tried to the response of my ajax is just html hosting and it has a yada yadaselectoptions……/select

doesn’t

it doesn’t show the select in IE for some reason
wintercount any more ideas
anyone hae any insight on how to import an entire select box into IE, it for some reason isn’t work with .innerHTML of the div = to the response text

hihio
:-)

hi guys

have a div

on what webpage can i paste my codes?

how i can insert a picture?

?
idea?

no there is a page where you can post your scripts etc so you can see it..

any one able to access http://validator.w3.org/ ?? the irony of that site being down is too much for belief – must be just me???

function countdown(){
for(a = 0; a = 6; a++){
teller[a] = teller[a]-1;
if(teller[a] 0)
{
document.getElementById(‘counter’).value = “Ready!”;
} else {
var tijd = teller[a];
var uur = parseInt(tijd / 3600);
tijd = tijd – uur * 3600;
var min = parseInt(tijd / 60);

don’t paste!!

tijd = tijd – min * 60;
var sec = tijd;
document.getElementById(‘counter’).value = uur +”:”+ min +”:”+ sec;
}
}
}
whhops sorry
where can i post my codes ?

pastebin.ca
can you load http://validator.w3.org/ ?

Mace[work]: hello
Mace[work]: document.getElementById(\’hilfe_bild\’).innerHTML =\’img src=”/images/hilfe/gallerie/+bild+”\’;
i would like load the variable “bild”
is this correct with +bild+ ?

why are you escaping the ’s?

php

And?

document.getElementById(‘hilfe_bild’).innerHTML =’img src=”/images/hilfe/gallerie/+bild+”‘;
is this ok with ++ ?

http://pastebin.ca/639215 is my code, who can see the fault?

The paste 639215 has been copied to http://erxz.com/pb/3837

document.getElementById(‘hilfe_bild’).innerHTML =’img src=”/images/hilfe/gallerie/’+bild+’”‘;
notice the ‘+ … +’

ok
gracias mi amigo :-)

np

hi

http://erxz.com/pb/3837?wr=on&ln=on&hl=on&submit=Format+it%21 who can see my fault
hi

cell.ondblclick = function() { inputForm(form.input_chid.value); }; it works under firefox properly, but with opera, i got the following error message: message: Statement on line 110: Could not convert undefined or null to object

http://erxz.com/pb/3837?wr=on&ln=on&hl=on&submit=Format+it%21 who can see my fault
help pls

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

hi, is there someone not sleeping ?

Oline, at 14:53?

he means idling
3
not here anyway

so my question
i’d like to use kind of regexp un a document.getelementbyid(some regexp);

and I just want to catch them with getelementbyid

but using “foo*” is not working…
any idea ?

document.getElementById references a _unique_ id, i doubt you can even use regexp, can’t you structure your php better?
either way, /(\f\o\o\_).+/i should do it..
.. might be * in javascript not 100%
use “\d” to be sure

I can put that in getelementbyid directly or I’ve to use regexp function ?
how to use \d ?

I wouldn’t dare say, it sounds like a horrible mess
/(\f\o\o\_)\d+/i

ok let’s try

Structure you’re php better is my advice.
your*

but how ?
I need to have each id different

Use loops and increment a variable on each itteration then you know where to start and finish

hum

so foo_1, foo_2, foo_3
etc

i see

Then when you have an actual structure you can go about making it a little more complex and more suited to what you’re doing.
Don’t forget php can talk to JavaScript so you can tell any calls where to look from what you have php echo out

hum

document.getElementById(‘php echo $foo; ?’); ….

I’ve to do inline script for that
why not

Don’t forget to comment it out properly, but yes why not indeed.
You can include .php files as javascript ones too.
Just like you would another javascript hosting file, just use .php instead of .js

hehe
what a trick

I use inline but w/e

w/e ?
what does that mean ?

whatever

ok
thx for your advice

np
too busy waiting for this god damn validator to load
it’s worse than the london underground

a DOM validator for js ?

http://validator.w3.org
a href=”http://validator.w3.org”http://validator.w3.org/a

it’s new design

it sucks

why ?

just because

The bwshare module will refuse your requests for the next 40 seconds.
You have made too many requests per second.
ok … :s

i can make one request per hour
(to the validator)

well yeah that sucks :s

indeed

do you know how they do their smooth effect on the rolling menu ?

fields all have the same id=”foo” or does that work only with name=”foo”?

id’s are unique per page

vlt, ID in HTML is unique

hello !

why do this give the error as.concat is not a function ?
var as = new Array;
as = li.getElementsByTagName(‘a’);
var strongs = new Array;
strongs = li.getElementsByTagName(’strong’); // self links
var links = as.concat(strongs);

getElementsByTagName returns a DOM Element Collection. Not an array

Thank you. So if I assign a (unique) id tag to a radio input field can I access it from JS’s document.getElementById() function?

thanks Munter

how can i delete a div from the dom?

guys, how can I resize a picture with javascript

Change its width and height?

removeElement

element.removeElement?

no, resize it so that it looks nice, not stretched, is it possible?

how can I check if javascript is enable?

Well, you’d need the source image size and this is kind of unpossible to me.

Maybe another way useful for you would be do simply not display it. (element.style.display=”none”

noscript/noscript
That could lead to leaks…

how?

You create divs, you don’t remove them… leak.

Jafet. wrong.

Also ice floats on water.

is that possible to do forward declaration in javascript ?

Never said he shouldn’t remove them.

Just pointing out.
“forward declaration”?

“_Maybe_ another way useful for”
well, fine, but still wrong.

Functions are first-class objects in Javascript and employ closures I think.

Jafet, writing the call of a function before declaring it

var divs = document.getElementsByTagName(‘div’); for (div in divs) { alert(div.id); } — what’s wrong with this code? i only got an “undefined” alert, but i have many divs in my code

Functions are first-class objects in Javascript. Meaning they are lazily evaluated/closed and the interpreter never actucally checks until you try to run them.

message: Statement on line 1: Reference to undefined variable: ShowHideClip

You tried to call it before it was created?

yep

Hey guys, how can I import a js file from another js file?

I’ve to wait the end of a php script to know a number of iteration and after I give it inside the js

The interpreter has to reach and parse the function before you can call it…
Put these functions in the global head/head, maybe.

that’s why I wanted to know if js could do forward declaration

Oh, that’s what you meant.

Jafet, nop I can’t do that :s

And why not, dahling?

because when the js will be called from the navigator, it won’t be able to reach the value of the iterator at the end of the php script
It’ll find another solution
what document.getelementbyid(“foo”); will return if foo is not set yet ?

“navigator”? “iterator”?
Undefined, I think.
(Yes, “Undefined”.)

ok thx

hey, is there any way to get the name of the file that is executing the JS script?

I will check this undefined without using the php iterator value

hmmmmm
is it just me or are functions not comatible with conditional statements in javascript??
http://pastebin.ca/639290

Mace[work]: The paste 639290 has been copied to http://erxz.com/pb/3838

it tells me “syntax error”

Is there a way to test if there’s a pop blocker?

Good morning all. I’m having an issue with a set of selectboxes generated via JS. For some reason, the option after the selected option seems to be a duplicate of the selected option rather than the following number/day. http://beta.hotelchatter.com/hotel/ian/206051 the selectbox is being populated by this script http://beta.hotelchatter.com/js/hotelscombined_setdate Any ideas what’s going on
here?

how can i extend cookie timeout from javascript

is there any way to get the name of the file that is executing the JS script?

Sure. If the pop-up doesn’t load, there is a pop-up blocker.

you need to read, and rewrite the cookie to set a different timeout date
just loop through them and write them out again with the new date

Have the server-side script serving the pop-up check with the scripts serving the main content.

wtf

http://pastebin.ca/639300 , when you type in after it outputs the lastIndexOf becomes -1

“String contains an invalid character”
td1.appendChild(document.createElement(‘input type=”text” size=2 maxlength=3 name=”reps” /’))
what’s wrong with that

hey guys

Dont you need to escape the qoutes?

The paste 639300 has been copied to http://erxz.com/pb/3839

hmm
i need to import a variable from window.parent into window.frames[0] – any advice?
window.frames.parent*

there are a bunch of “getElement…” functions out there for each browser, which ones should I rely on when writing transbrowser code?

or window.frames.top

escaping the quotes doesn’t work
080/egym/include/js/default.js Line:
the line is td1.appendChild(document.createElement(‘input type=\”text\” size=2 maxlength=3 name=\”reps\” /’))

how can i create a new empty array, and how can i add a new element the end of it?

var=array();

Array.push( foo, bar);

var.push(myvalue)
yeah

$array[] = $foo;

that works too

leave php alone :P

thx

ARG.
how the hell does one add a row to a table in javascript :|

addchild a TR to the TBODY?

Dance around a poster of David Hasselhoff seven times calling out “append thee!” to the computer screen.

To add cells/rows to a table use the insertRow insertCell methods.

how do i include javascript within javascript?
create a script tag?

Sounds like you are on a wrong path

not really
i’m trying to make this as easy as possible. a webmaster should only have to include my javascript and then mine includes its dependencies

it is easy… sec. pasting code

create a script tag or what?

http://pastebin.ca/639342

The paste 639342 has been copied to http://erxz.com/pb/3840

yeah

k
already been doing that for cross site scripting
thx

woah, phpwner is still around, lol
wait…. waaaaaaait….
memory borked.
heh.
phpwner != phpboy

yeah

is there any way to convert a text string to a number string? I mean convert something like “hello” to “0374807″

And what would “bonjour” convert to?

[Jafet] ha ha ha que gracioso

is there an easy way to clear the value of a text input field

inputfield.value = ”;

i got an error from firebug that told me i had bad left-hand assignment

why won’t firebug break at my breakpoints? no errors occur. i can’t even get to the first line in the window.onload event handler function.

why is this code snippet not working in IE? http://pastebin.ca/639382

The paste 639382 has been copied to http://erxz.com/pb/3842

is there a method that allows me to get the HTML for an element object? not the innerHTML, but the whole lot

hi

can i browse CSS classes by javascript?
i tried document.body.style.fontSize but it’s empty, while in .css i have BODY {font-size: 10px;}

object.style only gives you the inline styles

yes that’s what i figured
how can i browse the .css file

tags in head, and then pare the innerHTML of the style to get hold of that value :p

files

nm found it finally

ohw?
how?

if( window.getComputedStyle ) { return window.getComputedStyle(element,null); } else if( oElement.currentStyle ) { return element.currentStyle; }
haven’t tested yet

That doesnt give you relative units

*shrug* works for me

anyone in here work with google maps ever?

Hello, is there a way to set a width/height to a background image?

CSS

sure, but what should I use?
background-width

You cant

ok, then I will have to create different images

what exactly are you trying to do?

Yup, use the power of imagemagick!

cause you can set the width of a div and set its background image

But that’ll just have it repeat.

Im talking about the background iamge

i understand that
you can create a container div

you dont get me

and set the background image of it to your bg image

Im not talking about DIV
the image is inside a DIV right now

okay

I want to resize the image, not the div
but my solution will be to have different css files

you want to make the image bigger or smaller
?

with different image sizes
sure

that wasn’t a yes or no questions…
s/questions/question

but my solution will be to have different css files and different image sizes.
and just load the corresponding css file

I don’t think you’re getting me though

thats the only way I think its possible
I do, but what youre saying is not what I want

Why don’t you give us a little more detail

I know I can have a div with a background image and resize it, but I want the full image to be shown (not just cutted)
Munter gave me the right answer.

You cant

thats all I wanted to know :]

Can i get a reference to the iframe for the current document in the parent document without having an id on the iframe?

how many iframes do you have?

howdy, anyone know is there a way to set an input box to its default className?

i need to get the self-iframe of the iframe i’m currently in, from within the iframe
so i can resize it
just 1, but the event is inside the iframe, not the parent document

parent.frames[0]….

right.. but i have 3 :p
Lol

no “name” attribute ?
no “id” ?
parent.frames[
sory

was trying without, but i could work around if there's no property to window or document that allows what i need

parent.frames['name']…
if you have more than one, you need to set an id/name to it, to know which one youre referencing
yourInput.className = ”;

what about window.frameElement ?

nope
you need to get it from the parent

www.eyecandy.be/nightlife — check the ‘Flyers’ why wont the javascript work??

window.frameElement
Returns the element in which the window is embedded, or null if the window is not embedded.
sounds right to me…

im back

that’s my lesson from taking advice from someone wanting to set width on a background image

hi

http://www.eyecandy.be/test/
why wont this javascript work?

hey
I’m having a problem with toUTCString();
5
and it is wrong
5
GMT*

heh

so, what’s wrong there?

is timezone set correctly?

set where, on my PC?

sure

yeah GMT+1
1836 over here
8 in
8

hm

hi, some sites have script src=’some_file.js?12′, what does the part after ? do?

does :digit: work in js regexps?

http://www.eyecandy.be/test/ — why wont this javascript work when clicking the link?

Don’t think so, you use \d

cool, thanks

Hi

Nothing necessarily, it’s a GET variable

odd, :word: does

Who know Jcarroussel ?

Really? Hm

Jacaroussel

/:digit:/.test(“5″)

false

so how would JS get the value? is it similar to php?

grrr

Twey!

JCaroussel

No, no :digit:

I SEE YOU!

Hey :-)

/:word:/.test(“boobies”);

false

element that included it, I guess.

No :word: either.

weird, cos that works for me in moz

Heh
Must be new

well, actually, haven’t tried ‘boobies’

buubot’s version of SpiderMonkey is rather old.

Stored ’s version of SpiderMonkey

Hehe

perv :P

yep, it works

:digit: might work there too, then, but I’d stick with \d and \w for backwards-compatibility.

hey everyone

yeah, same here

hello

Hi RockerMONO

would foo= /(*!)*/; foo = foo.replace(foo,$1); work?

what’s up?

oops
i mean

chillin

would foo= /(*!)*/; bar = bar.replace(foo,$1); work?

– does javascript have some sort of includes behavior
where I can import one js file into another

script type=”text/javascript” src=file.js

‘$1′ would, I believe
No

doh.

Shak_wrk said *inside another*

started writing before i saw that

“hello”.replace(/(l..)/, ‘$1′);

hello

ah ok =]

“hello”.replace(/(l..)/, ”);

he

Well.. apache has let me down

Hm

and now, so has js

Haha
Awww.

lol

haha j/k

cookie != candy

.. Ò.o

you wish :P

“hello”.replace(/(..l)/,’1′).replace(/(l.)/,’2′);

12

Hehe

hm

Oh, maybe it’s…

:p

“hello”.replace(/(l..)/, ‘\\1′);

he\1

No :-\
“hello”.replace(/(l..)/, ‘\1′);
No :-\
Dammit, there *is* some way to do this

whatcha tryin to do?

well, I’ll start trying to mess around and see if i can accomplish it

“hello”.replace(/(l..)/, function(a, b, c) {return b; });

hello

Oh

nice

haha

“hello”.replace(/he(l..)/, ‘$1′);

llo

Less British slang, please.

Right the first time, just structured the query such that it didn’t change the damn string .

wouldn’t that be ‘ello?

Haha

no
‘lo is also commonly used
fucking intarweb contractions :p

haha

it’s worse when coming from a foreigner

its just a series of tubes

“hello”.replace(/(h)(e)ll(o)/, ‘w$3tc$1$2r’);

wotcher

NO! it’s entarweb

because you have no idea what the fuck they might be saying

http://www.eyecandy.be/test/ — why wont this javascript work when clicking the link?

how do i take frames out of a site?

RockerMONO, UGGH!

lol
you know why?

BECAUSE YOU ENTAR IN!?!?!?
s/IN/IT/

Entarweb Eplodar
lol

I think you mean

*Explodar

ASSPLODAR

hm
yea
Entarweb Assploder

BECAUSE IT SO FREQUENTLY, ASSPLODES!

haha

duh :P

yup
=p

Anyway, yeah
fuck the intarweb
and fuck the 2-3pages of required IE css hax required for a simple webpage!
:[

it Entars the Interweb so it becomes the Entarweb
wha?!

yeah yeah
I got that :p
RockerMONO, oh, you've never done a webpage before?
:p
In this day and age :p

i hardly use any hacks to make my pages IE friendly

my string im searching is something like "Success!tagdifferent tagblahetc.." i want it to replace everything but the Success! with ""

2+ pages required for ie hax

meh, you just gotta find the right hacks
or a simpler layout =p

why doesn't someone just fucking standardize an import lib of fucking ie hax

hm

str.replace(/(.*)/, '');

[std]iehax.css :P

Heh

Damn, where’s Zeros or reisio when I need a huhu :p

sigh my company wants me to come up with a proposal for some magical javascript framework that gives you all the capabilities of a rich app client side with all these magical features.

wouldn’t be suprised if they already had one

Sembiance!

heya

bwahaha

defer to Jan!

see you in 4 years

Haha

I like the… “rich client side app” …

thnx

rich, is not something I’d ever associate with JavaScript, let alone put in the same sentence…

they’d spend their life getting it working then they’d eventually have to start over when Microsucks decides to upgrade Entarweb Assploder again

it’s such a fracking joke. People have been trying to invent this ‘magical framework’ long before javascript and it’s never ever come true.

huhu

can someone help me for a sec

SPEAK AND YOU SHALL BE HEARD!

just ask your question and we’ll try to help

Tell them you’ll do it when they give you a mermaid

lol here’s the qusetion out of my book. Create a splash page for a Web site. Provide two links: “Frames” and “No Frames”. When a visitor clicks on one of the links, store an appropriate value representing that preference in a cookie named framesPref, then take the visitor to the appropriate
version of the web site, either framed or non-framed. On the next visit, use the value stored in the framesPref cookie to automatically open the app
http://rafb.net/p/vX58uH75.html

right. what’s the issue?

except after reading that, they want me to pick a website that is actually out there, and then either go to that site with frames or no frames

hm

and i guess i misunderstood them and so my code has two different pages, dependant on what you choose
FramePage.html and noFramePage.html

well, try your best, and if you cant get it tell them you couldn’t pass cookies to another domain

lol well how would i go about taking frames out of a site
does anyone understand something about that question that im not?

i think they meant find one with links that already set/unset frames
and kinda work with that
but idk
ask them? =pp
*=p

3 words useless here

clearly
twey

oh yeah my string also has “/”’s is that going to mess it up?

Hmmm?
Nah

if it does, change it to \/ =p

is there any way to take frames out of a site?

i can’t its server embedded code by the host

find the URL of the main frame…. noFrames == that page, frames == the page with the frameset
what are you trying to do with it?
[the string]

http://www.eyecandy.be/test/ — why wont this javascript work when clicking the link?

truncate everything past a certain character

You can also str.substr(0, str.indexOf(“”))

thnx

im not sure im completely following. so for example, the site rafb.net how would i find the main frame, and then the page with the frameset

for one, they aren’t using a frameset….

rafb.net doesn’t have frames. Silly.

whooa my bad

You think we’d use it if it did?

any example sites you know of that use frames?

now its not returning anything

Twey; I sure hope not

kersplooshie.co.r | mcgw.co.nr | whenangelsfall.co.nr | voicelessthoughts.co.nr

script language=’javascript’ src=’https://a12.alphagodaddy.com/hosting_ads/gd01.js’/script

frames are the very samll cousin on the right ankle of the mother that works with the aunt of the guy that cleans SATAN’S unholy car.
(which is a yaris)
so frames are indirectly evil.

i need a shirt that says “PHP killed frames”

ok so if i use voicelessthoughts.co.nr

i need a shirt that says “PHP must die for its crimes”

how do i find the frameless site?

Blasphemy!!

do you have firefox?

yes sir

Mouhaha!

right click, select “This Frame” then “Show Only This Frame” and it’ll go to the main page
or ‘Open Frame In New Tab’

Hear hear!

hey, what did PHP do? =p

No, here!

incoming stupid question…..

hi Romes

hey RockerMONO

can i just do blah.replace(/(.*!).*/,$1)?

so voicelessthoughts.co.nr is the framed site

What are you trying to do? I thought you just wanted to delete everything from the first

http://voicelsthoughts.brinkster.net/ is the not framed site?
correct?

Aye

not working so well

if you have a function, can it have a “this” reference inside it?… as in… can I do this: var x = function () { this.blah(); }; y.x(); ?

script

Yes

yay
ty.

script’; str.substr(0, str.indexOf(”));

Fail!

script’; str.replace(/.*/, ”);

Fail!

What’s the problem?

oh haha forgot to replace str with stringname, im so dumb sometimes

Haha

it has let any nobody try to pretend being a programmer, Second : it has a c-like syntax which makes n00bs think they know C cause they do php, Third : it uses $ to identify variables /pointless ranting

um

You can’t rant about PHP without going into the strings-as-function-pointers bit.
That has to be the worst part.

i know nobody who started PHP and assumes they know anything about C

And create_function().

part i don’t know :P

Ah

RockerMONO i’ve been on irc for too long, don’t mind me

what create_function() ? i’ve never heard of such shit in my life

Twey i also hate having 238 423 functions to do the same job… each being longer than another

Shit it is indeed

yea, and i’ve never heard of it lol

It’s the closest thing PHP has to anonymous functions

they have 3 billions function to do whatever you can’t even think of… and php doesn’t support the Date data type!!!!!

It takes two strings, one for arguments and one for function body
It does now

o.o
that’s worse than shit, that’s like eating shit and then having to speak of it

hm,. been a while i haven’t touched it then heh

And returns a string that is a randomly-generated name of a global function

RockerMONO, Twey, thanks for the help!

Welcome

that’s like putting code in a js eval() :P

PHP5 has a DateTime class
Yeah

check out topicks.info/login.php its not working but has the right code, kinda wacky

Twey oh well at least they got that… but it will surely be another 10 years before all webhost support php 5

Aye, probably

(like some webhost still run on mysql 3.23 or 4.0)

my webhost supports 4.whatevernatively and then 5 if you usea .php5 extension

Twey

StaZ|work, nah, php will end support for php 4 later

SITE ME!

..this year

NORSK! :O
\o/

Daveman, jeg kan snakke norsk til deg

!
Hestkuk!

din misplasserte tulipan

heehee

din laks

bjorninge the problem is that the wehosts panel runs on lower version of php and are stable, if the new version are not 100% retro-compatible i’m expecting a lotn won’t change for a while

takk

StaZ|work, din laks

I’m thinking it’s unlikely but if someone sets a file for upload (using a file input) and it’s a jpg, is it possible to check its dimensions?

doc|work, no, not form javascript

hvordan går det?

thought so, thanks

bjorninge i’m sorry ?

you visit that page?

doc|work, you could use http://no2.php.net/manual/en/function.getimagesize.php or something

haha

StaZ|work, din laks

It’s a non-destructive method

yep, that’s what I’m going to do, wanted to see if I could check client side first as well though :/

Daveman, joda, bra her, hvor er du fra btw?

results = results.substr(0, results.indexOf(“”));

bjorninge Hey parle dans un language que j’comprend.

And don’t use .match() for equality testing, use ===

StaZ|work, Okay, I will :p

parla l’inglese bastardi!
or some such

I actually understood that line, although I don’t speak french :p

bjorninge that would be most appreciated

bjorn, US

ñžgqWKUD!

ok, winner ^

Er, qWf**

o_O

if you really understand that

NIHONGO NO-JUTSU!!!!

man, that looks beautiful in my terminal

Daveman does too

Daveman, du er fra USA? 0o

?????????… :P

ok thnx a lot

Haha

bjorninge so what did that “din laks” means

function () { } syntax to set onload for an object?

hey, at least I’m outspoken

Not really

bjorn, ja :/

why not?

StaZ|work, nothing ..

du er norsk? :P ~

pertinence++;

Because you’re not creating the object
You could always merge the two objects, I guess

Daveman, det stemmer
hva har det seg at du snakker norsk da?

Or, you could just do myobj.onload = function() { /* … */ };

hva gjør du?

?

hva jobber du med?

how come you speak norwegian then?

in my .js file and then the onload event handler is called just by assign var myclass = { }

I have been learning!
I know lots of languages :p

which happens in the .js

Or at least learning them

I don’t do anything, will become a student though
but first, summer vacation

???????????????? :P
bjorn, ah
Storartet!

haha, okay you don’t know where to use the right words yet, though

http://www.eyecandy.be/test/ — why wont this javascript work when clicking the link?

bjorn, need more practice
hard to find a sober norwegian at this time :P ~
or later

you understand swedish as well?

Twey?
No
I try not to
damn swedes :p
I have enough fo them
of

Det er inte svårt
hm
Det är inte svårt

oi

Hmmm?

When I do parseInt(“08″), I sometimes get 0 as the result. Is there a more reliable way to convert it into an int? The “08″ is coming from date functions

Reliant, then you would have to use a regex

or a unicorn

a regex to get rid of the prepended 0 ?

no, to get rid of other characters than numbers
Reliant, aStr.replace(/^[\d]+ /, ”) or something
or newVal = aStr.match(/[\d]+/)

actually, I think I’ll just use a better method to get the month

what do you mean by “sometimes” ?

The 0 causes it to be parsed as octal

hi all, is there a firefox extension to debug the garbage collection of the dom elements?

Explicitly tell parseInt() it’s denary by adding a radix: parseInt(“08″, 10)

yeah, I had tried that
I just replaced the way I get the month, works fine now, probably more reliable now anyway

a 0 means its an octal string? is that a convention js got from somewhere else? cause it seems almost designed to be confusing
`jseval: parseInt(“09″);
dammit
i can never make the stupid bot work
parseInt(“09″);

0

that’s almost as lame as (“” == 0)

Yes, it’s a common convention

http://www.eyecandy.be/test/ — why wont this javascript work when clicking the link?

i hate scripts
put your JS on your test page so we don’t have to go on seeing what your external script are made of
and check your console, the answer might be ther
e

console?

same as window?

;/

actually the link works pretty well in mine…
don’t post NSFW stuff please

nsfw
wth

what does stand 4 NSFW?

Not Safe For Work

oic

you see the javascript StaZ|work ?
strange

i see the “HotGirl”
i got firefox 2.0

yes

works for me too

but you see the javascript?

oh, no

no i don’t

ok thats the problem :P

um, huh?

its like lightbox, but a lighter version of it

source

and faster

what is lightbox ?

fancy modal popup library

and if it’s lightier shouldn’t it be a brightbox or luminescentbox ?
modal popup?

;o

it’s everywhere lately, getting annoying

its nice
:P

the way a lot of people are using it, it takes as long as loading a new page
kills the whole point
btw your joke was terrible :/

hello channel

its not like im gonna use it too much
just cant get it to work

can someone help me with my search loader, it seems to load the images everytime i refresh the page…in other words, they arent caching…. www.capemayrestaurants.com

vinse i’m used to that
i got 265/300 in Bad Humor skill
i don’t recommend this tradskill to anyone, it’s tough to get rich through it
oh, 266!
¬_¬
that’ll make my 267

typical oracle staff

you don’t talk about me right?

are you oracle staff too?

hm no

then nope

ouch…a philoophical cliff…
:P

why doesn’t this work? item.onclick = ‘return myxer.sendUI.retrieve(this);’;
retrieve never gets called

how do you know retrieve isnt getting called?

i break pointed it

link?

but nevermind. it works if i setAttribute() and prefix return in the value

ok

phpwner item.onclick = function () { return myxe….
collink you didn’t have to copy paste my typo :P

StaZ|work, i can’t do that because “this” has a different meaning in that context
i want this as in the element onclick belongs to rather than the parent object of that line of code

maybe… .obclick = function(this) { use this here

adding history events with Really Simple History framwork, i figured out that it wouldn’t work for simplistic usage : use real URLs. How can i add a browser history event in javascript please ? All i need is to add url and title. Of course, i tryed to get into the code of RSH framework which
is very well commented, but it is hard for me, any idea about any simple way to add url+title to t

how should i add onclick events to anchor dynamically (from js)? Using anchor.onClick, doesn’t seem to work

Hey guys, I am developing a WebOS (called XiaOS). I am busy writing the code for the terminal but I am coming across a few problems. Is there a way to search only the last line of a textarea value?

Besides splitting on new lines and grabbing the last line?

could store it in a textarea.lastLine property when you update its value

Hello- I’m trying to get the height of a div that has the height set to auto. How do I accomplish getting the calculated height?

how would you do that?
aslong as it works, alas I am not bothred.
I was thinking about using lastIndexOf and subString to get me the last line but I have no idea how.

how can I add special characters? for example ä when I do document.createTextNode I can’t use them

is scriptaculous for ajax? or is it prototype? none of them?

it’s for javascript
lol
it uses prototype
read up on it
http://script.aculo.us

is there any framework for ajax?

prototype by itself
http://www.prototypejs.org
has really cool and easy AJAX support

is there any difference between single quotes and double quotes in javascript?

iirc no

any preferences on which to use most of the time?

I mainly use double qoutes.

why do you prefer double quotes?

I use double quotes because in most languages single quotes donate a character literal

So do I.

But no, no technical preferences.

ah ok

im looking for an ajax framework

thanks for your input

PHPadam, Try XHR. I mean really, who needs a framework just for ajax?

XHR ?
on the client side, it offers JavaScript functions to send requests to the server. On the server side, it processes the requests, searches for the data, and transmits them to the browser…

Oh right, you want something that does stuff on both server and client.
Try crutches.
Here, I’ll get rid of those pesky legs for you.

crutches?
pesky legs?
my english is that good with slang

Is there a way to see if a value INCLUDES a certain word like ”hello” or somthing.

oh, i understand, well, fu

is there any way to use the same variable in different functions ? something like a global function

I belive that there is.

You may want to look into dojo

I just have no idea how to do so.

BladeSling, No, dojo doesn’t do anything on the server.

damn that twe y ;p
blah

Xyzu, yeah aValue.indexOf(‘theword’) != -1

Thanks, I’ll look it up

Aquaman, yeah, javascript supports global variables. just define a variable like so, before any function defintions: var myvar=’foo’
then you can access it normally inside functions

I have some problems selecting all entries in a select list and post them to a php script. If I select them manually it works fine…

Xandrew, hm
I did that my self
just a day ago
I ended up using hidden fields populated with all of theselectelement.options
basically, you have to have them selected for the values to be sent

Mayby I should say that the options in the list are created by a javascript, but that should work right?

it may depend on the phase of the moon

yeah, but they DO have to be selected to be sent to the php script

Is there a way to chech ONLY the last line of a textarea value in a if statement.

[bjorninge] http://rafb.net/p/3uAvko48.html I declared miGlobal = ‘foo’ and I changed it inside another function but at the end of the script I make an alert of its value and it still returns foo

Xandrew, look at http://dabear.mine.nu/jebbis/ , the applyAllListOptions(list) function

chack*
check*

I have the sourcecode at www.barfly.se/paddit/source.html and the script at www.barfly.se/paddit/script/admin_functions.js

http://rafb.net/p/3uAvko48.html I just dont understand why miGlobal doesnt change to True or False

I’ll try it out. i have done as they descibe in www.thescripts.com/forum/thread89300.html

how can I get the content of a dropdown list? getElement or something?

drkm, a select-tag?
theSelect.value
to get all options in a select, use theSelect.options

“javascript select option”
you should find some good tutorial/articles

to get all options which is selected, you have to iterate over theSelect.options and checking if every element is checked

mmm, this is something I want to do, how can I connect to a GPRS server from a web browser?

man jscript is so temperamental! why would I not be able to call document.forms['getfile'].submit() ? it tells me “object doesnt support this property or method”.

Is there a way to check if the last line of a textarea value is the same as a word and then add stuff to the textarea dpending what you typed.

Anyone around? I’m trying to fire a function that I have its variable…i tried to use eval() on it but no dice
any other suggestions?

eval is evil so they say

”ERROR: 13693: Can’t locate object method “so” via package “they” (perhaps you forgot to load “they”?) at (eval 212) line 1.

what’s your problem?

i.e., foo(true, false, function() { alert(‘hi!’) } )
now in foo i want to call that third parameter

stick () after whatever variable references it

then when im trying to reference the form do I have to reference the div first?

function test(f) { f(); }; test(function() { print(“hi!”); });

hi!undefined

thanks

www.eyecandy.be/test – why wont this javascript library work?

has an element name=submit in it

I have objects being created on the fly, and each object has a name
I want to be able to make a simple hash type structure to contain these objects as they’re created
so that I can call them up by referencing their name
what’s the easiest way to do this?

lmnt, just create a hash?

eh, is there a native way to do it
or do I have to make one from scratch

var foo={} //–there’s a hash for you

how do I insert the new objects though
if I don’t know what the name will be

hm, you would need a key and a value

eval(“foo.”+object.name) = object

”ERROR: syntax error at (eval 212) line 2, at EOF

?

no
foo[object.name] = object;

lmnt, foo['baz' + object.name ] = object
too late

ah alright
fff syntax’d
thanks

I swear to GOD I’m going to assassinate the CEO of Microsoft at the time of IE8’s release if it doesn’t have better error messages….

so then to call it back using a variable name for the key, do I use the bracket notation or the dot notation

bracket

dot notation with eval, rather
alrighty

apart from when working with JSON test, you should hardly ever need to use eval – ever
*text

yar, that’s what I’ve been reading
ahhh that’s so much nicer than the eval ugliness that I thought it was going to have to be
I should get a jscript pocket reference or something

http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference

most excellent
thanks

you’re welcome

http://www.capemayrestaurants.com can someone explain why my search field reloads the page when i press enter/

hello, does anyone here have experience with rico drag n drop?
ive implemented the basic functions into my testbed, http://210.48.68.103 but at the moment its pretty horrid, dragging the boxes between the left and right columns
i need it so if you drag it above or below another div in the container that it goes above or below depending where you drop it
and a few other things… but wonderng if rico is right for that

Is rico still alive?

as far as i can tell :p, im open to suggestions
all i want to be able to do is drag the boxes around the 2 columns but still look nice, as if they were supposed to be there
ive seen a few other frameworks around
like YUI and scriptalicious

Can javascript read the color value of a pixel of an image?

is there a slick javascript way to get the right 4 characters from a string?

the last 4 chars?

is there a string.right(4) ?
string.substring( string.lenth-4, string.length) ?

probably like substr or something, im not too familiar with javascript

iammaxus, No, use canvas

so there is no client-side way for a user to determine within the browser the value of a pixel?
of a specific image
not the whole page

the value of a pixel?

yes, the RGB values

their value is negligible, but added together they make up the image …

lol
well, in my case, each pixel is precious

and if a picture is worth a thousand words, then a pixel is worth a lot less than a word

it might be quite a small picture

well then… ymmv

in that case, a pixel might be worth a word, or at least 6 hexadecimal charracters

it might be a 1×1 image

how Zen
…. “I see your point”

but seriously, can’t javascript read an arbitrary file (I have done about nothing in javascript, sorry for my ignroance)

No

if it can read an arbitrary file, ill becontent with using .bmp for my images and finding the pixel my self

It’s a sandboxed language.

a government agency can zoom into that 1×1 image and get license plates, faces, etc no worries

i know, i dont mean any file stored anywhere on your computer

Or rather, browser implementations are sandboxed.

a file served from the server

Oh, wait a minute.
You could possibly get the file from the server as text and manipulate it as a string.
*possibly*

yes, thats what im thinking

You’d use XHR or a hidden iframe for that most likely.

element)

But damn that’s complicated.

You’d likely be a lot better off offloading the work of finding the colour to the server.

well id like it to be interactive is the problem

I imagine you’re wanting to do some sort of colour picker, etc?

Unless you particularly fancy writing a PNG (or other format) parsing library in JS.

yes

I think it is possible.

ok, i guess i can do an AJAX thing to query the server for a pixels value

YUI has a colour picker.
As far as I know, that’s entirely client-side.

yeah, i dont want a color picker though

Twey, This is picking from and image.
an

i want to use arbitrary images

Ah
OK.

so i guess i can select a pixel and have js ask the server whats at that pixel

iammaxus, You’d get bad lag and lots of tiny requests offloading it to the server.

yeah, i can have it only on click or somethimg, right?

Yeah.

not just following the cursor around constantly

What you could do

i could settle for that

Is download a colour map from the server at the same time as the image
No tiny requests, no lag
Might be a bit bandwidth-intensive though
Or you could split it up like Google Maps does

by color map, you just mean the image in a different format
like in text or osmething

is there a Javascript function that removes an element from an array?

Essentially

or unsets an element, or whatever?

^Migs^: The delete operator?
^Migs^: Or .splice()

alright, well i think i like the querying the server part

oh okay, thanks

next question
i can read my pixel location in reference to a div or something like that, right?
or the image block or whatever
so i can tell where the cursor is on the image

Mmm.

is there an easy way to get a random element from an array like php’s array_rand(), or do I have to use the Math.random or whatever it is in Javascript?

ah, yes, i can get the position
alright, last question, and this one is probably gonna start a fight. but what are the most popular or best AJAX libraries

Dojo
Google Web Toolkit
Prototype

^Migs^: Array.prototype.randomChoice = function() { return this[Math.floor(Math.random() * this.length)]; };
Best for what?
And why would you use AJAX? JSON is much easier to work with, generally

AJAX and JSON are not mutually exclusive

If you’re just looking for beginners’ crutches for using XHR, try Woosta’s JIF

alright, well, i want to do the basic stuff

`jif @ iammaxus

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

AJAX is the best programming language ever invented

forms that update as you input
text/images fetched on user input

^Migs^: Oh, give up trolling already, I thought you’d been banned?

?
wow. Feel free to disagere.
*disagrere
wft
WTF

He was funny the first time. Anyway. iammaxus, those are all things that are done via XMLHttpRequest

yes, i know, im looking for recommendations on a library like you already gave Migs gave me
google web tool kit, dojo, etc

`jif @ iammaxus

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

with widgets, etc
yeah, i got that

Oh, I did send it.

just wanted to hear a little discussion on people’s favorites

It really does depend on what you want to do with it
You said you just wanted AJAX

so whats everyones favourite for drag n drop? :p

For that, I’d recommend JIF
If you want fancy effects and things as well, you might want to try something else — jQuery maybe?

my advice, don’t use GWT
it’s overcomplicated. I couldn’t even figure it out, therefore it must be too hard

yeah, GWT is out because im not doing Java
lol, thanks, Migs

script.acul.ous has some neat things

Dojo has everything you’ll need but has big holes in documentation.

GWT doesn’t actually end up having anything to do with Java

And constant API changes.

DWT is kind of neat. Also for Java.
wasnt’ quite able to get that to work the way I wanted either, but I think that was just because of WebLogic

Mootools is quite nice, I like the way their build page allows you to choose which bits you want so you don’t end up having a load of functions that you don’t need like with Prototype

EXT has less than Dojo but it’s slightly better documented.
For small things mochikit is definitely my choice.

i like jquery from the little i know about it

what does Aptana come wtih?

It’s very designed.

*with

iammaxus, That’s some goood chaining.

chaining?

Dôjô is quite nice, but is really rather huge.

Yeah, that’s pretty much what jQuery is based on.
Chaining calls to methods.
Um, functions

rawwwwwr

No, methods.

Heh
Either’s OK
In Javascript, they’re the same.

Well, yeah.

Why in the world does IE force you to set checked only *after* the input is inserted in the DOM? :’(
*input

when the hell else would you set checked?

wtf wth?

I want to set it all before I change the DOM directly

ah, this chaining is an interesting idea “Each of those individual methods (addClass, show, and html) return the jQuery object, allowing you to continue applying methods to the current set of elements.”

And then be able to insert it all at once.
Why else do you create stuff before you insert it in the DOM…
for kicks?

iammaxus, Then you have to unpick your chains each time you want to use a debugger to step over them or trace something out?

In conclusion, IE is the bane of my existence.
If IE was my child, I would have aborted it.

grimboy_uk, unpick?

Even if it was already born.

iammaxus, Use intermediate variables.

Retroactive abortion, now there’s a concept.

grimboy_uk, i guess so
grimboy_uk, my proper, encapsulated, CS heart seems to say chaining is bad idea, but it looks convenient

And what’s the point anyway? Lines of code as how easy something was to do is just wrong.
Ho hum.

Having CSS selectors is sweet, though.

Convenient if you want to have an e-penis competition with people using other toolkits about who can do something in the least characters.

Heh

Overrated in my opinion but hey.

div.content.active”).removeClass(“active”).addClass(“hidden”);

Simple… better than awkward multi-line code

Oh, no! Teh coad is too long! Line breaks don’t cost money by the way.

Readability.
Thinking about writing that in native JS hurts me.

code = download, download = bandwidth, bandwidth = money!

Touche, doc|home

that’s why I don’t even use spaces!

you have a clone.

doc|home, 1) Bandwidth is cheap 2) Compression

haha, well jquery seems to do what i want and more importantly, the Drupal CMS, which i admire very much, decided to use it

I wasn’t being serious

Oh right, too late.
I mean, it’s too late.

I look at it like the difference between taking 30 seconds to code something and 5.

it’s my home connection
drupal’s shite
its code is a mess

I don’t use drupal… mootools.
woah woah woah
turns out Im’ retard0d

no way?!

YAAWAY

ehe
hehe

for some reason, drupal struck a chord as a framework. My mind esta stupido. Enh.

Nananana
I mean, hahahaha.

lol, I prefer nananana
Reminds me of something like “Shalalalalalala boop she-woop”

Haha

TWEY!
You RETURNED!
reisio :p

MEXICONAISSE

o.O
fat head :p

yes, your head is fat
OOOOH :p

uh huh
keep talkin’ fatty :p

:p

bah, what kinda crappy User Agent doesn’t allow you to fully define the DOM before inserting it??
what a pain. in. the. ASS!

hahahaha
YES

just curious, besides document.write and accessing the dom, how else can you modify a page contents with javascript?

semirage- object.innerhtml ?
page style?

wow, i feel dumb now, i’ve even used that method =P
been a very, very long day
thx though

your welcome, and thanks for making me feel smart

Is it possible to manipulate SVG images with javascript. Was thinking about making some nice graphs but don’t know what technique is the best for it.

yup

absolutely
;google wade johnson SVG instruments

http://www.anomaly.org/wade/index.html

^^
Very good examples

Nice… I have only seen some flash graphs manipulated by javasqript. Thanks sound like a lot of fun…

it is
I just wish more browsers allowed svg inline
(or at least as the src of an img)

try object?

yeah

bummah

I just wanted it simpler .. object for svg only works in FF 1.5+ iirc

NEVER use brinkster.com/brinkster.net for web hosting: the daily bandwidth is nowhere near enough for even debugging

Cool, that looks realy nice…
Thanks Woosta!

lol
thanks for the warning-about-something-I’ve-never-heard-of RockerMONO

well… dont use it =p
i ran out of daily bandwidth after about 10 page views

how do I change the location of an iframe, if I have its element through getElementById?

mmm, where do you want to move it?

theIframe.src=”http://www.the_site.com“;

just .src?

mhm
it might be .href
i’m not positive, haven’t messed with iframes in a while

well that should work I suppose, thanks

if .src doesn’t work try .href =p

I tried .location.href and .document.location.href and neither worked

yea document is available only for the local document lol
aka the one the code is in
i think document.getElementById(“theIframe”).location.href should work too

seems to work
..src that is
thanks!

heh… they left quick =p

whos better? javascript girls or PHP babes

javascript girl-babes

I can’t believe why it is so hard for MS to incorporate the disabled option in drop-down menues…

I mean C goddesses

is it possible to call a function from an iframe if the function is defined in the parent?

it’s not

they’re just retarded
i mean you should be able to figure that out by the fact that they call IE a ‘browser’ =p

Hehe. That was common knowledge…
=?

dont worry guys, im building a new browser, soon at your desktops
i have a catchy name for it areallygoodbrowserforjavascriptandphporevenasp

:p

zOMG! i use entarwebz assploder! my page is really good, why do those other thingies make it load wrong?
=p
^- reminds me of a few people i’ve had to deal with…

internet exploder?

yup =p
but
it’s Interwebs

lol why ?

cuz, idk

in israel we have this for .net = dod met , which means, a dead uncle

punt net

Is there any way to put a timer on hiatus, then restart it again momentarily?

Jan-: not inbuilt

Garh.

Jan-: http://rick.measham.id.au/javascript/timeoutObject.htm

did you notice that if you click options on intenet explorer, the title is “internet options”…….. wtf is internet options? are those all the options for the internet/

var TIMER = new Timeout(function(){ alert(“Timeout”) }, 10000); TIMER.pause(); TIMER.reset(); TIMER.resume(); TIMER.clear() …

hello guys, do you know what I am missing here? document.getElementsByTagName(‘form’).name don’t return the form name=”bla”

Ooooooo.

Toerkeium – getelementbyname ?

let me see

Jan!

Actually, I need an interval, not a timeout.
Come to think of it

use C?

still says “undefined”

.value ?

Aiii

those options are shared by anything using the Windows Internet library (WININET, iirc), and are accessible through the Control Panel

what kind of name are you trying to fetch anyway ?

but with “name” shoulnd’t I specify the form name in the script line?
but with “name” shoulnd’t I specify the form name in the script line?
I do ByTagName because I don’t know the name in form

Right now, you *can* pause while the video is fading in or out.
Right now, you *can* pause while the video is fading in or out.
But if you unpause, it will carry on at the level it was last at.
Rather than finish fading in/out.
If you see what I mean.

:]

and I have to find that the element form has the name of “bla”

Woosta is teh fade mastar!

Toerkeium, what are you trying to fetch ?
why would a form have a name?
why not an input within the form ?

don’t follow you
I need to know the form name in order to do a submit()

input type=”hidden” name=”bla” value=”whatever”

formname.submit() I meant

is there any (non-aesthetic) disadvantage to not using semicolons in javascript?
I find they make code harder to read, myself, and have never seen a browser have issues with not using them.

yeah, but it’s a script included in a file which I will use for several forms
it’s a simple script to do the validation, but as it’s used for many forms, and all forms has different name=”bla”, I need to find the form name so I can do the submit
depending on what page it’s bein executed
do you understand what I mean?

Sometimes JS will assume lines should be joined when you don’t want them to be.

can you give an example?

http://pastebin.ca/639945

The paste 639945 has been copied to http://erxz.com/pb/3847

document.getElementsByTagName(‘form’).form.name ?

Ergh

let me see

What are you trying to do??
Whatever it is, that’s wrong

me Woosta?

PHPadam’s line above

at any rate, i can see there might be special cases where one might manually put in a semicolon, but why would one put one at the end of each line?

oh

`forms

Accessing form elements via JavaScript: Don’t use document.forms[index].elementName or document.formName.elementName. Use document.forms['formName'].elements['elementName'] or document.getElementById(‘formID’).elements['elementName'] or document.getElementById(‘elementID’)

this way
var test = document.getElementsByTagName(‘form’);
alert(test[1].name);

please don’t call forms by their index

I hate when code produces an error message and I say “Godalfuckingmighty, why did the author of this code not put in a more useful error message”
Then I realise I wrote the code.

assuming there is only one for in the page

Gah.

document.forms['formname'] if you want to sue the ‘name’ attribute

the formname is what I need to find

document.gEBI(‘formID’) if you want to use the id attribute
yourForm.name

yourForm ?

What is the context?
an onsubmit handler?

yes

then onsubmit=”this.name”

lets see

(of course, do something with it!)
Ahh .. you’re getting validation rules from a file somewhere?

yes
and for several forms which have different names

then yes onsubmit=”return validate(this)”

excellent, let me try

the validate function will be passed a reference to the form

and what should I set in the document.submit() ?

Which mean you can then do theForm.elements['elementName'].value
document.submit???

at any rate, it looks like there’s nothing compelling a javascript writer to use semicolons, from scanning the spec, etc.

yes, I try to find the formname only to do the submit

you are correct. Semicolons are only needed to disambiguate
why do you need the name to do the submit? You just need the form ..

to do document.formname.submit() ?

Did you mention you knew a better mplayer channel, Woosta?

maybe only lines starting with +, -, ( or [ are affected

or can I do it any other way?

Jan-: Try #tovid
noooooo
stop trying to access forms by their name from the document object
yourForm.submit()

Some site mentioned that putting references to javascript files should be placed at the end of a page to increase speed — but is this good form?

But I don’t get why you ever need to call that

Woosta, let me explain you

rarely

seems like it’s also too browser-implementation-specific for my taste

section, no?

and so on

so after the validation process
I want to do the submit()
but I need to know the name of the form

No
you’re doing it wrong

(I’m designing a small web app framework and want to make sure i get the javascript parts into best-practices)

your validation should be called from onsubmit on the form itself and return true if it succeeds and false if it fails
then use semicolons

it’s called from onclick from a button

a submit button?

don’t do that

oh
I got it

what if they use the enter key to submit the form?

at least for now, I’ll leave them off until a compelling reason comes along. They clutter the code unnecessarily.

are forms supposed to have names?

instead of a button type, I should use a submit type button? and instead of onlick use onsubmit?

make up your mind then. Either you go with best practices or you don’t
yes
but the onsubmit goes in the form tag

I believe best practices = no semicolons if not required by the implementations.

o.O

onsubmit=”return validate(this)”

but, I never use the mouse on forms

?

you need the ‘return’

excellent
gonna try it
I get an “obect expected” error
form style=”margin:0px;” onSubmit=”return dataconfirim(this);”
is that ok?
working!
Woosta, deltab, PHPadam ***** thank you *****

document.getElementById(div).innerHTML = “div id=’images’img src=’images/jdg” + id + “.jpg’ //div” + image_info; why on earth would that not work in ie, but works fine in opera and firefox?

(1) innerHTML sucks

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

Comments are closed.