html

Should one use PHP to print all of a page's HTML?

Hi So I've always developed PHP pages like this: <?php goes at the top, ?> goes at the bottom, and all the HTML gets either print()ed or echo()ed out. Is that slower than having non-dynamic html outputted outside of <?php ?> tags? I can't seem to find any info about this. Thanks! --Mala UPDATE: the consesus seems to be on doing it my ...

.net regex group that doesn't appear in matches

is there a way to group a matching element but not have that match appear in the resulting match groups? for example, suppose I have a string with two lines: <td>text 1</td> <td><a href=whatever>this is</a> text 2</td> and I want to parse out "text 1" and "this is text 2". what I'm doing now is using this pattern: <td>(<a href=.+?>)?...

jquery html callback

Is there a callback for the html() function or a way to check that it is finished. For example: $("#some_div").html('something here'); if($("#some_div").html() == ''){ //do something here } I am setting the html of an element from a post. Sometimes it doesnt load so when it doesnt load I would like for it to do something, is this pos...

What format should my site-map be in?

I am creating a site-map with all urls on my site! I have a classifieds site, so I'm using a mysql database. What format should I create the 'static' page which contains all the urls and is 'auto incremented' for each ad created on my site ? Thanks ...

Centre aligned div, that has text aligned to the left.

I want that div in the middle of the page, the div should be 561px and the text needs to be left aligned. <div id="notes"> aaaaaaaaa a aaaaaaa aaaaaaaaa </div> ...

Push Webpages jquery

Is there a way to push pages on change rather than putting a timer on a webpage to refresh every x mins? I guess what Im trying to do is not refresh an entire page when only a portion of it may have changed. I have seen on FB when an update happens it has message saying new content available. Perhaps you could MD5 a page then when an up...

Making a Web Chat with jQuery

I am trying to implement a browser based chat system with jQuery. I want to poll the server for new messages and append them to the bottom of a div. I have two problems. I can't get it to append text to the div I don't know how to keep the div scrolled to the bottom as the text gets appended Here's the relevant clip of my HTML: <di...

Which CSS organization method is fastest?

If I have the following HTML: <p id="p1">Paragraph 1</p> <p id="p2">Paragraph 2</p> <p id="p3">Paragraph 3</p> <p id="p4">Paragraph 4</p> how should I organize the CSS to achieve the fastest page load time? I could organize it by HTML element, like this: #p1 { font-size:12px; color:red; } #p2 { font-size:12px; color:blue; } #p3 { fo...

Separate text and html part from incoming email

Is there a way to separate text and html part when any incoming email is received ? I am using PHP. If the content-type of the incoming email is multipart/alternative Mail received from Outlook are throwing garbled text when the message they contains get forwarded. ...

hotfile account checker

hey all i wanna make hotfile account checker inorder to start working ,i want to know how to login i tried this http://www.hotfile.com/login.php?user=myusername&amp;pass=mypassword but it saying Bad username/password combination. :( even if i entred correct login data can any one help me please thanks in advance regards ...

Put the most popular option at first on a select box with mysql

Hi there. I'm new on mysql, but I have a database with some data, ordered by name: <option value="4"> George </option> <option value="55"> John </option> <option value="13"> Paul </option> <option value="24"> Ringo </option> I want to put this on a select, like this: while($row = mysql_fetch_array($result) ){ echo "<optio...

iPhone dev question: NSMutableURLRequest, cannt set the _GET to my from in php

Hi guys, I have a php form, that is working. With that form I connect to a DB, where i get data out. :-) When I use the form from my Mac/laptop, i can enter the sata and I get the result. When i try to connect with this code under here. I can pass the form, and establich connection to DB, but my query, where I put country in, is empty...

dynamic table size html

I'm making a website that has to fit in the entire screen regardless of screen-size. I'm using a table to use this at the moment but I ran into a problem. The web page is divided into 3 columns: the left column stays at the left of the screen and has a fixed size with a background. the right column stays at the right of the screen and ...

How to get 'text' out of <p>Text<input type="... </p>

Hello, I can't get this to work in IE: This is what the HTML code looks like: <p class="red">Red: <input type="text" id="red_input" value="0"></p> id is in this case: document.getElementById('red_input'); I want to return ONLY the word 'red'. It works great in FF, but not in IE. function error(id){ var prnt = id.parentNode, ...

HTML template + JSON vs Server HTML

What do you think is better? Use for Ajax result: HTML that was generated on server Return Data that would be used within template? I think plus for server rendering are escaping, easy more complex logic, when much data needed! ...

Python 3: Write newlines to HTML

I have upgraded to Python 3 and can't figure out how to convert backslash escaped newlines to HTML. The browser renders the backslashes literally, so "\n" has no effect on the HTML source. As a result, my source page is all in one long line and impossible to diagnose. I spent hours searching for the solution to no avail. Can anyone help...

IE doesn't support Q tag but you can style it.

I am puzzled with the statement that IE does not support <q> tag but it renders just fine on IE as an inline element so if it doesn't support it, so what? We can just style it with CSS to italicize and it works as expected. I tested from IE5 and up. http://www.w3schools.com/tags/tag%5Fq.asp Explain why it says it doesn't support it wh...

Why does -[UIWebView sizeThatFits:] give a larger size than document.body.offsetHeight/Width?

I am attempting to use a UIWebView to display some variable-size content, and I'd like to determine the full size of that content so that I can resize the UIWebView to fit the size of the content perfectly. My attempts at determining the correct height and width of the content, however, haven't been completely straightforward. The follo...

Proper usage of Floats (For those who love CSS standards)?

I would like to know if I'm using floats in the right way (efficiently) in this code bellow. There are basically 3 columns (with float left, left and right assigned respectively). Am I using too many floats? Will this cause me problems if I add or delete columns? This is my index.html: <div id="content"> <div id="left-column"> <h2>...

Can't get div positioning correct in IE7

I can't for the live of me figure out how to get one element in my layout to be placed properly in IE 7. You can see the page here: http://www.iancreates.com/debbie/contact/ Works fine in Firefox, but if you look in IE 7, you'll see the sidebar is beneath the body content. I've tried everything I could think of (floating both divs, cha...