link target question

Discussion in 'HTML' started by don, May 19, 2005.

  1. don

    don Guest

    I'm trying to have a link to a page open up to a specific spot on the same
    page - I'm familiar with

    <a href = "Purchase.html" target = "new window"> Buy Product </a>

    but my code needs to do this

    <a href = "Purchase.html" target = "buybox"> Buy Product </a>


    and then down a few lines I have

    <div class = "buybox" name = "buybox">this is the result box</div>
     
    don, May 19, 2005
    #1
    1. Advertising

  2. don

    Mark Parnell Guest

    Mark Parnell, May 19, 2005
    #2
    1. Advertising

  3. don

    Mark Parnell Guest

    Previously in alt.html, don <> said:

    > here is a pic of what I'm trying to do


    This is a plain text newsgroup - please don't post binary. If you want
    to show an example, post a link.

    > I'd like the links on the left to
    > open up in the white box


    It sounds like rather than linking to another part of the page, you
    actually want to insert/replace part of the content of the page. There
    are basically 2 ways of doing this:

    1) Reload the page, using server-side script to insert the additional
    content.

    2) Use client-side script to insert/display the additional content.

    1 is preferred, but requires server-side scripting of some sort
    (whatever flavour you prefer/have available). 2 doesn't require any
    server-side scripting to be available on the server, and will generally
    be quicker, but won't work at all for visitors with scripting
    disabled/unavailable.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    alt.html FAQ :: http://html-faq.com/
     
    Mark Parnell, May 19, 2005
    #3
  4. Mark Parnell wrote:
    > It sounds like rather than linking to another part of the page, you
    > actually want to insert/replace part of the content of the page. There
    > are basically 2 ways of doing this:
    >
    > 1) Reload the page, using server-side script to insert the additional
    > content.
    >
    > 2) Use client-side script to insert/display the additional content.


    FWIW, you'll be able to do this with pure CSS when browser support for
    CSS3 becomes a bit better. Example:
    <http://tw.ecritters.biz/html_examples/fragment_hide/>.
     
    Leif K-Brooks, May 19, 2005
    #4
  5. don

    don Guest

    ok - thanks for the info -

    "Leif K-Brooks" <> wrote in message
    news:ciTie.6901$...
    > Mark Parnell wrote:
    > > It sounds like rather than linking to another part of the page, you
    > > actually want to insert/replace part of the content of the page. There
    > > are basically 2 ways of doing this:
    > >
    > > 1) Reload the page, using server-side script to insert the additional
    > > content.
    > >
    > > 2) Use client-side script to insert/display the additional content.

    >
    > FWIW, you'll be able to do this with pure CSS when browser support for
    > CSS3 becomes a bit better. Example:
    > <http://tw.ecritters.biz/html_examples/fragment_hide/>.
     
    don, May 19, 2005
    #5
  6. don

    Mark Parnell Guest

    Previously in alt.html, Mark Parnell <>
    said:
    > 1) Reload the page, using server-side script to insert the additional
    > content.


    don <> said (in email):
    > what would this link line look like?


    OTTOMH, something along these lines:

    <a href="purchase.php?action=buy">buy</a>
    ....
    <div>
    <?php if ($_GET['action'] == 'buy') then {
    echo("<p>Buy stuff, or whatever you want to show here</p>");
    } ?>
    </div>

    BTW: In future, please reply to the group, so everyone gets the benefit
    of any replies.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    alt.html FAQ :: http://html-faq.com/
     
    Mark Parnell, May 19, 2005
    #6
  7. don

    don Guest

    Well - I'm writing the php code now to insert the second html page right
    back into the first page, but my next question is if the second page has
    another submit button, how do I deal with two submit buttons? The second
    page is going to be a <form> for the user to submit and get processed by a
    third page......

    "Mark Parnell" <> wrote in message
    news:1nxv53pk2jo3.l9p2zva7s7bw$...
    > Previously in alt.html, Mark Parnell <>
    > said:
    > > 1) Reload the page, using server-side script to insert the additional
    > > content.

    >
    > don <> said (in email):
    > > what would this link line look like?

    >
    > OTTOMH, something along these lines:
    >
    > <a href="purchase.php?action=buy">buy</a>
    > ...
    > <div>
    > <?php if ($_GET['action'] == 'buy') then {
    > echo("<p>Buy stuff, or whatever you want to show here</p>");
    > } ?>
    > </div>
    >
    > BTW: In future, please reply to the group, so everyone gets the benefit
    > of any replies.
    >
    > --
    > Mark Parnell
    > http://www.clarkecomputers.com.au
    > alt.html FAQ :: http://html-faq.com/
     
    don, May 19, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cesar Garcia H

    changing link's target to blank page

    Cesar Garcia H, Apr 15, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    531
    Cesar Garcia H
    Apr 15, 2005
  2. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    942
    Kevin Spencer
    May 17, 2005
  3. James Lee

    base target inside file, not link

    James Lee, Jun 8, 2004, in forum: HTML
    Replies:
    1
    Views:
    391
    David Dorward
    Jun 8, 2004
  4. randau
    Replies:
    30
    Views:
    1,441
    Travis Newbury
    May 20, 2005
  5. mohit
    Replies:
    0
    Views:
    603
    mohit
    Jan 23, 2008
Loading...

Share This Page