What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [RESOLVED] Using Ajax.open to get specific div

[RESOLVED] Using Ajax.open to get specific div
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Using Ajax.open to get specific div
A simple and crude method would just to be:

js code:
// txt is the xmlhttp responseText stored in a variable
txt = txt.split('<div id="1">')[1];
txt = txt.split('</div>')[0];
// txt will now be the div contents including the html
// if the content is bold for example, you will see:
// This is the <b>content</b> from the div

EDIT:
It may be possible to do this in one line:
js code:
txt = txt.split('<div id="1">')[1].split('</div>')[0];

I can't be sure of that one though without trying it, but most javascript seems to chain quite well

This post was edited on 01-28-2010 at 09:47 AM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
01-28-2010 09:45 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[RESOLVED] Using Ajax.open to get specific div - by macgyver08 on 01-27-2010 at 06:57 AM
RE: Using Ajax.open to get specific div - by Spunky on 01-27-2010 at 08:08 AM
RE: RE: Using Ajax.open to get specific div - by macgyver08 on 01-27-2010 at 09:57 AM
RE: Using Ajax.open to get specific div - by djdannyp on 01-27-2010 at 10:49 AM
RE: RE: Using Ajax.open to get specific div - by macgyver08 on 01-27-2010 at 11:05 AM
RE: Using Ajax.open to get specific div - by Adeptus on 01-28-2010 at 07:59 AM
RE: Using Ajax.open to get specific div - by Spunky on 01-28-2010 at 09:45 AM
RE: Using Ajax.open to get specific div - by macgyver08 on 01-28-2010 at 10:46 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