Jump to content

Recommended Posts

We are redesigning the site and the coder has taken a javascript tabbed pane menu from the net, but the problem is that with each click, we need to change an image at the top, that is outside the div that the tabbed pane uses - does anyone think they can help?

 

Here is a code I have tried but failed with...

 

<?php

function checkPicture($num)

{

$picture = array("Cambodia_Banner", "Laos_Banner", "Malaysia_Banner");

//shuffle($picture);

?>

<img name="test" src="http://192.168.1.181/images/expeditions/<?php echo "$picture[$num].jpg"; ?>" width='760' height='160' border='1'> <?php } ?>

 

 

 

 

and the javascript

 

t.addTab( "tab1", document.getElementById('tab1'), document.getElementById('pane1') );

 

 

 

<div class="tabcontainer" id="tabcontainer">

 

  <div class="selected_tab" id="tab1">

 

 

Great thanks for your help, I guess the problem is that Javacript clicks can't be used as handlers for PHP, im more of a flash man so have been really confused by this.

 

Cheers

 

Link to comment
https://forums.phpfreaks.com/topic/68806-huge-help-difficult-prob/
Share on other sites

try

changing

<img name="test" src="http://192.168.1.181/images/expeditions/<?php echo "$picture[$num].jpg"; ?>" width='760' height='160' border='1'> <?php } ?> 

to

<img name="test" src="http://192.168.1.181/images/expeditions/<?php echo $picture[$num].".jpg"; ?>" width='760' height='160' border='1'> <?php } ?> 

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.