![]() |
|
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. |
| |||||||
| 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. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| 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 | |||
|
| | #2 | ||
| 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 > > > > | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: code, help, lost |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
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 | ||||
|