@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17



Comments:

<0> deufo, b0at (I think) had a cool site where he used a timer (IIRC) to capture document.location changing to emulate forward/back
<1> can i use a wait in JS?
<0> no
<0> you can use setInterval
<1> so it waits for e.g. 4 seconds
<0> of course you'll want to clean it. and you'll need to use a callback style of code.
<1> k
<2> hrmmm...
<2> how do I use a for loop to run through each elementtype in a document?
<2> I've got allSpan = document.getElementsByTag('span'); which should contains all the spans in the body
<3> getElementsByTagName("*")
<2> then I want to do for (var i in allSpan) and it complains immediate that: Object doesn't support this property or method
<2> I only want to get the span elements though
<2> oh I see a typo maybe that's my problem, thanks dorward
<4> hi all
<4> anyone help with some postcode validation for UK postcodes



<4> i need to add it to this code:
<4> http://pastebin.ca/110071
<5> The paste 110071 has been copied to: http://erxz.com/pb/2443
<6> wtf..?
<4> ?
<6> {/literal}{$lng.txt_error_ca_zip_code|replace:"'":"\'"}{literal}'
<6> wtf is that supposed to be?
<4> smartycode
<4> php smarty
<6> and what's the realtion to javascript?
<4> that file is javascript
<4> that bit u pasted is just for the alerts on failed validations
<4> in specific language
<2> yeah TheSeer I tried to read Smarty and decided that it's a whole new language
<3> No, it would be JavaScript if you ran Smarty over it.
<6> anyway.. what's the problem with the code?
<4> {literal}{/literal}
<4> quite "literally" means it takes it as is in those tags
<4> and doesnt attempt to parse the stuff inside as Smarty code
<2> he wants a UK postcode validator function
<4> TheSeer It doesnt validate against UK postcodes
<6> .oO( why can't people use xsl? that's at least readable.. .)
<4> TheSeer Its not my choice to make ;)
<7> Hello, I have a slight problem
<4> imhotepp don't we all :)
<7> i have a working submitLinkForm() method, which works fine likw this
<6> MarkH_UK: well.. i don't see anything that relates to UK.. so just add it
<4> ummm
<4> any example code?
<7> <a href="javascript:submitLinkForm()">Next</a>
<2> check out http://www.phil-taylor.com/fvalidate/
<7> but this doesnt work
<7> <a onclick="submitLinkForm()" href="{$contextlisterurl}act,act_nextpage">Next</a>
<7> why cant I use onclick
<6> onclick="submitLinkForm(); return false"
<3> imhotepp: I'm guessing submitLinkForm() will submit a form (and "argh. use a submit button"). You can't submit a form AND go to a URL at the same time.
<2> it looks like he has WAY more code than you actually need, but your solution is in there I'm sure
<6> hence the "return false;"
<7> Dorward: why not? This is crucial to my application
<2> hrmm it doesn't seem to work let me find another one
<3> imhotepp: One window. One document. You can't load two documents in a window at the same time.
<7> submit the form first and go to the url next?
<3> imhotepp: When you submit the form, the browser goes to the URL in the form's action.
<3> imhotepp: As it does so, it leaves the current page.
<2> MarkH_UK: check out http://javascript.internet.com/forms/
<7> in fact its the same url, i just want to force it to got o that url and submit the form to it
<3> imhotepp: So just submit the form. <input type="submit" value="Next">.
<2> or go straight to: http://javascript.internet.com/forms/uk-postcode-validation.html
<7> I have many links in the page, i want them all to submit the form
<7> can I use js to change the form's action?
<3> imhotepp: So? Replace them all with submit buttons.
<7> Doward:not an option
<3> imhotepp: Not sanely. You can have your server side script return a redirect response though.
<4> dwees kk
<4> dwees thanks
<8> HI guys
<7> Cant I use DOM to modify that property?
<8> I've a little question
<3> imhotepp: Yes, but it isn't sane. Its too fragile. Having the server side script return a redirect response is a much better idea.
<7> something like document.myform.action="blAH"?
<8> this script does not work as well, it is a little function with the eval look here: http://pastie.caboo.se/6985



