Guest

Finn Rudolph

By: a guest on Oct 22nd, 2008  |  syntax: JavaScript  |  size: 1.32 KB  |  hits: 314  |  expires: Never
download  |  raw  |  embed  |  report abuse
This paste has a previous version, view the difference. Copied
  1. function changeSection(section) {
  2.        
  3.         $$(".menu_button").each(function(elmt) { elmt.src = "graphics/menu_arrow.gif" });
  4.  
  5.         if (section != 10) {
  6.                 $('button_' + section).src = 'graphics/menu_arrow_a.gif';
  7.         }
  8.        
  9.         var url = 'includes/php/update_copy.php';
  10.         var pars = 'section=' + section;
  11.  
  12.         new Ajax.Updater('copy_box', url, {
  13.                 method:'get',
  14.                 parameters: pars,
  15.                 onSuccess: function(transport) {
  16.                         var response = transport.responseText || "no response text";
  17.                         //alert("Success! \n\n" + response);
  18.                 }
  19.         });
  20.        
  21.         var url2 = 'includes/php/update_if.php';
  22.         var pars2 = 'section=' + section;
  23.  
  24.         new Ajax.Updater('myImageFlow', url2, {
  25.                 method:'get',
  26.                 parameters: pars2,
  27.                 onSuccess: function(transport) {
  28.                         var response = transport.responseText || "no response text";
  29.                         //alert("Success! \n\n" + response);
  30.                        
  31.                         // Destroy the ImageFlow Instance
  32.                         instanceOne = null;
  33.  
  34.                         // Build a shiny new one                        
  35.                         var instanceOne = new ImageFlow();      
  36.  
  37.                         // Initiate with your options
  38.                         instanceOne.init({      ImageFlowID:'myImageFlow',
  39.                                                 reflectionGET: '&bgc=D4D1DC&fade_start=20%',
  40.                                                 startID: 3,
  41.                                                 startAnimation: true });
  42.                        
  43.                 }
  44.         });
  45. }
  46.  
  47.  
  48. function showInfo(section, item_id) {
  49.         alert(id)
  50. }