New Code?, Xanga's version of super iggy. |
![]() ![]() |
New Code?, Xanga's version of super iggy. |
Feb 3 2004, 09:05 PM
Post
#1
|
|
|
Newbie ![]() Group: Member Posts: 3 Joined: Feb 2004 Member No: 2,859 |
I stole (shhh) some code off chatterbox for this one. My intent is for the code to recognize the person that is logged in and based on if..then of certain selected persons, the script would erase the code on the xanga. for example, if that person went to read my xanga (while they're logged in) they would get an error.
I have worked on it some... but i really don't know what i'm doing. I'm basically learning as i read... eh. Here is what i have: QUOTE // *** ERROR!!! XNAMES UNDEFINED! // *** Look for predefined xanga variable? // *** figure out what "variable undefined" means and how to fix it? <script language="javascript"> // *** script offered by chatterbox.flooble.com. function getXName() { for (var i = 0; i < document.links.length; i++) { if (document.links[i].href.substring(0,38)=="http://www.xanga.com/private/home.aspx") { var link = document.links[i]; var text = document.all ? link.innerText : link.text ? link.text : ''; return text; break; } } return null; } // *** end chatterbox code. xName = getXName(); // *** "USERNAME TO BLOCK" is replaces with xanga username to block. if (xName != null && == "USERNAME TO BLOCK") { // *** completely deletes source code... generates an error. (document.body.innerHTML = "";) // *** the following replaces source code with null: document.body.innerHTML = ""; } </script> // *** Secondary/optional method to redirect. // *** write "<META // *** HTTP-EQUIV="Refresh" // *** CONTENT="0; URL=http://www.waitallday.com">"; I do have a second method aside from deleting source code... a redirect. OK, so the code looks ok (from a novice's point of view) and i inserted the code in my skin after the login/logout links (etc) and it does not work. I get an "xNames undefined" error. SO... for you geniuses out there... there's the idea. THRIVE ON IT, GO GET 'EM. I don't exactly have a lot of time but if you guys could revise a working code i'll western union you a dollar! -sean aim:o0fdaddy email:enabled |
|
|
|
Feb 3 2004, 09:40 PM
Post
#2
|
|
|
Newbie ![]() Group: Member Posts: 5 Joined: Feb 2004 Member No: 2,532 |
I don't get what it does? Does it just track who reads your xanga?
|
|
|
|
![]() ![]() |