1
mrfritz
Re: modifying headers
  • 2005/7/11 8:26

  • mrfritz

  • Just popping in

  • Posts: 3

  • Since: 2005/6/30


open xoops/themes/THEMENAME and edit the theme.html file



2
mrfritz
Re: Ajax in Xoops Template
  • 2005/6/30 20:53

  • mrfritz

  • Just popping in

  • Posts: 3

  • Since: 2005/6/30


Additional:

I'm using a dropdown list for sorting on the viewforum page, and that seems to work fine. When I click an option, the data is resorted in the background and the new table is displayed on the same page.

Evidently the only time I have a problem is when choosing a forum from the newbb/index.php page. I can't figure out where the problem is as the code is exactly the same on both pages...



3
mrfritz
Ajax in Xoops Template
  • 2005/6/30 19:59

  • mrfritz

  • Just popping in

  • Posts: 3

  • Since: 2005/6/30


I'm trying to build a template using Javascript's XMLHTTPRequest object to pull module data without refreshing the entire page.

The code seems to work on most pages, but I'm having a problem with the new_bb/viewforum.php. Every time I click a button that calls data from that page, I am redirected to the actual page instead of the data appearing on the start page.

I am using the alert() function to display the data before it's incorporated into the page, but the forum data always shows up blank, then redirects.

The code works on the index page of the site, other modules and other pages of the forum module, but that one page is constantly redirecting and I can't figure out why.

Is there something in the viewforum.php file that causes a refresh or redirect when a request comes in?

Here's the portion of Javascript code that calls the data and attaches it to the current window:
this.load = function(string) {   
//string is the url to pull from

    
if (string.indexOf('?') != -1){
      
string += '&ajax=true';  
    } else {
      
string += '?ajax=true';
    }
    
self.http.open('get'string);
    
self.http.onreadystatechange handleData;
    
self.http.send(null);
    
self.pagelink string;
  }
  
  function 
handleData() {
    if (
self.http.readyState == 4) {
     
//self.element is the <div id="content"> element
      
self.element.innerHTML self.http.responseText;
    }
  }




TopTop



Login

Who's Online

155 user(s) are online (92 user(s) are browsing Support Forums)


Members: 0


Guests: 155


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits