Log In · Register

 
 
Closed TopicStart new topic
Script Help., Disabling a DIV via href
SJ_Kim
post Jan 4 2005, 09:58 PM
Post #1


Newbie
*

Group: Member
Posts: 9
Joined: Jan 2005
Member No: 78,293



I want a script that makes my floating chatterbox (in a DIV tag) to disappear when the URL location is not the home page (xanga.com/home.aspx?users=[username]) because it screws up the comments page. Can anybody help me?
 
largosama
post Jan 4 2005, 10:19 PM
Post #2


Happy Person
******

Group: Member
Posts: 1,729
Joined: Feb 2004
Member No: 4,674



can we see your xanga
 
SJ_Kim
post Jan 4 2005, 10:25 PM
Post #3


Newbie
*

Group: Member
Posts: 9
Joined: Jan 2005
Member No: 78,293



It's at here. Notice that when you press "add comments" or such, the chatterbox floats above the entry and makes it half-unreadable. I want to make a script that would make it invisible depending on the URL.
 
largosama
post Jan 4 2005, 10:28 PM
Post #4


Happy Person
******

Group: Member
Posts: 1,729
Joined: Feb 2004
Member No: 4,674



you can put the chatterbox code in the javascript module in your look and feel page
 
SJ_Kim
post Jan 4 2005, 10:29 PM
Post #5


Newbie
*

Group: Member
Posts: 9
Joined: Jan 2005
Member No: 78,293



I know that... but I've used a script to disable the regular modules and insert custom ones, and it removes the Javascript module, so I put it in that DIV.
 
largosama
post Jan 4 2005, 10:35 PM
Post #6


Happy Person
******

Group: Member
Posts: 1,729
Joined: Feb 2004
Member No: 4,674



hmmmm try this

CODE
<script lanugage="JavaScript">

function showit (whichMenu,whatState){

if (document.getElementById)
{document.getElementById(whichMenu).style.visibility = whatState; }

else {document[whichMenu].visibility = whatState;}

}

</script>


into your website stats

and
CODE
<a href="javascript:showit('flooble','hidden')">Off</a>

as the link that hides the box

I dunno I sorta wrote it for my own site so might not work with yours
 
SJ_Kim
post Jan 4 2005, 10:37 PM
Post #7


Newbie
*

Group: Member
Posts: 9
Joined: Jan 2005
Member No: 78,293



I'm afraid I need it to execute immediately when the URL is not my home page. So that wouldn't work for me. And I can't use a button or something like that to disable it, either.
 
largosama
post Jan 4 2005, 10:40 PM
Post #8


Happy Person
******

Group: Member
Posts: 1,729
Joined: Feb 2004
Member No: 4,674



eh oh well I"m not that competent in javascript to do that for you so... you'll have to wait for other people.

Although I don't see why having someone manually closing it won't work

there is soon going to be a custom module code released for the right side so you can also wait for that
 

Closed TopicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: