craigguthrie Posted September 11, 2007 Share Posted September 11, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/68806-huge-help-difficult-prob/ Share on other sites More sharing options...
bonaparte Posted September 11, 2007 Share Posted September 11, 2007 I did not go through the entire code. See if this helps... <?php echo "$picture[$num]" . ".jpg"; ? Quote Link to comment https://forums.phpfreaks.com/topic/68806-huge-help-difficult-prob/#findComment-345839 Share on other sites More sharing options...
MadTechie Posted September 11, 2007 Share Posted September 11, 2007 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 } ?> Quote Link to comment https://forums.phpfreaks.com/topic/68806-huge-help-difficult-prob/#findComment-345859 Share on other sites More sharing options...
craigguthrie Posted September 11, 2007 Author Share Posted September 11, 2007 thanks a lot but the problem is that the images are now appearing in the tabbed pane DIV and not in the placeholder - the only way I can call my function is by putting it somewhere inside the pane div? THanks! Quote Link to comment https://forums.phpfreaks.com/topic/68806-huge-help-difficult-prob/#findComment-345867 Share on other sites More sharing options...
bonaparte Posted September 11, 2007 Share Posted September 11, 2007 Try that once? Quote Link to comment https://forums.phpfreaks.com/topic/68806-huge-help-difficult-prob/#findComment-345870 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.