- This topic is empty.
April 2, 2013 at 5:40 pm #43774
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.MApril 2, 2013 at 5:51 pm #130470SenffParticipant
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.April 2, 2013 at 6:12 pm #130478
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?April 2, 2013 at 6:17 pm #130479CrocoDillonParticipant
How about an iframe? Not sure your header would have access to do DOM stuff in the iframe though.April 2, 2013 at 6:30 pm #130480
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.April 2, 2013 at 8:03 pm #130482SenffParticipant
> 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.April 3, 2013 at 5:09 am #130502
ok dear @Sneff, Can you help me to achieve it?April 3, 2013 at 5:52 pm #130574
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;
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.April 4, 2013 at 6:50 am #130627
@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.AuthorPostsViewing 10 posts - 1 through 10 (of 10 total)
- The forum ‘CSS’ is closed to new topics and replies.