Make Collapsable Code Appear Collapsed On Open?

Aug 5, 2010

I have the code below that gives the ability to open and collapse sections.I don't know too much javascript and found this code online. I tweaked it to serve my purposes but it doesn't do one thing. I would like all of the areas to be collapsed when the page is opened.How would I tweak the code below to do that?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

[code]....

View 3 Replies


ADVERTISEMENT

Collapsable Menu Collapsed On Page Open?

Aug 4, 2010

I have this code that I found online and I'm trying to figure out how to make this collapsable menu open collapsed when the page opens up.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

[code]....

View 4 Replies View Related

Code That Will Make The Link Open In The Parent Window?

Nov 24, 2010

Instead of using window.open, which I understand opens a new window, is there a code that will make the link open in the parent window?

View 7 Replies View Related

Collapsable Menu

Nov 23, 2002

This is a vertical collaps menu I made:

<html>
<head>
<script language='javascript1.2'>
//Scrit Name:Collapsable Menu V2.0
//Created By:Garadon
//E-Mail:Shashalak@hotmail.com
//Homepage:www.the-hive.dk/~donp/

function expand(value)
{

var antal=3;
var i=value;
var move=document.getElementById(i).clientHeight;
if(document.getElementById(value).style.visibility=='visible')
{

document.getElementById(value).style.visibility='hidden'
while(i!=antal)
{
i++;
document.getElementById(i+'t').style.pixelTop=document.getElementById(i+'t').style.pixelTop-move;
}

}
else
{

document.getElementById(value).style.visibility='visible'
while(i!=antal)
{
i++;
document.getElementById(i+'t').style.pixelTop=document.getElementById(i+'t').style.pixelTop+move;
}
}

}

</script>
</head>
<body bgColor=Black Text=yellow >
<table cellspacing=0 cellpadding=0 border=0 id=1t style='position:absolute;left:0px;top:5px;width:150px'>
<tr>
<td colspan=2 onClick="expand(1);" bgColor='#555555'>
<B>
Test1
</B>
</td>
</tr>
<tr>
<td bgColor='#000000'>
<table Border=0 bgColor='#333333' style='width:100%;visibility:hidden' id=1>
<tr>
<td>
Test1
</td>
</tr>
<tr>
<td>
Test1
</td>
</tr>
<tr>
<td>
Test1
</td>
</tr>
</table>
</td>
</tr>
</table>




<table cellspacing=0 cellpadding=0 border=0 id=2t style='position:absolute;left:0px;top:24px;width:150px'>
<tr>
<td colspan=2 onClick="expand(2);" bgColor='#555555'>
<B>
Test2
</B>
</td>
</tr>
<tr>
<td bgColor='#000000'>
<table Border=0 bgColor='#333333' style='width:100%;visibility:hidden' id=2>
<tr>
<td>
Test2
</td>
</tr>
<tr>
<td>
Test2
</td>
</tr>
</table>
</td>
</tr>
</table>



<table cellspacing=0 cellpadding=0 border=0 id=3t style='position:absolute;left:0px;top:43px;width:150px'>
<tr>
<td colspan=2 onClick="expand(3);" bgColor='#555555'>
<B>
Test3
</B>
</td>
</tr>
<tr>
<td bgColor='#000000'>
<table Border=0 bgColor='#333333' style='width:100%;visibility:hidden' id=3>
<tr>
<td>
Test3
</td>
</tr>
<tr>
<td>
Test3
</td>
</tr>
<tr>
<td>
Test3
</td>
</tr>
</table>
</td>
</tr>
</table>

</body>
</html>

View 1 Replies View Related

Expandable/Collapsable Ad WITHOUT Flash?

Jul 9, 2004

Any there any way to make the familiar expanding/collapsing banner ads found on sites like CNET, ZDNet, etc. in JavaScript without having to use Flash? The only thing on the web I've found....

View 14 Replies View Related

JQuery :: Collapsable Panels With Dynamic ID?

Nov 9, 2010

i just found this jquery script for collapsable panels : [URL] it works fine for me, but the problem is that i have to write all the ID's from the DIV's into the script before. i got a page with a lot auf these panels and i dont want to write every ID in the script. is there any posibility to have only one scipt and when i click one panel it regognize on which i clicked? so i dont want to have the ID's in the script.

