A Conversation for Ask h2g2

Need help from someone who knows javascript better than I do.

Post 1

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Okay, I need a bit of Javascript (that I will be adding to a larger script) that will take the last four characters of the URL of the page it's on and put each one in a separate variable. I will give you credit for helping with it.


Need help from someone who knows javascript better than I do.

Post 2

The Jester (P. S. of Village Idiots, Muse of Comedians, Keeper of Jokes, Chef and Seraph of Bad Jokes) LUG @ A458228


<!-- // hides script from old browsers
var loc=window.location.href;
var loclen=loc.length;
var a=loc.charAt(loclen-4);
var b=loc.charAt(loclen-3);
var c=loc.charAt(loclen-2);
var d=loc.charAt(loclen-1);
// stop hiding script -->


38-J

JOTD: Laugh and the world ignores you. Crying doesn't help either.


Need help from someone who knows javascript better than I do.

Post 3

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Thanks!! Adding the finishing touches now.


Need help from someone who knows javascript better than I do.

Post 4

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

It's done. You can click the link at the top of my space to try it. What I'd really like to do is make a "smiley toolbar" with a couple of frames, where you type in the smiley code and it loads the smiley in a tiny frame off to the side, and then have a bookmarklet to launch it. There's also smileyonly.html, which has the script to load the smiley and nothing else.


Need help from someone who knows javascript better than I do.

Post 5

Dancer (put your advert here)

Verry amusing little gadget smiley - smiley

Are you adding html table output as well?

smiley - hsif
Dancer


Need help from someone who knows javascript better than I do.

Post 6

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Can't do that easily, because I'm using actual images. Sorry. But the codes can be typed into forums (nnLJ).


Need help from someone who knows javascript better than I do.

Post 7

Dancer (put your advert here)

Already using it in threads and spreading the word smiley - smiley

Can you make it case insensitive though smiley - huh

smiley - hsif
Dancer (usually a case sensitive guy, just needs a rest) (smiley - blue)


Need help from someone who knows javascript better than I do.

Post 8

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

smiley - erm I could, but it would involve re-uploading the files with different filenames, since I don't think I can make copies of files with my webspace provider.


Need help from someone who knows javascript better than I do.

Post 9

Dancer (put your advert here)

Sounds smiley - weird, updating files should be easy, aren't you using FTP to upload them?

smiley - hsif
Dancer


Need help from someone who knows javascript better than I do.

Post 10

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

No, it has a web upload interface. FTP sounds like a good idea, though, I'll see if I can do that.


Need help from someone who knows javascript better than I do.

Post 11

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Can't.


Need help from someone who knows javascript better than I do.

Post 12

Venus

i tried u generator it's not working


Need help from someone who knows javascript better than I do.

Post 13

some bloke who tried to think of a short, catchy, pithy name and spent five sleepless nights trying but couldn't think of one

Why don't you just use the .toLowerCase() or .toUpperCase() methods. eg:

...
var loc=window.location.href;
loc.toLowerCase();
...

Then you could just have the files with any characters defined by the script as lowercase (or uppercase if you wish)


Need help from someone who knows javascript better than I do.

Post 14

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Ooh, good idea.


Need help from someone who knows javascript better than I do.

Post 15

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Venus: Um, could you please be a bit more specific? "it's not working" isn't a very helpful bug report. What exactly is not working about it?


Need help from someone who knows javascript better than I do.

Post 16

Venus

every thing


Need help from someone who knows javascript better than I do.

Post 17

Venus

actually i'm entering the code and pressing generate then it'll give connecting 2 1 website and nothing i mean i can't see that smily or what


Need help from someone who knows javascript better than I do.

Post 18

NMcCoy (attempting to standardize my username across the Internet. Formerly known as Twinkle.)

Does the second page actually load? Also, what browser are you using?


Need help from someone who knows javascript better than I do.

Post 19

Venus

no , Launch Internet Explorer Browser


Need help from someone who knows javascript better than I do.

Post 20

Venus

this is the version # 5.00.2614.3500


Key: Complain about this post

Need help from someone who knows javascript better than I do.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more