What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » General Chit Chat » Javascript Help [SOLVED!]

Javascript Help [SOLVED!]
Author: Message:
glennlopez
New Member
*


Posts: 6
Joined: Jun 2005
O.P. Shocked  Javascript Help [SOLVED!]
Hey guys, im having trouble with javascript coding. I know for a fact that this comunity has a lot of genus coders which is why im asking here first.

Anyways, what i wanna acomplish is:

I've got a div tag with a content "hello world"
ie: <div>hello world</div>

Now what I wanna do is take out anything after 4 letters in that div tag
ie: so im left with the word 'hell' in the end. instead of 'hello world'

I know i can use:
x=x.substr(0,4);

to subtract anything after the 4rth letter but my question is... how do I apply this logic to what I wanna get acomplished?

could someone who knows what they're doing please complete the code for me so i can understand how its done right? Thanks everyone!

I've got a joost + pownce invite for the first person with the working script

This post was edited on 08-18-2007 at 10:00 AM by glennlopez.
08-18-2007 06:18 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Javascript Help [SOLVED!] - by glennlopez on 08-18-2007 at 06:18 AM
RE: Javascript Help (pownce & joost invite reward) - by markee on 08-18-2007 at 06:39 AM
RE: Javascript Help (pownce & joost invite reward) - by glennlopez on 08-18-2007 at 07:18 AM
RE: Javascript Help (pownce & joost invite reward) - by scott2010_h on 08-18-2007 at 07:34 AM
RE: Javascript Help (pownce & joost invite reward) - by scott2010_h on 08-18-2007 at 08:33 AM
RE: Javascript Help (pownce & joost invite reward) - by glennlopez on 08-18-2007 at 09:01 AM
RE: Javascript Help (pownce & joost invite reward) - by scott2010_h on 08-18-2007 at 09:18 AM
RE: RE: Javascript Help (pownce & joost invite reward) - by glennlopez on 08-18-2007 at 09:27 AM
RE: Javascript Help (pownce & joost invite reward) - by scott2010_h on 08-18-2007 at 09:50 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On