It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

onClick support for beginner

onClick support for beginner

Postby d360 on Mon Apr 23, 2007 10:04 pm

Hi all, I hope someone can help me finalize this project.

Here's the site I'm working on: Link

The top half of the page (flash panorama + copy) is an iframe, the bottom is a tab interface which allows you to click around independently of the iframe. Links from the map load in the iframe above (iframe name="pano").

However, our client would prefer that when you click on a tab, a new panorama from that new mountain will load above.

I've been in contact with the developer of the tab interface, and he says it's possible to do this with an onClick event and supplied me with this example code:
Code: Select all
function(argsObj) {

    var t = argsObj.tabber; /* Tabber object */
    var id = t.id; /* ID of the main tabber DIV */
    var i = argsObj.index; /* Which tab was clicked (0 is the first tab) */
    var e = argsObj.event; /* Event object */

var iframe = document.getElementById('myiframeid');

switch (i) {
      case 0:
         iframe.src = 'url for iframe';
         break;
      case 1:
         iframe.src = 'url for iframe';
         break;
      case 2:
         iframe.src = 'url for iframe';
         break;
  }
}

Unfortunately, I'm not sure how to implement that (where to put what, what to change, etc)...caue I'm a beginner and I suck For instance, if I put that code in the <head> section (where I *assume* it goes), what do I put for the <a> on each tab? If anyone can show me what to do I'd be very appreciative.

Thanks for any help y'all can provide.
d360
 
Posts: 0
Joined: Mon Apr 23, 2007 9:58 pm

Who is online

Users browsing this forum: No registered users and 5 guests