Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to open a link in new window with a header?

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #43774
    AlirezaM
    Participant

    Hello!

    I have some links and I want when I click on them , open up in a new window with a header bar containing some text or images like some template centers which show their templates’ demos and you can change template through a header and it’s always static.

    notice that I want to do this in html.

    thanks in advance!

    Alireza.M

    #130470
    Senff
    Participant

    If you want to use a template, you’ll have to use some more dynamic language like PHP or ASP.

    If you want to use just HTML, you’ll have to create a separate page for each link, each page containing the header bar and the page you want to show.

    #130478
    AlirezaM
    Participant

    you mean I can’t style an html header bar and just change the links’ address and all of the links open with that header?

    #130479
    CrocoDillon
    Participant

    How about an iframe? Not sure your header would have access to do DOM stuff in the iframe though.

    #130480
    AlirezaM
    Participant

    I think it can be done with iframes but don’t know how.

    I want a header with simple text and img tags.

    but everypage which it’s link is in my html should open with this header.

    #130482
    Senff
    Participant

    > you mean I can’t style an html header bar and just change the links’ address and all of the links open with that header?

    Not with just HTML, no. With PHP it’s very simple though.

    #130502
    AlirezaM
    Participant

    ok dear @Sneff, Can you help me to achieve it?

    #130574
    AlirezaM
    Participant

    I have found this but because I’m using just html I couldn’t know where to add this :

    If you wanted to achieve something like this where the user can actually input a web address to be shown under your header (or some other method where you have the ability to show a variety of different sites, though not at once, on one page), you can use PHP and set the SRC as a variable which will be retrieved either through the POST or GET method in PHP, assuming you have that installed on the server, like this:

    $url = $_GET;



    #130605
    Anonymous
    Inactive

    You can do it in HTML using iframes, but they were weird even back in the day, so I wouldn’t use them. You also used to be able to do it in HTML using server side includes (SSI), but I don’t know if that still works these days or not. Either way, they’re older methods and I would just stick with PHP because it’s more widely used these days.

    #130627
    AlirezaM
    Participant

    @srig99 , now I want to do this with PHP but because all of those links which I want to show them with my header aren’t my own pages (I want to link to other webpages) so I can’t put this include ‘header.php’ inside of those pages.

    I want to do this with for example with class which is given to a tag and all the a tags which have this class should open the page with that header even if the link was from another website.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.