@# 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> Hi, im writing a function that converts bbcodes to html but I am having trouble with the regexes
<0> text = text.replace("\[url='(.*)'\](.*)\[/url\]|\[url=(.*)\](.*)\[/url\]", "<a href='$1'>$2</a>");
<0> [url=http://www.com]a link[/url] should be replaced by <a href="http://www.com">a link</a>
<0> the regex works within any perl regex testing programs but not javascript
<1> Javascript variables are not denoted by a $
<0> Sorry I had it so that it would run within a regex testing program. if I do text.match("\[url='(.*)'\](.*)\[/url\]|\[url=(.*)\](.*)\[/url\]"); I still get nothing.
<0> The problem is the repeating characters(.*) if I do text.replace("\[url\]", "<a>"); that will work but not the repeating characters
<2> ?
<2> denoted by a $?
<0> Sorry fatbrain, ignore those variables, the problem is with the Regex and javascripts implementation of it
<2> what variables?
<0> $1 and $2
<3> can you Clone the games from www.doizece.ro ? ready to pay $$ msg me Please. Coders :)
<2> qwertySDF: that's not a variable, it's a replacement *anchor*.
<2> $1 is replace with capture-group #1
<0> thanks fatbrain, however the problem at the moment is with the repeating characters within the regex. even if I do a text.match it doesnt seem to work



<0> ok for another example:
<0> text = text.replace("\[img\](.*)\[/img\]", "<img src='#1' />");
<2> text.replace("\[img\](.*?)\[/img\]", "<img src='$1' />");
<0> ok so I have the following:
<0> test = "[img]http://www.com/image.jpg[/img]";;
<0> test.replace("\[img\](.*?)\[/img\]", "<img src='#1' />");
<0> alert(test);
<0> I am getting a popup box with [img]http://www.com/image.jpg[/img] when I should get <img src="http://www.com/image.jpg">;
<2> FFS, you'r not listening
<2> text = "[img]http://www.com/image.jpg[/img]";; text = text.replace("\[img\](.*?)\[/img\]", "<img src='$1' />"); alert(text);
<4> sorry im not in the mood
<5> no apology needed ;)
<2> got movement> https://bugzilla.mozilla.org/show_bug.cgi?id=327170
<4> You are not authorized to access bug #327170. To see this bug, you must first log in to an account with the appropriate permissions.
<4> i cant be arsed
<2> ah
<2> hehe, it's flaged as *critical* a two line script that automagicly crashes the browser
<4> oh
<4> whats the lines Prv please
<6> I don't got time for pain, the only pain I got time for is the pain I put on fools who don't know what time it is.
<7> http://slayeroffice.com/code/imageCrossFade/
<8> anyone have the song RoyGbic
<8> Roygbiv* its by Boards of Canada
<8> trying to figure out what the lyrics are that the girls sing in that song.. can't make it out. anyone know?
<7> if you want the lyrics, ask google, if you want the song, ask another channel
<8> lol, sorry :p
<8> heh. google doesn't know, i've checked. but i won't press on it any further
<9> btw, the words are from rock me amadeus
<7> really?
<7> oh, you must me talking about the BoC song
<9> sorry, was thinking of Nlogax
<9> also BoC
<7> how ya doing?
<9> much better
<9> prolly going back to work tomorrow
<7> glad to hear
<7> you were out of work? sick?
<9> yeah, thought that's what you meant
<7> indirectly, you were quiet lately and figured you were busy
<9> http://www.nebiru.com/downloads/Nlogax.mp3
<9> always busy ;)
<9> BoC makes fine background music when coding
<9> but i only break to Newcleus
<10> hey guys
<7> hi
<10> i am trying to use javascript to load images to a div
<10> and the code i have isn't working
<10> hi furtive
<10> the code i am using is <li><span onmouseover="showImage('/Feb/images/img2.jpg',this)"> <a href="Feb/images/img2.jpg" onclick="var img = document.getElementsById('Content');
<10> img.src = this.href; img.title = this.title; return false;">2</a></span></li>
<7> http://www.huddletogether.com/projects/lightbox/
<10> hmmm
<7> yeah
<10> the example loads it outside the current page
<10> my site is lifethroughpictures.org
<10> and i need it where user's click on a number then it loads the pic in that black area
<10> the "content" div
<7> the onclick in your <a href=" ... makes no sense
<10> yea well
<11> i have a very ez question. I really dont know why it doesnt work, this is so simple, is there anywhere i could past the script?



<10> thats what somebody told me to do
<10> i knew it wasn't all right :(
<7> well, it works but overly complicated if you ask me, i'd use a function
<7> Fleed: http://www.nomorepasting.com
<10> can you help me with that?
<10> i don't know js that well
<7> adam, is your onclick all on one line?
<7> cause you can't break lines like that
<11> ok I see the "0" but i dont see "1" or "2" http://www.nomorepasting.com/paste.php?pasteID=57679
<10> oh it needs to be?
<7> yep
<10> ok
<10> so i can use what you wrote?
<7> Fleed: it's isNaN() and not isNan
<10> akk nm
<10> thats for him
<7> adam, yeah, you can use what you wrote, although i'd still use a function
<11> omg
<11> haha thanx
<7> js is case sensitive
<7> np ;-)
<11> man i feel so stupid
<7> Fleed: don't. Peer review is often one of the best ways to get around a wall.,
<11> yeah i no
<11> but im good a javascript
<10> ok
<10> well
<11> at*
<10> i corrected it
<10> but its still opening the image in a new window
<10> hmmm
<11> i was like wtf?? IT SHOULD WORK
<11> hehe anyway thanx
<11> see ya
<10> and not in that div
<10> hmmmmmmm
<7> personally i wouldn't have anything in the href (e.g. make it <a href="#" onclick="...")
<7> but why the hell do you need js for linking to a picture
<10> heheh
<7> nvrmind, i realize why
<10> i guess you don't understand what i need
<10> i want a user to click on the numbers and have images load on the same page in the content div
<10> which is on top of the black area
<10> but not go to another page
<10> is this even possiable?
<10> with js
<7> sure it's possible
<10> so i don't have a million html pages
<7> one sec
<10> ok
<10> thx
<7> question though, why do you have a showImage function in the span, then you also do image replacement with the anchor...why both?
<10> don't need both
<10> 1 sec
<10> just need this
<10> <li><span onmouseover="showImage('/Feb/images/img2.jpg',this)"> <a href="Feb/html/two.html">2</a></span></li>
<10> thats for the onmouseover event
<7> then why do you need an anchor if you are using an onmouseover?
<10> thats for the thumbnail
<10> when you mouse over the number
<10> the a tag needs to bring up the bigger version of the pic
<7> why keep it a secret to begin with. why not just use the thumbnail as the link?
<10> because i want to show how many pictures i have for the current month
<10> i really don't want to line up a bunch of thumbnails
<10> next to the big pic
<7> and you want when they click on the link to go to the next page?
<10> when they click on the number 2 lets say.....
<10> i need js to load a the image on the black matte
<10> on the left
<10> without going to a next page
<10> in the content div
<7> ok, one sec, posting something
<10> k
<7> http://www.nomorepasting.com/paste.php?pasteID=57680


Name:

Comments:

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






Return to #javascript
or
Go to some related logs:

HTC StreamPlayer
#linuxhelp
#php
#teens
pantherebel
#skype
#php
rameeboy
#linux
.roma.itly



Home  |  disclaimer  |  contact  |  submit quotes