html

echoing html with php

hello, i have this code. <?php $link = mysql_connect('localhost', 'root', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_select_db("ebay"); $query = "SELECT * FROM Auctions"; $result = mysql_query($query) or die(mysql_error()); $records = array(); while($row = ...

Convert .doc to html in php

Has anyone found a good class, or other file that will convert a .doc file into html or something that I can read and turn into html? I have been looking around for a couple hours now and have only found ones that require msword on the server in order to convert the file. I am pretty sure that is not an option but I have not actually t...

CSS shadows on 3 sides

I'm looking at all the CSS Drop shadow tutorials, which are great. Unfortunately, I need to put a shadow on three sides of a block element (left, bottom, right). All the tutorials talk about shifting your block element up and to the left. Anyone have insights into putting a shadow on three or even four sides? ...

Flash steals browser focus

I have a flash app in my page, and when a user interacts with the flash app, the browser/html/javascript stops receiving keyboard input. For example, in Firefox control-t no longer opens a new tab. However, if I click on part of the page that isn't flash, the browser starts receiving these events again. Is there anyway to programati...

Filter Extensions in HTML form upload

I have a simple HTML upload form, and I want to specify a default extension ("*.drp" for example). I've read that the way to do this is through the ACCEPT attribute of the input tag, but I don't know how exactly. <form enctype="multipart/form-data" action="uploader.php" method="POST"> Upload DRP File: <input name="Upload Saved Replay" t...

What is the best way to upload a folder to a website?

I need an easy way to allow users to upload multiple files at once (ie I need to allow a user to upload a folder). I do not wish to put the burden of zipping on the user. I would prefer to avoid Flash or variants if possible. I'm looking for a straight javascript / HTML solution if it is possible. Please note, this rules out the an...

How can I extract URL and link text from HTML in Perl?

I previously asked how to do this in Groovy. However, now I'm rewriting my app in Perl because of all the CPAN libraries. If the page contained these links: <a href="http://www.google.com"&gt;Google&lt;/a&gt; <a href="http://www.apple.com"&gt;Apple&lt;/a&gt; The output would be: Google, http://www.google.com Apple, http://www.ap...

Semantic HTML markup for a copyright notice

When a web site is licensed under Creative Commons, I use the rel-license microformat. When a web site is licensed under regular copyright, I have a boring paragraph element. <p id="copyright">&copy; 2008 Example Corporation</p> That id attribute on there is just for CSS styling purposes. I'm wondering if there's some better way to ma...

Disable spell-checking on HTML textfields

Can I somehow disable spell-checking on HTML textfields (as seen in e.g. Safari)? ...

Restricting access to page unless coming from a specific page

Hi there, I'm trying to figure out how to restrict access to a page unless the page is navigated to from a specific "gate" page. Essentially I want the page to be unaccessible unless you're coming from the page that comes before it in my sitemap. I'm not certain this is even possible. If possible, can you limit your suggestions to using...

Markdown and image alignment

I'm helping out a friend with a non-profit site that publishes articles in issues each month. They are mostly straightforward, and I think using a markdown editor (like the wmd one here in SO) would be perfect. However, they do need the ability to have images right-aligned in a given paragraph. I can't see any way to do that with the cur...

Are inputs in separate forms sent when a submit button is hit?

I'm trying to make a page in php that takes rows from a database, displays them, and then give the viewer a chance to upvote or downvote a specific entry. Here is a snippet: echo("<form action=\"vote.php\" method=\"post\"> \n"); echo("<INPUT type=\"hidden\" name=\"idnum\" value=\"".$row[0]."\">"); echo("<INPUT type=\"submit\" name=\"up\...

XSL alternating colors question

I would like to create an HTML table with row colors changing based on position and content. But instead of alternating every row, I'd like to be able to group rows together, so that I can have some XML like this: <itemlist> <item group="0">Conent...blah blah</item> <item group="0">Content...who cares</item> <item group="1">Co...

What are the different doctypes in html and what do they mean?

As the title describes, what are the different doctypes available and what do they mean? I notice that the layout looks a little different in IE7 when I switch from <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1...

Remove the default browser header and footer when printing HTML.

I got an HTML with the <body onload="window.print()">. The question I'm trying to ask is: Is there any way to remove the strings that the web browsers add to the printed page? Such as: Web site from where the page was printed Page count Title of the web page Date of printing ...

How do you create non scrolling div at the top of an HTML page without two sets of scroll bars

How do you create non scrolling div that looks like the MS Office 2007 ribbon on a web page without two sets of scroll bars. One for the window and one for the div. ...

Why doesn't dynamically generated content change the height of containing div?

I am writing a footer div that displays info from the database. The footer has a different background color than the rest of the page, and will have a height that depends on how much content the database throws to it. When I generate the content with php and call for a border around the footer div, the content appears and is, let's say...

HTML 5 versus XHTML 1.0 Transitional?

It seems that HTML 5 is going to be supported (partially) by Firefox 3.1 and other browsers. It is adding support for video and audio as tags, but these are new tags that XHTML 1.0 Transitional does not recognize. What is the behavior supposed to be if I use a new HTML 5 tag in a future version of Firefox but use the DTD for XHTML? And w...

Generic way to fill out a form in javascript

I'm looking for a really generic way to "fill out" a form based on a parameter string using javascript. for example, if i have this form: <form id="someform"> <select name="option1"> <option value="1">1</option> <option value="2">2</option> </select> <select name="option2"> <option value="1">1</option> <option val...

CSS fixed width in a span.

Within an unordered list. <li><span></span> The lazy dog.</li> <li><span>AND</span> The lazy cat.</li> <li><span>OR</span> The active goldfish.</li> Adding a class or style attribute is permitted but padding the text and adding or changing tags is not allowed. The page is rendering with Courier New. Goal is to have text after span l...