SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Mar 2006
    0 Post(s)
    0 Thread(s)

    Load HTML into Div

    Hi Chaps...

    Im rather rubbish in js, so please bare with me

    Very simply i have one div with links, and another div for content.
    The links carry dynamically ID's to populate the html to be loaded into the content div

    Ive found a old tut here but its seems rather bloated for something so simple. Ive looked at Ajax, and found tuts on how to load content within its own div, but not referring to another and not using dynamically generated links.

    The html to be loaded into the content div is form based (and in the same domain), which upon processing, will go to another page...based on the link above for the old script, the second page (after form processing) went to a complete new page, rather than loading into the content div only...sorry im rambling....

    Could someone point me in the right direction for a step by step tut...or a link to a solution that i could adapt

    thanks in advance

  2. #2
    SitePoint Guru
    Join Date
    Jan 2007
    1 Post(s)
    0 Thread(s)
    Here's how you do it with jquery:

    Code JavaScript:
       					type: "POST",
       					url: "/application/view/content/portfolio_pop_up.php?portfolio="+popout_id,
       					success: function(msg){

    In this snippet an id is passed to a backside script that returns the information.


Posting Permissions

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