Jump to content

HUGE HELP- difficult prob


craigguthrie

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 } ?> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.