110mb.com Forum
News: Currently none. But refer to this news before you post an error, maybe it's already being fixed Wink
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 05, 2008, 03:57:18 PM


Login with username, password and session length


Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Switching Content With A Click  (Read 242 times)
stereofreak69
Super Authority member
******
Offline Offline

Posts: 1631

Need Help? Just PM Me! I'm Happy To Help!


WWW
« on: August 29, 2008, 08:59:31 AM »

I need to be able to do almost exactly what D3xt3r's post describes, ut thats just one step not right. Let me explain:

D3xt3r's Does this:

Content hidden:
Quote

Content Visable (Via a click of a button or link):
Quote
Content hidden now shown

Heres what I need:

Content hidden:
Quote
To view this content, please click the "Show" button above

Quote
Content that was hidden is now replaced with this

Basically instead of showing nothing, it displays a message of my choice. Once clicked, that message is deleted and replaced with another message, which will consist of about a page of HTML

Thanks.

Stereofreak69
Logged

mrtutorial
Member
*
Offline Offline

Posts: 30


WWW
« Reply #1 on: August 29, 2008, 09:07:53 AM »

Hmm not sure what your talking about but... you could like make a page in frontpage or dreamweaver that has a button(named Show) linked to the page you want to show...

so it goes like this

A user visits the webpage

The webpage has 1 button "Show"

When the user click the show button it directs the user to the content that the button "Show" is Showing
Logged
stereofreak69
Super Authority member
******
Offline Offline

Posts: 1631

Need Help? Just PM Me! I'm Happy To Help!


WWW
« Reply #2 on: August 29, 2008, 09:15:40 AM »

I need it to be probebly JS, because then the page dosent have to reload.

Link to D3xt3r example: http://stereofreak69-other.110mb.com/showhide.php

But instead of it being blank before you click it, theres text. Then, when clicked, the text is replaced with other text.

A lot of texts lol

Stereofreak69

Edit: Stang45, that costs. Couldnt you of copy-pasted some code?
« Last Edit: August 29, 2008, 09:18:34 AM by stereofreak69 » Logged

mrtutorial
Member
*
Offline Offline

Posts: 30


WWW
« Reply #3 on: August 29, 2008, 09:26:43 AM »

ahh well sorry i could'nt help but that's as far as i know for now...

But I am still learning =P

OnTopic:
Yeah i think you should go with a java script that will allow you to what you are trying to do...

I though you were trying to display a show button that would direct the user to another part of your website.
Logged
stang45
Extremely Random Person
Authority Member
****
Offline Offline

Posts: 690

The World is Random What About You?


WWW
« Reply #4 on: August 29, 2008, 10:40:34 AM »

Stereofreak69 see if this is what you want, it is JavaScript instead of PHP...
http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm

The thing your looking for may also be classified as a
  • Content Spinner
  • Content Switcher
  • Or maybe even a Content Hider
Logged

There is not a choice while voting for the next US president there is only hope. The world is corrupt. =(

Is oil really that important? Lets ask Bush!
Do you really need to spy on American Citizens? Lets ask Bush!
Is torture really necessary? Lets ask Bush!



Owner of Randomstand.c
general vegitable
ⓖⓔⓝⓔⓡⓐⓛ ⓥⓔⓖⓘⓣⓐⓑⓛⓔ
Loyal 110MB Member
*******
Offline Offline

Posts: 3543


please ask (by pm duh!) before you yim me


WWW
« Reply #5 on: August 30, 2008, 01:05:46 AM »

i reccomend Dhtml, its like javascript but with a few differences
Logged



woot, i have a 110mb status system see => http://general-vegitable.110mb.com/110status
Joey van Hummel
A banana!
Authority Member
****
Offline Offline

Posts: 620


I have the shortest attention span ever!


WWW
« Reply #6 on: August 30, 2008, 02:12:13 AM »

Code:
<script type="Text/JavaScript">
var x;
function showDiv(x) {
if (x==1) {
spoiler.style.display = "block";
nospoiler.style.display = "none";
}else{
spoiler.style.display = "none";
nospoiler.style.display = "block";
}
}
</script>
<div id="spoiler" style="display:none;">
<font color="black">
<button type="button" onclick="showDiv(0)";><font color="#000000" size="1"><b>Hide list</b></font></button><br>
Text that appears unhidden
</div>
<div id="nospoiler" style="display:block;">
<button type="button" onclick="showDiv(1)";><font color="#000000" size="1"><b>Show list</b></font></button><br>
Text That appears hidden.</div>

tested and working Smiley
http://t2b.110mb.com/hidebutton.php
example.
« Last Edit: August 30, 2008, 02:55:14 AM by joeyvanhummel » Logged

Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

  Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC

Theme by Dilber MC | Using SEO4SMF Mod

All content on this forum (especially posts) is copyright property of 110mb & the member
who wrote the post. So if you wish to steal anyone's post on this forum, you'll wish you
were dead because our lawyers will sue your ass!