Jump to content

Recommended Posts

ok i have a shout box on my main page. i want to have an image at the top saying shout box and when clicked will echo the shout box and another to say member info that when clicked will display users member info or if not logged in echo not logged in etc.

how would i do this?
[!--quoteo(post=356869:date=Mar 21 2006, 06:09 AM:name=Skater Mike)--][div class=\'quotetop\']QUOTE(Skater Mike @ Mar 21 2006, 06:09 AM) [snapback]356869[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Any Help Anyone?
[/quote]

you could make a link from the image which re-calls the page with a URL parameter that, when detected, shows the relevent details, using $_GET

or you could preload the info within a hidden table/div tag and use javascript to reveal it when the image is clicked.
[!--quoteo(post=356892:date=Mar 21 2006, 03:46 AM:name=redbullmarky)--][div class=\'quotetop\']QUOTE(redbullmarky @ Mar 21 2006, 03:46 AM) [snapback]356892[/snapback][/div][div class=\'quotemain\'][!--quotec--]
you could make a link from the image which re-calls the page with a URL parameter that, when detected, shows the relevent details, using $_GET

or you could preload the info within a hidden table/div tag and use javascript to reveal it when the image is clicked.
[/quote]
Could You Give Me An Example Code For That???
[!--quoteo(post=357533:date=Mar 23 2006, 10:00 AM:name=Skater Mike)--][div class=\'quotetop\']QUOTE(Skater Mike @ Mar 23 2006, 10:00 AM) [snapback]357533[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Could You Give Me An Example Code For That???
[/quote]

without knowing exactly how you have things set up, it'd be awkward to do the code for you. but for example:

[code]
<?php
if (isset($_GET['foo']))
{
   echo 'foo is '.$_GET['foo'];
}
?>

<a href="<?php echo $_SERVER['PHP_SELF'];?>?foo=bar"<img src="myimage.jpg" /></a>
[/code]

if you clicked the image, it would reload the current page with ?foo=bar in your URL, which you can then get at with $_GET['foo']

as for javascript, that's a different story and one for the javascript forum, but basically you load all the info you need into a table with the CSS style 'display:none', and when the image is clicked (using onClick) it sets the CSS style of the table so that it shows.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.