WebSite X5Help Center

 
Dan N.
Dan N.
User

Webpage loaded by AJAX  en

Author: Dan N.
Visited 1296, Followers 1, Shared 0  

Problem: Using code like Javascrip, PHP etc. in WebsiteX5  have been for me a huge problem. The code was often included in the websitex5 page in different places etc. and problem to have a complet overview. Problems when creating the pages with Websitex5. 

Demand: I wanted to separate as much as possible my code from WebsiteX5.

Solution: After different solutions I came up with the best one by using AJAX technology and database like MYSQL. First I create a homepage with all my demands and needs. (no problems to change and add/delete afterwards) then I create a table, text with or without Tab's, etc. as I want. For every page I need to add a string under properties/expert/before closing the body that include my not even a A4 size program CM_settings.php. It even gets info about logged person.

How it works: CM_Settings.php is the main engine that starts the process when a page is opened. The main function for CM_settings.php is to fetch data, send it to the code file for execution. CM_settings.php gets the filename of the page and then goes to the database and read one or more rows from the table and create AJAX activation information. Every AJAX activation information goes to the responding page (my personal code) and what ever gets out from that code show up on a corresponing place wher I have put my <div id="idname"></div>. I seperate these by using a indexnr like idname1, idname2 etc. I must have one or more. CM_settings include. Gets Websitex5 login information, Gets filename of the page, Gets data from Mysql about current webpage. It is easy to edit yourself and add new stuff. Warning! One wrong cange can make that the code does not work.

Personal Code page: Either use ONE page for everything (depends on how huge the program is) or use one page for each webpage. Use for example fx to sort it out in the list.

Database: The database use a few settings. 1) name of current page 2) name of including page (personal code in Javascript, php etc.)  3) Indexnr  4)  aktiv switch (yes, no) 5) parameters (qx,fx,zx) Create more parameters if you want.  

To change from one page to a different page is easily done in the database. Every page can be tested by itself before being used on homepage. The database also give adminsitartors a clear view over which page is calling what page.   

My wish is that someone can create a object of CM_settings so it can be more easily included into Websitex5. 

Maybe Incomedia have a better solution where to put the file unless a object i created. A Object that helps to create the database, and also create more security. Any help is good.  

Posted on the
1 ANSWERS