this is the script:

$(function()
{
$("#mostrar").click(function(event) {
event.preventDefault();

[Code]....

View 2 Replies View Related

Expand/collapsed Divs As Drop Down Menus

Dec 28, 2006

I am trying to develop a div with a drop down menu in it. As the enduser selects the third or final option, the div expands to show more choices/text/etc related to the option selected from the drop down menu..

View 5 Replies View Related

JQuery :: Using Browser Search(Ctl+F) On Collapsed Treeview Nodes?

Dec 20, 2011

Say I have a tree view

Item1
SubItem1
Element1
Element2

[Code]....

When I do a search in the browser (Ctl+F)(with Item2 collapsed) on Element1 the search stops on Item1|Subitem1|Element1 then Item1|Subitem2|Element1. If continue searching it does not find Item2|Subitem2|Element1.

Is there a way for the search to even find collapsed items?

View 1 Replies View Related

JQuery :: Unable To Display Collapsed Folder Correctly Once Expanded - CSS ?

Oct 27, 2010

When the left column first loads the vertical scrollbar displays correctly.

The vertical scrollbar is aligned up against the right border of the first column of the table which you can see by looking at the first image, and comparing it to the second.

Once I click on a folder in order to expand its contents, the vertical scrollbar introduces a gap of about 20 pixels as shown in the circle.

I looked at the css tag for the "classes" folder using firebug, and it showed {class ="directory collapsed", class= "directory expanded"} prior to and after expanding the contents of the folder.

I did a global regex search, within the project hierarchy, for (collapsed|expanded) and could not find any css that showed any margin-right for expanded, nor could I find any css at all related to "directory (collapsed|expanded)".

The only thing I found was that jqueryFileTree.js contained a function bindTree(t) with some code that toggled (collapsed|expanded):

Does anybody have a clue what is causing the gap once I click on a folder, and how to fix the problem?

Even if close the folder once the gap is there, I can't get rid of it unless I reload the page.

View 7 Replies View Related

Code - Void Window.open - Link Would Open In The Same Window?

Feb 7, 2009

I have this piece of code which is opening link in new window:

How to change this code so link would open in the same window?

Probably I should change this part: javascript:void window.open

View 1 Replies View Related

Cannot Get Code To Open Calendar

Nov 12, 2011

Here is my code. It is supposed to open a calendar when you click the "Select Date" link. I have gone over it many times but cannot get it to come up.

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "[URL]">
<html xmlns="[uRL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Coast City Windsurfing</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
/* <![CDATA[ */
var dateObject = new Date();
var month = dateObject.getMonth();
var monthArray = new Array("January","February",
"March","April","May","June","July","August",
"September","October","November","December");
function getTodayDate() { .....

View 2 Replies View Related

Make Bookmarklet Open In New Window?

May 21, 2009

I need this bookmarklet (below) to open in a new window and display the info there. It needs to work in both FF and IE. It would be in one line in the bookmarklet but I expanded it for readability. It should work against our site: [URL]

[Code]...

View 2 Replies View Related

Make Adbrite Ads Open In New Window

Dec 9, 2009

I am trying to do is adjust my ad code from adbrite to make the ads (when clicked) open up in a new window rather than the current one, as this disrupts gameplay on my site. (I have a game site). This is my ad code:

<!-- Begin: AdBrite, Generated: 2009-10-04 22:48:52 -->
<script type="text/javascript">
var AdBrite_Title_Color = '6728B2';
var AdBrite_Text_Color = 'E1771E';
var AdBrite_Background_Color = '000000';
[Code]...

View 3 Replies View Related

Make A Key Sequence Open A MsgBox?

Jan 17, 2011

how would i make a key sequence open a message box. so if i type something like... for example "activate" it would open a message box that said "Activated."

View 1 Replies View Related

Make New Page Open In The Same Window?

Jul 20, 2009

I have this javascript to open a new page.Currently it open the page but opens it as a pop up.How can i change to open in the same page.[code]

View 7 Replies View Related

How To Make Link To Open In Same Window

Oct 19, 2010

I am using
Code:
window.open('../move_delete_contact.php?ID=[ID]&action=edit')
to open up a window but this opens a new window is there something to make it so that it opens in the same window instead of a new window?

View 4 Replies View Related

Windows.open Source Code

Sep 20, 2006

On most EVERY commercial site (including the pages on comp.lang.javascript) I find the following code, word for word.

<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

Is this some "standard" code that every Web page should have. Does it
control the opening of new windows when a user clicks on a newsgroup
message.

View 2 Replies View Related

Code To Get Script To Open In A New Window?

Aug 31, 2011

I am a newbie with respect to programming and this is my first post

I have entered below a javascript I am using on my website. This script is designed to automatically insert videos based on keywords and works perfectly except that my visitors are taken away from my website when they use it.[code]...

View 3 Replies View Related

Make Site Open In New Tab Instead Of Popup Window

Oct 8, 2011

I kinda stuck at this point on my php script, it has this javascript code and I stuck there:

Line 16:
echo("<script language="JavaScript">
function openptc(tpge,pnme,w,h){
settings="width=" + w + ",height=" + h + ",scrollbars=yes,location=no,directories=no,status=1,menubar=no,toolbar=no,resizable=no";
window.open(tpge,pnme,settings);
}
//-->
</script>");

Line 72:
print "<td><a href="#" onClick="openptc('./paidtoclick.php?adid=$row[linkid]&action=start&".session_name()."=".session_id()."','PaidtoClickPage','640','480');"><b>Click Here To View</b></a><tr>";

I think those 2 lines actually are my problem. This code makes the site open in a new pop up window. how to make it open in a new tab.

View 2 Replies View Related

Make Script Link Open In A Top Frame?

Nov 5, 2011

Make the links below open in the "top" or "parent" frame of a window. For example, in HTML, code...

I just do not know how to make the links below perform in the parent window. (or even a new window if that is only possible.)code...

View 1 Replies View Related

Cycling Links - Code To Open Variouslinks()

Mar 13, 2011

I can get the code to open 'variouslinks()' when I click the 'Go HERE' link but I cannot get it to open them in a new window. I tried using HTML and JAVASCRIPT.

View 3 Replies View Related

Getting A Code To Open A Java Alert On Another Website?

Apr 14, 2011

My website was recently ftp hacked and a file inserted into it - js.php - which seems to be some sort of advertising spam programme. Having spotted the file I have renamed it to hide it but lots of other sites are still referring into my site looking for this php file. What I would like to do is to *just* open a java alert box on the referring sites to alert the users that the site has been hacked and that they should notify the webmaster so that he can fix his site.The line referring into my site is -

<script type="text/javascript" src="http://www.mysite.com/js.php"></script>

Is this something simple to do?

View 3 Replies View Related

How To Make Invisble Popup Using Window.open Function?

Feb 5, 2007

We want to load the popup window when the page is loaded but this popup window must not be visible to the end user. We need this to do some processing in the popup window which is hidden.

Is this possible? Is this correct/valid?

View 1 Replies View Related

Make Spry Tabbed Panels Open Automactically And Go From One Tab To Another

Aug 16, 2009

I have created this Spry Tabbed Panels, this is just an example to help explain what I'm trying to do.Is it possible, or is there a way to make the Spry Tab Panels open from one Tab to the other on page load, like automatically.Lets say the Tab open from 1, 2, 3, 4 and then to 4,3,2,1.URL...

View 2 Replies View Related

Open/hide Comment Editor In One Page Code?

Nov 11, 2009

I know that we can combine 2 pages into one, but i dont know what exact terms it called or say open and hide?

I have 2 pages, view.php and comment.php. inside view.php there will be a link to open comment.php. instead of doin this, i want to put the codes in one page call comment.php. i'm quiet sure that it using javascript, using id, onclick and sometimes called frames(not sure...) ?? but i dont know how to implement it. So can someone gimme any reference that i can refer to? example and solution aso can so i can get an idea on it.

View 3 Replies View Related

Open A Print Dialog Box In Opera Browser Using Code?

May 3, 2006

I am trying to open a print dialog box in Opera browser using javascript code as

<script language=javascript>
window.print(); //This is working in IE, Netscape, Firefox, but not working in Opera
</script>

where as if I am using the following code Opera browser understands and able to open print dialog box

<input type="button" value="Print this page" onClick="javascript:window.print();" ID="Button1" NAME="Button1">

My requirement is to open print dialog box in Opera browser using script block.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved