473,387 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

header() statements placement within <div>

115 100+
Hi
I am making a mash up and i have a CSS layout. I am trying to send a page to a certain area of the CSS once a link is clicked. I am having trouble just sending a page to part of the CSS. Can anyone see whats wrong and point me in the right direction.
Expand|Select|Wrap|Line Numbers
  1. <div id="leftcol" <?php header("location:test.html")?> </div>
  2.             <div id="footer" >
  3.                         <?php header("location:test.html")?>
  4.                         </div>
  5.  
i'm not sure if the php has to be inside the div or inbetween the divs either way i can't get it to work !
Thanks in advance
Cheers
Truez
May 5 '08 #1
5 1542
ronverdonk
4,258 Expert 4TB
Please provide a meaningful title to a thread. The one you used until now will not arouse much curiosity and attract many members.

Thread Title changed to better describe the problem scenario.
Please read here: Use a Good Thread Title

moderator
May 5 '08 #2
ronverdonk
4,258 Expert 4TB
What are you trying to do? This makeup makes no sense at all. It makes no difference whether you put the header() statement within or outside any divs because the header statement is never shown at your HTML page!

Or did you want to show hotlink there? In that case you must use the <a href=xxx tags. when you place tose within those divs they will show at your browser page.

Anyway the first div should be closed as
Expand|Select|Wrap|Line Numbers
  1. <div id="leftcol"> 
Ronald
May 5 '08 #3
truezplaya
115 100+
Hi
Yeah i will try and change it as soon as possible, What i would like to do is: When someone clicks on a button, the page related to that button opens up in the leftcol or footer area of my CSS instead of opening up in a new window.

Am i going about this the wrong way?

Cheers
Truez
May 5 '08 #4
ronverdonk
4,258 Expert 4TB
You cannot just put a html page in a div, just like that. You can use an iframe. But:
the best option would be to use Ajax on this. That way you go, after the click, via JS to the server and return the data. Upon return from the server the JS Ajax routine will put the data in the div.

Ronald
May 5 '08 #5
Markus
6,050 Expert 4TB
You could use a php include();
May 5 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
8
by: Daniel Hansen | last post by:
I know this must seem totally basic and stupid, but I cannot find any reference that describes how to control the spacing between <p>...</p> and <div>...</div> blocks. When I implement these on a...
6
by: Marcus Otmarsen | last post by:
Ok, the situation is as follows: I defined a <DIV> like: <div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div> This pane is...
3
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644"...
61
by: Paul Watt | last post by:
Hi, i've placed a table within a <div> to dispay some data. All is well in FF, but in MSIE the table starts inline with the bottom of the <div> to the left. I've set the css div to vertical...
7
by: pamelafluente | last post by:
The precious input given by Laurent, Martin, Benjamin about XMLHttpRequest in Javascript, has made me think that perhaps I could improve what I am currently doing by using Ajax. Let's make it...
2
by: Nikolai Onken | last post by:
Hey, I am trying to learn the exact behavior of CSS and was just placing a couple of <div>'s after each other. Each of the <divhas a <pwithin and some text within the <p> Now when I add a...
13
by: Mark | last post by:
Dear folks, In Javascript, is it possible to get all id names within, say, a <div></divpair? Like the array of "document.images", I mean. The reason I ask, is that I have a calender whose...
5
by: Agix | last post by:
Hi there, Please check out : http://clarifysolutions.co.uk/certenroll/ The source is included below. This page is a test, so I can play about with paddings, margins and layouts using divs as...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.