<2> how do I run through each reference in a DOM? I've got allSpan = document.getElementsByTagName("*");
<9> ./J #css
<9> oops
<8> it's very strange
<2> now I want to collect the individual ids of each one
<10> Michelangelo: try this: http://pastie.caboo.se/6990
<2> and cycle through the entire list
<2> is there a proper format for for (for i in allSpan) where it won't complain?
<8> Hi tobie
<8> what are the differences
<10> sorry typed back into #prototype
<7> so is this the correct property document.myform.action?
<11> ok folks ... i need some help ... i've been at this for a couple of days now, and it just shouldn't be that hard
<11> i've got a textbox defined <input type="textbox" value="0" name="foo">
<11> notice that the original value of the box is 0
<11> i'd like to wait 5 seconds, and then change it to 1
<11> then increment its value every second (say) until it reaches 10
<11> once it reaches 10, i'd like it to pause again for 5 seconds and then start counting down to 0 with 1 second between each number
<11> once it reaches 0, it should pause 5 seconds (again) and the whole process repeats
<11> i would appreciate any help anyone could offer on this problem
<2> have you created the pause for 5 seconds function?
<2> tlhiv: check out http://www.webmonkey.com/webmonkey/98/29/index2a_page2.html for an example of this
<11> dwees: sorry ... was occupied with something else
<2> there's an example of doing timeouts on that page
<2> check it out and see if it answers your question
<11> i know all about setTimeout and setInterval
<11> i've been tinkering with those for a while now ... the problem is they return to the function that called them immediately
<2> instead of waiting you mean?
<11> yes
<12> Is there a way to tell if a function exists?
<13> what do you mean?
<13> you could use if ("fooFunction" in this), I guess
<2> aaah I see what it does
<2> it continues the function, then returns when it's done
<11> right
<11> what ... setTimeout doesn't
<11> or it doesn't appear to
<2> and then in 1000 milliseconds it issues a now useless command
<2> what I mean is instead of actually pausing the script it just sets something to happen in the future
<11> right
<11> then continues immediately
<11> i would like it to "execute now" ... and the wait until the timeout value is reached and then continue
<14> Hey, I have an img element as my reference which is inside a td, I want to remove the corresponding tr... what's the best way about doing that? ***uming that the parentNode may not always be directly the td
<2> http://www.sean.co.uk/a/webdesign/javascriptdelay.shtm this has a pause script someone else has written if that helps
<2> you just call it with the number of milliseconds you want it to run for
<11> dwees: yeah i've tried this ... it's *VERY* computer intensive
<15> dwees: That's a very bad idea.
<15> dwees: In a lot of browsers, Javascript can lock up the whole browser if it does something like that.
<2> because it eats up memory for no reason?
<15> Yes
<15> tlhiv: You have to use setTimeout(). With some creativity, it can cater to all your waiting needs. :-)
<11> Twey_: i've been trying to be creative for 2 solid days now :-(
<11> i'm coming up empty
<15> tlhiv: What're you trying to do?
<15> fred|work: Walk the DOM tree until you get to a TR.
<2> what about setTimeout("document.getElementsById('textarea').innerhtml=i,1000*i); inside a 1 to 10 for loop?
<2> oops missing a quote in there
<11> again ... i think the for loop might be a bad idea because of memory issues
<2> he wants to change a number from 1 then to 2, etc...
<11> Twey_: do you have a history in your chat client, if so scroll up ... if not i'll reexplain
<11> dwees: that's not the problem
<2> so he's going to need a forloop of some sort, or a lot of extra code
<15> tlhiv: I do, I just can't find where you mentioned it :-P
<11> ok ... one sec
<11> http://www.tlhiv.org/tmp/help
<11> there's the log where i asked
<1> anyone has an idea why: setTimeout("var string = document.forms["urlForm"].elements["embed_code"].value; document.write('<textarea rows="5" cols="60">' + string + '</textarea>');",3000); doesn't work?
<15> tlhiv: I see -- tricky, but quote possible
<15> tfp: Mucked-up quites.
<2> have you checked all of your quotes?
<15> Uh
<15> I mean
<15> Rofl.
<3> tfp: "Eugh". Seriously - use createTextNode and appendChild instead of document.write. Its a lot cleaner, simpler, and easier.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #javascript
or
Go to some related logs:

#perl
how to config vnc
#ai
mii-tool permanent
#css
nicotine slsk console
#perl
initng socket
ubuntu nvidia tnt2 module does not exist
#osdev



Home  |  disclaimer  |  contact  |  submit quotes