Results 1 to 5 of 5

Thread: Load a full page with Ajax.

  1. #1

    Thread Starter
    Addicted Member thamizhinpan's Avatar
    Join Date
    Dec 2005
    Location
    TE
    Posts
    243

    Load a full page with Ajax.

    I'm creating a web site.It have many pages with scripts and style sheets.
    But I wish to use same banner and nevigation bar and other common features for all pages. (frame of my web site).So I wish to use ajax technology to load sub pages without reloading frame.
    I know about placing a page on <div> tag with responseText methord.
    But it doesn't load any scripts which are place on sub pages.
    Can you help to load pages with scripts and style sheets?
    If above question or answer will help to you
    Don't forget to rate me
    தமிழ்இன்பன்

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Load a full page with Ajax.

    Are you saying that when you load the pages with ajax, the code on the loaded page doesnt work?

    Can you post your code please?
    My usual boring signature: Something

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Load a full page with Ajax.

    Quote Originally Posted by thamizhinpan
    I'm creating a web site.It have many pages with scripts and style sheets.
    But I wish to use same banner and nevigation bar and other common features for all pages. (frame of my web site).So I wish to use ajax technology to load sub pages without reloading frame.
    I know about placing a page on <div> tag with responseText methord.
    But it doesn't load any scripts which are place on sub pages.
    Can you help to load pages with scripts and style sheets?
    Do not use AJAX for navigation. What if the user has disabled Javascript - what if you need to provide a direct link to the page? Many other reasons too.

    You can use CSS to archive a common theme.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4

    Thread Starter
    Addicted Member thamizhinpan's Avatar
    Join Date
    Dec 2005
    Location
    TE
    Posts
    243

    Re: Load a full page with Ajax.

    Quote Originally Posted by dclamp
    Are you saying that when you load the pages with ajax, the code on the loaded page doesnt work?

    Can you post your code please?
    Here is my testing documents.
    Attached Files Attached Files
    If above question or answer will help to you
    Don't forget to rate me
    தமிழ்இன்பன்

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Load a full page with Ajax.

    Your test page needs to include the other script. SayHello(). Other wise it won't work. Looking at your code; there are two concerns.
    • innetHTML should not be used to add HTML. The DOM provides the methods to do this; i.e: importNode
    • Generating a sessionID on the client side leaves sessions open to hijacking.

    All you need to do to fix it is add an extra HTML tag to your main HTML.
    HTML Code:
    <script language="javascript" src="sayhello.js"></script
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width