This does actually not relate to CSS, but CSS Creator is the only forum that I visit, and I know there are many experienced users here. But, should my question be not appropriate, I apologize.
I developed a site with valid html and css. On a freelance site I found a developer for converting to PHP and connecting with mySQL database. When I look at the source code of the converted page the table is there, but not the rows. Instead there is a DIV.
The converted page looks like this:
The page can be found at page
<div id="schedule"> <ul id="new-item"> <li><a href="corporate_contacts.php" title="create a new lead">New Lead</a></li> <li><a href="#" title="create a new appointment">New Task</a></li> </ul> <ul id="timeframe"> <li id="ledit" ><a href="#" id="edit" onclick=" return week(1)">Today</a></li> <li id="lweek" ><a href="#" id="week" onClick="return week(7)" >This week</a></li> <li id="ltwoweek" ><a href="#" id="twoweek" onClick="return week(14)" >Next 2 weeks</a></li> <li id="lfourweeks" ><a href="#" id="fourweeks" onClick="return week(28)" >Next 4 weeks</a></li> </ul> <table summary="scheduled tasks on $DAY, $DATE"> <div id="content_dialog" style="display:block"><!--START DIALOG DIV--></div> <div id="content_dialog" style="display:block"><!--START DIALOG DIV--></div> <div id="content_dialog" style="display:block"><!--START DIALOG DIV--></div> <div id="content_dialog" style="display:block"><!--START DIALOG DIV--></div> <div id="content_dialog" style="display:block"><!--START DIALOG DIV--></div> <div id="company_detil" title="Company details" style="display:block"></div> <div id="done" title="Done" style="display:block"></div><!--End of the dialog box--> </table>
As you can see below my markup contained a complete table including caption, head, rows and cols. I do not believe there is no other way to do it. And I am asking myself, and that is actually CSS related, how can I print just the data without printing the whole page?
<div id="schedule"> <ul id="new-item"> <li><a href="register-corporate-contact.html" title="create a new lead">New Lead</a></li> <li><a href="#" title="create a new appointment">New Task</a></li> </ul> <ul id="timeframe"> <li><a href="#" title="show schedule for today">Today</a></li> <li class="active"><a href="#" title="show this week`s schedule">This week</a></li> <li><a href="#" title="show schedule until the end of next week">Next 2 weeks</a></li> <li><a href="#" title="show schedule for the next 4 weeks">Next 4 weeks</a></li> </ul> <table summary="scheduled tasks on $DAY, $DATE"> <caption>$DAY, $DATE</caption> <thead> <tr> <th scope="col">time</th> <th scope="col">re-schedule</th> <th scope="col">status</th> <th scope="col">alarm</th> <th scope="col">task</th> <th scope="col">company</th> </tr> </thead> <tbody> <tr> <th scope="row" class="time past">9:00am</th> <td class="re-schedule past"><img src="images/re-schedule.png" alt="re-schedule appointment"></td> <td class="done past"><img src="images/done.png" alt="done"></td> <td class="alarm past"><img src="images/alarm_off.png" alt="set alarm"></td> <td class="task past">initial call</td> <td class="company past"><a href="#void" title="open record">Company 1</a></td> </tr> <tr> <th scope="row" class="time past">9:10am</th> <td class="re-schedule past"><img src="images/re-schedule.png" alt="re-schedule appointment"></td> <td class="done past"><img src="images/done.png" alt="done"></td> <td class="alarm past"><img src="images/alarm_on.png" alt="change alarm"></td> <td class="task past">initial call</td> <td class="company past"><a href="#void" title="open record">Company 2</a></td> </tr> <tr> <th scope="row" class="time past">9:40am</th> <td class="re-schedule past"><img src="images/re-schedule.png" alt="re-schedule appointment"></td> <td class="done past"><img src="images/done.png" alt="done"></td> <td class="alarm past"><img src="images/alarm_off.png" alt="set alarm"></td> <td class="task past">closing</td> <td class="company past"><a class="hot" href="#void" title="open record">Company 3</a></td> </tr> </tbody> </table> </div>
There is no php in your
There is no php in your converted page. PHP doesn't care about your HTML structure, it can do its stuff within tables or output tables itself.
Parsed code
What I posted is parsed code. The PHP file is still on his server. What I really wonder about is that I do not see any data in the browser`s source code.
Caposoft wrote: What I posted
What I posted is parsed code. The PHP file is still on his server. What I really wonder about is that I do not see any data in the browser`s source code.
Well then, the problem cannot be with the html, but with the php code that produces the html. Showing us the html therefore doesn't give us any way to help you.
Maybe I asked wrong
Sorry, maybe I asked wrong. My question was meant to be basic. When I look at the parsed code I do not see any data, not even the table structure. Instead I just see a bunch of DIV, which already does not satisfy me due to not validating. Since I have no clue about PHP my question was simply if that is normal. It seems that table data is displayed or fetched by javascript and if I disable it, the page stays blank.
Caposoft wrote: Sorry, maybe
Sorry, maybe I asked wrong. My question was meant to be basic. When I look at the parsed code I do not see any data, not even the table structure. Instead I just see a bunch of DIV, which already does not satisfy me due to not validating. Since I have no clue about PHP my question was simply if that is normal. It seems that table data is displayed or fetched by javascript and if I disable it, the page stays blank.
You do seem to be asking the wrong question. At least, I can't really understand what you are asking.
PHP is a fairly lightweight programming language usually, but not always, used to create dynamic web pages. There is, however, no necessary connection between PHP and HTML. Most PHP programs (often called "scripts" by the snobbish)are used to read some backend data, parse into HTML and send it to a web server, which then passes it on to the browser as HTML.
What normally comes out of PHP is just a string of ACII characters, hopefully valid and proper HTML. But it's up to the programmer to make it valid and correct.
PHP programs usually exist as simple text files on the server and can be edited with a text editor.
Does that help? You need to explain things so we can understand what the problem actually is.
Ed Seedhouse wrote: You need
You need to explain things so we can understand what the problem actually is.
I totally agree and I apologize. I am kind of confused, but I guess you figured that already. As I said I coded the html and CSS, and you can see it is proper, semantic and valid.
I thought something like this is done by taking my html file and add the necessary PHP portions to display the fetched data in the html structure coded by me. But when looking at the parsed source code from the browser I do see the table`s opening and end tag, but inside there is no capture, tr, td, and scopes are showing, neither the fetched data. The "9:00am" or "initial call" you can find in the original html is just in there for demonstration purposes. Instead there is a bunch of DIV. When I disable javascript, there is nothing displayed anymore.
My intended question was if I was wrong when I thought the data will be displayed through javascript, or does the developer do something wrong?
PHP coders tend to come from
PHP coders tend to come from the programming community and often tend to know little and care less about html, CSS, and semantics.
I even have friends who think like that. So I am afraid that what you seem to me to be describing is, alas, rather prevalent among certain types of developers. It's even worse with the .asp people in my experience.
I spent a few years, when I was a working stiff, with data based websites developed by such people, and it was a special form of torture for which I was not paid nearly enough to suffer through, and would not willingly go back to. Fortunately I have escaped still alive into retirement and the life of genteel semi poverty.
Thank you
thank you for the insight, Ed. So I am right when I believe that it should not be solved the way it is now?
Post the php - at least the
Post the php - at least the bit which spits out the html around the table and let us take a look. While Ed is generalising, some people do know php, do care about proper markup and do visit this forum - so you never know your luck!
Yep I do it's taken a long
Yep I do
it's taken a long while to get round to asking to see the PHP
capsoft why didn't you just post the php file?
Ed is it snobbish referring to php as scripts, I thought that PHP WAS an interpreted scripting language, what I find snobbish is when web developers call themselves programmers and become all conceited and arrogant about their skill set which after all is a very simple one a lot of the time. Programmers in the true sense don't develop web sites they write programmes!!
Chris..S wrote: While Ed is
While Ed is generalising, some people do know php, do care about proper markup and do visit this forum - so you never know your luck!
Yes indeed. This forum is the most likely place to find people who care about proper markup and understand PGP.
Hugo wrote: Ed is it snobbish
Ed is it snobbish referring to php as scripts
Well I don't know. That would depend on the circumstances. It might or might not be. Insisting in loud tones that PHP is "just" a scripting language is a bit snobbish, I think, but just dropping the word "script" probably isn't.
In the post you are referring to it was just an aside intended to help the OP feel a bit more comfortable. Whether that was a good idea or worked I don't know, but I seem to recall that that was the intention.
There is no php in your
There is no php in your converted page. PHP doesn't care about your HTML structure, it can do its stuff within tables or output tables itself.
Spambots .... attack!
Spambots .... attack!
Chris..S wrote: Post the php
Post the php - at least the bit which spits out the html around the table and let us take a look. While Ed is generalising, some people do know php, do care about proper markup and do visit this forum - so you never know your luck!
capsoft this is an unfinished thread, please post the php as Chris asked or just formally close the thread - believe it or not we are quite interested in helping 




