Your Ad Here Your Ad Here
Results 1 to 8 of 8

Thread: (PHP) Template changes

  1. #1
    Dark Steno's Avatar lol fang tan
    Join Date
    Oct 2004
    Location
    Bangi, Selangor
    Age
    33
    Posts
    2,270
    I am abit busy nowadays and I want to make some changes to my website. I want to make several buttons that can change the website template/skin/whatever without really refreshing the page by clicking on them. Each one represents different template/skin. I've seen something like Joomla CMS but the source code is too advanced for me to decipher.

    Anyone can help me?
    Yours Sincerely,

    Dark Steno @ Maskawaih


    | manker FTW too! Awesome and superior being ^_^! |


    | Maskawaih.com |My DeviantArt|

  2. Internet, Programming and Graphics   -   #2
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    24,069
    If you just want to change CSS you can easily use 'ajax' to do it without refreshing the page.
    Is that what you want?

  3. Internet, Programming and Graphics   -   #3
    SeK612's Avatar Poster BT Rep: +10BT Rep +10
    Join Date
    Nov 2002
    Location
    UK
    Posts
    739
    Is ajax easy to learn?

  4. Internet, Programming and Graphics   -   #4
    Dark Steno's Avatar lol fang tan
    Join Date
    Oct 2004
    Location
    Bangi, Selangor
    Age
    33
    Posts
    2,270
    Apart from CSS, it may even change bakcground pics and so on. Ajax can do it? Let me look at it.
    Yours Sincerely,

    Dark Steno @ Maskawaih


    | manker FTW too! Awesome and superior being ^_^! |


    | Maskawaih.com |My DeviantArt|

  5. Internet, Programming and Graphics   -   #5
    SeK612's Avatar Poster BT Rep: +10BT Rep +10
    Join Date
    Nov 2002
    Location
    UK
    Posts
    739
    Well Ajax seems pretty comprehensive so I guess it would (it's what's used when you click to edit a post on the forum and by companies like Google, where you can drag stuff freely around the page).

  6. Internet, Programming and Graphics   -   #6
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    24,069
    Quote Originally Posted by SeK612
    Well Ajax seems pretty comprehensive so I guess it would (it's what's used when you click to edit a post on the forum and by companies like Google, where you can drag stuff freely around the page).
    Dragging stuff around isn't ajax, you're right about the quick edit and quick post tho.
    Ajax is loading stuff from the server to the page without it actually reloading the page (does it in the background).

    Now that I think about it you can probably do this without even using ajax.

    Just a javascript function like:
    HTML Code:
    <script type="text/javascript">
    	function changeCSS(cssname)
    	{
    		if (cssname=='style1')
    		{
    			document.getElementById('pagecss').value = 'the css goes here, not including <style></style> tags. ex: h1{ font-weight:bold; }';
    		}
    		else if (cssname=='style2')
    		{
    			document.getElementById('pagecss').value = 'the css goes here, not including <style></style> tags. ex: h1{ font-weight:bold; }';
    		}
    	}
    </script>
    On a page like:
    HTML Code:
    <html>
    <head>
    	<style id="pagecss" type="text/css">
    		default style goes here :/
    	</style>
    </head>
    <body>
    	<a href="#" onclick="changeCSS('style1');">Change to style 1</a>
    	<a href="#" onclick="changeCSS('style2');">Change to style 2</a>
    </body>
    </html>
    Last edited by tesco; 03-05-2006 at 02:06 AM.

  7. Internet, Programming and Graphics   -   #7
    SeK612's Avatar Poster BT Rep: +10BT Rep +10
    Join Date
    Nov 2002
    Location
    UK
    Posts
    739
    Aren't pages where you can drag stuff around (like the customisable part of Google news and Google Personal) as you drag stuff on the page without it reloading.

  8. Internet, Programming and Graphics   -   #8
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    24,069
    Quote Originally Posted by SeK612
    Aren't pages where you can drag stuff around (like the customisable part of Google news and Google Personal) as you drag stuff on the page without it reloading.
    Nope that's just another part of javascript.
    To be considered 'ajax' I'm sure it has to actually be sending and/or receiving from the server without the page reloading.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •