@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5



Comments:

<0> i forgot about that mode
<1> but you have to be logged in to do that
<1> ht311: get an account
<1> goodie
<0> i have it in my login script and it's been a few years
<1> heh
<1> I forgot you already had a x account.
<1> /silly me
<2> fatbrain: you can be an op without an account?
<2> heh
<0> tricks are for kids
<1> ht311: not really
<0> i suppose someone could op you unless stictop was was set on
<0> which might be the default
<0> i forget



<0> in fact I donno ****
<3> anyone ever done anything with regex replace?
<4> Advocated fatbrain submitted a FF bug about that
<1> Advocated: what do you need to know?
<3> hiya, sorry, back now
<3> well, im trying to use js to input characters/info into a textarea, for things such as making words bold etc
<3> ive done this fine so far, and in my textarea, im presented with:
<3> [B]words[/B]
<3> for example
<3> anyway, i think i now need to use this regex replace
<3> ive searched on google etc, for this, ive found a few examples, but they dont go into that much details, or i dont understand
<3> do you know of any better examples/tutorials that i can look over?
<1> hm, we had this conversation with someone yesterday
<3> fatbrain do you know who? i can possibly check logs
<3> *who with
<3> actually
<3> lol, no i cant
<3> i wasnt in this channel yesterday
<1> text = text.replace("\[img\](.*?)\[/img\]", "<img src='$1' />");
<2> StaZ[work]: nice, leraned one more drug now (jsut a matter of when i will forget it)
<1> sorry, that's not right
<1> text.replace(/\[img\](.*?)\[/img\]/ig, "<img src='$1' />");
<3> ah, i kind of get what that does, how would i p*** my information to that though?
<3> not that, but obviously a modifed version
<1> it's the same with whatever tag you have you replace img with b and in the second, write whatever you want and insert $1 where you want the actual content to be outputted.
<4> ht311 take another one to forget
<3> text.replace(/\[b\](.*?)\[/b\]/b, "<b> ='$1' </b>"); maybe?
<1> why did you replace /ig with /b?
<3> whats /ig then? sorry i ***umed it was a type /ig being /img
<3> :s
<3> also fatbrain what do i actually do with that? where would i place it, i get the concept, just not the useage
<1> i - ignore case, g - global
<1> global makes sure all occurences of [b]...[/b] gets replaced with whatever you want to replace it w ith
<3> ahh i see
<3> because its slightly different to the img, ie not needing src, is this correct: text.replace(/\[b\](.*?)\[/b\]/ig, "<b> '$1' </b>");
<2> it should be "<strong>$1</string>"
<3> oh yea, ofcourse
<2> ops. ... </strong>"
<3> thanks ht311
<3> i just dont get how i p*** the stuff in the textarea to it, or vise versa?
<2> ... document.forms["myform"].mytextarea.value ?
<5> ugly!
<2> and your suggestion is?
<3> ill try out document.forms["myform"].mytextarea.value then
<3> is it document.forms["myform"].mytextarea.value = or ... = document.forms["myform"].mytextarea.value
<2> it is read/write
<3> so read in, write out
<3> ive created a function, tried the code, but i think its wrong, does this look partly correct?
<3> document.form1["form1"].textarea.value = text.replace(/\[b\](.*?)\[/b\]/ig, ""<strong>$1</strong>");
<2> var elmref = document.form1["form1"].mytextarea; elmref.value = elmref.value.replace .......
<6> Aider moi je suis dans la mmmmmmmmmm crime sa ne fonctionne pas aider moi j'ai un scrip que je veux metrre dans ma page mais je veux que cela fonctionne avec mailto aider moi
<7> english svp
<7> and read the channel rules: http://www.javascript-channel.com/Wiki.jsp?page=ChannelRules#code
<6> ok i have a script and I want to put on my page and it not working, I would like to run whit mailto hepl me please
<7> ask the guy who wrote the script
<3> ht311 sorry for the Q's all the time. i ammended that, but tried running the page, and it doesnt do anything at all when i call the function. Ive pasted it to pastebin for easier layout, but am really stumped: http://pastebin.com/556370
<3> ive removed a " from here too: ""<strong>
<3> it just seems to do nothing at all
<7> Advocated: document.forms["form1"].textarea



<3> changed that now, it did effect the textarea, it started with:
<3> [B]test[/B]
<3> i run the function, and: ac
<3> actually, it didnt do anything
<7> don't you need to escape the \ in the \[/b\]
<7> also, doens't line 6 have missmatched quotes?
<7> sloppy
<3> yea, i already sorted that
<3> do you have to escape the \ though? (/\[b\](.*?)\[/b\]/ig, "<strong>$1</strong>"); it does in the firstcase, but not the 2nd or 3rd
<1> Ing007: don't privmsg!
<7> Advocated: i'm not sure, i tested and it worked with and without as well.
<3> so that is the correct syntax: elmref.value = elmref.value.replace(/\[b\](.*?)\[/b\]/ig, "<strong>$1</strong>");
<7> Slovaks 1 Russia 0
<3> just cant work out why its not workin
<7> Slovaks 1 Russia 1
<3> should that code actually insert the text <strong>MYWORD</strong> into my textarea? im ***uming it should
<7> Kovalev scores. Slovaks 1 Russia 2
<8> Tchechenia genocide Slovaks 0 - 1 Russia
<3> :/
<7> Advocated: Error: invalid flag after regular expression
<3> are the b's in the right place: [b\](.*?)\[/b\] because im setting it to be [b]words[/b]
<3> furtive does it highlight the word/section thats invalid?
<7> get your own script debugger, Mr. Lazy :-P
<3> lol, can you recommend any? never done any js before
<9> the webdeveloper toolbar for firefox helps
<7> firefox has one built in
<7> heh
<3> didnt know that
<7> i've got it working now
<7> it was exactly what i said before
<3> about the escape characters?
<7> [14:02] <7> Advocated: document.forms["form1"].textarea
<7> [14:06] <7> don't you need to escape the \ in the \[/b\]
<7> [14:07] <7> also, doens't line 6 have missmatched quotes?
<3> well, sorted the document.forms bit: var elmref = document.forms["form1"].textarea;
<3> removed the extra " on line 6
<3> so must be the escape bit
<3> but to escape you need to do /\ right?
<7> \n \r \\ \/ see a pattern yet?
<3> ahh
<7> sorry, my line was wrong before, it should have said: don't you need to escape the / in the \[/b\]
<3> sorted
<3> <strong>test</strong>
<3> :)
<3> thanks furtive
<7> np
<10> Hi
<10> may I have any support with this syntax
<10> boxdiv.style.left = left - 100;
<11> 1) what is the value of "left" 2) add 'px' to the end
<10> Nvm i got it
<10> Ty
<10> im using this
<10> var contents = document.createElement('iframe');
<10> contents.src works, but instead
<10> i'd like to do document.write inside it,
<10> Any idea ?
<10> im doing things like this inside it
<10> contents.scrolling = 'no';
<10> contents.frameBorder = '0';
<10> its an absolute popup box
<11> try this: contents.name = 'moo'; window.frames['moo'].document.write('stuff');
<11> sounds like something you shouldn't be using <iframe> for though
<10> i found it sorry
<10> contents.contentWindow.document.write('e');
<12> http://www.world4ch.org/read.php/prog/1139975800/ <-- My question.
<2> read --> "This is terrible, you haven't even explained in what way it "won't work." How is anyone supposed to help?"
<11> heh
<12> read --> "The section "post" still shows up."
<11> try giving the URL to the code
<2> ***umber getCookie is you function, it most likly to return string. it won't equal to 1
<2> s/***ume
<11> even if it was doing a type sensitive comparison, that would still make it hide it every time though :p


Name:

Comments:

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






Return to #javascript
or
Go to some related logs:

#javascript
#london
#linux
proxy settings in linux
#MissKitten
printf C2022
dj nheaven
nforce alsamixer subwoofer
#london
wicket put java applet



Home  |  disclaimer  |  contact  |  submit quotes