TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 07-22-2009, 11:22 AM   #1 (permalink)
The Contributor
 
russellharrower's Avatar
 
Join Date: Jul 2009
Posts: 80
Thanks: 13
russellharrower is on a distinguished road
Smile Ajax Theme for CMS

Hi I am currently testing my CMS, and making changes so that way template designers have more options and can make ajax themes.

demo - http://www.designvisa.com/index.php - ALL AJAX!

There are a few things I want to do, put cant figure out how.

I have a mod in mods/
That I want to show on the home page. (Tab1)
I want to do the following.

I need to send a request to another javascript

This is the code that gets the content.
Code:
function maincontent(tab)
    {
    document.getElementById("tab1").className = "";
    document.getElementById("tab2").className = "";
    document.getElementById("tab3").className = "";
    document.getElementById("tab"+tab).className = "current";
    callAjax('content.php?content= '+tab, 'content', '<center><img src="template/basic/images/ajax-loader.gif" title="Loading..."/></center>', 'Error');
    }
This is the code for the mods javascript

Let me explain how it works.
The user in the admin area tells the system that mod YouTube is to show on the home page
also known as Tab1.

I need to send a ajax request to the following to let it know if it is tab1 or tab3
Code:
function user1(tab)
    {
    callAjaxMods('mods.php?page= '+tab, 'content', '', '');
    }
I know it may not be the best javascript code to get Ajax working. But I need to be able to get information about what tab the user is on so that I can show or hide a div.

Thanks
Russell Harrower
russellharrower is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wordpress AJAX Comments Spy Haris Script Giveaway 9 03-30-2013 07:54 AM
AJAX Help CoryMathews Javascript, AJAX, E4X 9 02-25-2008 05:10 AM
Ajax without ruining crawlability? Aaron Javascript, AJAX, E4X 5 01-28-2008 06:57 PM
Ajax & Creating Thumbnail Rendair Advanced PHP Programming 0 01-10-2008 03:28 PM
Secure AJAX Server Scripts trmbne2000 General 4 12-07-2007 01:14 AM


All times are GMT. The time now is 05:37 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design