Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > JavaScript
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

JavaScript JavaScript are you needing help with functions in your script, free help is offered here for all JavaScript problems so if you have an JavaScript error in your code just ask.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 4:37 PM   #1
Kayda
 
Kayda's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Help me find my lost code!

Hello:

I had some code that allowed me to expand a paragraph by clicking on a
hyperlink and collapse it by clicking on the paragraph. I unfortunately the
Javascript function. I still have the code that calls it

Here is how the calling paragraph looks:

<div id="menu7"><A HREF="" onclick="return ExpandHideContent('menu1','i7',
'c7')">Hyperlink that displays when page first viewed</A></div>
<div id="i7"><BR>
<A HREF="" onclick="return ExpandHideContent('menu1','i7', 'c7')"><IMG
SRC="CollapseBelowContent.gif" BORDER=0></A>

<P>CONTENT</P>

<A HREF="" onclick="return ExpandHideContent('menu1','i7', 'c7')"><IMG
SRC="graphics/CollapseAboveContent.gif" BORDER=0></A><BR>
</div>

There are a series of sections like this, so when you open the page you just
see a list of hyperlinks. You click on the hyperlink, it shows everything in
the code below (plus all the original hyperlinks stay there, i.e.:

Hyperlink1
Hyperlink2
Hyperlink3

click on hyperlink1 and you get:
Hyperlink1
Content
Hyperlink2
Hyperlink3


You click on the content or the .gifs and the content disappears..

The "ExpandHideContent" function was pretty simple, but I can't remember
what it was, and I'm feeling too busy to figure it out. The gifs basically
are funky text that say what the filenames imply.

Can someone help?

Blair




 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 4:37 PM   #2
Kayda
 
Kayda's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Help me find my lost code!

Actually, I found my code with a Google Groups search. The code is below,
but when I click on the hyperlink it briefly shows the content and then
sends me to the site's homepage. Any ideas?

<SCRIPT LANGUAGE="JavaScript">


var counter1 = 0;
var counter2 = 0;
var counter3 = 0;
var counter4 = 0;
var counter5 = 0;
var counter6 = 0;
var counter7 = 0;

function ExpandHideContent(the_id, the_iframe, the_counter)
{
if (the_counter == "c1") { ++counter1; }
if (the_counter == "c2") { ++counter2; }
if (the_counter == "c3") { ++counter3; }
if (the_counter == "c4") { ++counter4; }
if (the_counter == "c5") { ++counter5; }
if (the_counter == "c6") { ++counter6; }
if (the_counter == "c7") { ++counter7; }

ifrm = document.getElementById(the_iframe);

if (counter1 == 1)
{
counter1++;
ifrm.style.display = "block";
return;
}
if (counter2 == 1)
{
counter2++;
ifrm.style.display = "block";
return;
}
if (counter3 == 1)
{
counter3++;
ifrm.style.display = "block";
return;
}

if (counter4 == 1)
{
counter4++;
ifrm.style.display = "block";
return;
}
if (counter5 == 1)
{
counter5++;
ifrm.style.display = "block";
return;
}
if (counter6 == 1)
{
counter6++;
ifrm.style.display = "block";
return;
}

if (counter7 == 1)
{
counter7++;
ifrm.style.display = "block";
return;
}


if (ifrm.style.display == "none")
{
//alert(ifrm.style.display);
ifrm.style.display = "block";
}
else
{
//alert(ifrm.style.display);
ifrm.style.display = "none";
}

}
</SCRIPT>
"Kayda" <blair863@hotmail.com> wrote in message
news:dpqdnWpyArV33u_dRVn-iQ@comcast.com...
> Hello:
>
> I had some code that allowed me to expand a paragraph by clicking on a
> hyperlink and collapse it by clicking on the paragraph. I unfortunately

the
> Javascript function. I still have the code that calls it
>
> Here is how the calling paragraph looks:
>
> <div id="menu7"><A HREF="" onclick="return ExpandHideContent('menu1','i7',
> 'c7')">Hyperlink that displays when page first viewed</A></div>
> <div id="i7"><BR>
> <A HREF="" onclick="return ExpandHideContent('menu1','i7', 'c7')"><IMG
> SRC="CollapseBelowContent.gif" BORDER=0></A>
>
> <P>CONTENT</P>
>
> <A HREF="" onclick="return ExpandHideContent('menu1','i7', 'c7')"><IMG
> SRC="graphics/CollapseAboveContent.gif" BORDER=0></A><BR>
> </div>
>
> There are a series of sections like this, so when you open the page you

just
> see a list of hyperlinks. You click on the hyperlink, it shows everything

in
> the code below (plus all the original hyperlinks stay there, i.e.:
>
> Hyperlink1
> Hyperlink2
> Hyperlink3
>
> click on hyperlink1 and you get:
> Hyperlink1
> Content
> Hyperlink2
> Hyperlink3
>
>
> You click on the content or the .gifs and the content disappears..
>
> The "ExpandHideContent" function was pretty simple, but I can't remember
> what it was, and I'm feeling too busy to figure it out. The gifs basically
> are funky text that say what the filenames imply.
>
> Can someone help?
>
> Blair
>
>
>
>



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help code lost.. Eric de Keizer Console Subjects 0 06-26-2007 10:42 AM
lost radio code from my philps 22dc 54/62b jareklyczak@gmail.com Car audio 2 06-18-2007 3:43 PM
Phillips CAR400 code lost ??? any help. gray Car audio 0 06-18-2007 11:32 AM
citroen model 1021 code lost Tux Car audio 0 06-18-2007 10:41 AM
Clio code lost... ian Car audio 2 06-18-2007 10:34 AM


Featured Websites




All times are GMT +1. The time now is 1:14 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98