SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Location
    Cambridge, ON, Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anchors inside DIVs reload page... help?

    Hello,

    I have two big problems as I try to bring my website out of the 1900s... I am in the process of redesigning part of my site, which is located at www.crolinks.com/cromusic - I am trying to move away from the frame layout.

    I started (a) overhauling the site moving everything from HTML files to php, and I am (b) in the process of redoing the screen layout. Instead of frames, I am trying to use DIV containers.

    The starting steps of my new layout are at www.crolinks.com/cromusic/newindex.php--don't mind the colours, as I'm still just getting all my div stuff working.

    If you look at my start-up for searching by artist and select A (it's the only one that works right now), you will see the list appear down the left side of the page. In my original HTML, I had jumps which would take you from the name of the singer down to their list. Now that I have it inside a DIV rather than a frame, clicking on any link to an anchor reload the page. Is there any way to stop this?

    As a subsequent question, if I create a DIV container in the largest part of the window for the songs, is there a way to replace the contents of a DIV with a call to a PHP script? Can I use the javascript innerHTML in conjunction with PHP?

    (Can I do nameOfDIVBlock.innerHTML = "<? rendersong.php?title=whatever ?>"

    What I hope to do is reload the songs in the large area without reloading the whole page each time...

    Any and all help would be much appreciated!!!

    Thanks,

    Ante

  2. #2
    SitePoint Member
    Join Date
    Jan 2012
    Location
    Cambridge, ON, Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I figured out the first problem. Case of not paying attention when I copied and pasted old code... forgot the A HREF tag had a target in it, which is since gone.....


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
  •