html

What is the right way to change the behavior of an <a> tag?

I want to make a link call a Javascript function through the onclick event and not do anything else (follow the link). What is the best way to do that? I usually do this: <a href="#" onclick="foo()">Click</a> But I'm not sure that is the best way and in this case it is navigating to page.html# which isn't good for what I'm doing. ...

Why is Eclipse deleting my files and putting them in 'Local History'!

Several times now I've had Eclipse delete files for me seemingly randomly - then they appear under the 'Local History' option. What is going on! I'm definitely not just deleting things by mistake. Most recently it deleted my template files under html-template which are quite important! I have an AIR project and a web project that ref...

Is it considered bad practice to use absolute positioning?

I was developing a web page, where I was laying out a board for a Chess-like game, along with a couple of piece trays. It's all done using HTML (with jQuery for dynamic updating as the game is played). Somewhere I'd got the notion that using absolute positioning of elements within a page was considered a bad practice, and that it was pre...

Is it time to start using HTML5?

Is it time to start using HTML5? Someone has to start sometime but is now the time? Is it possible to to use the new HTML5 tags and code in such a way as to degrade gracefully? ...

PHP's file_get_contents not returning until remote servers' keep-alive limit is exceeded

From one apache server file_get_contents returns the contents of a url straight away. On another apache server file_get contents won't return the contents of the same url until the keep-alive limit of the server hosting that url has been expired. The 2 php servers are retrieving the same url but through different network routes. What ...

C# - How to change HTML elements attributes

Hi, My master page contains a list as shown here. What I'd like to do though, is add the "class=active" attribute to the list li thats currently active but I have no idea how to do this. I know that the code goes in the aspx page's page_load event, but no idea how to access the li I need to add the attribute. Please enlighten me. Many t...

How can I use the button tag with ASP.NET?

I'd like to use the newer <button> tag in an ASP.NET website which, among other things, allows CSS-styled text and embedding a graphic inside the button. The asp:Button control renders as <input type="button">, is there any way to make a preexisting control render to <button>? From what I've read there is an incompatibility with IE post...

Any IDEs for Javascript / HTML

Are there any IDEs for Javascript /HTML that allow visualizing the effects (like MochiKit), and streamline the website design process? ...

Are there any style guides for HTML?

I have found that my HTML is, to be honest, very clunky. Small, simple pages are OK. But there comes a point when between indenting and the kinds of tags I have, it's impossible to keep lines short. Is there a W3C (or otherwise "official" or well accepted) formatting guide for clean, maintainable HTML? If not, what suggestions can the co...

c# FormField DropDownList height

I want to know how to set the height property for the HTML Select in code. Tried setting the .Attribute.Add("Style","Height:120px") just to see if I could get it to change but to no avail. ...

MS Office hyperlinks change code page ?!?

When you paste the following URL into IE: http://technet.microsoft.com/en-us/sysinternals/bb897434.aspx, the link on the right of the page cleanly says "Download Zoomit (77 KB)". If you paste the link into an Office document (Word, Excel, PowerPoint -- tested using Office 2003), and activate the link from the document, that same text ha...

Why is Apache executing .php.html files as PHP?

I have an odd problem...I'm using a documentation generator which generates a lot of output like docs/foo.php.html. It's XHTML, and thus contains <?xml...> tags at the beginning of file. The problem is, Apache has somehow decided to run it through the PHP interpreter, even though ".php" appears in the middle of the filename, and not at t...

why won't it post these results?

I am having trouble grabbing the values from the form once processed. I need your help. function updateUser($table, $id) { if($_POST) { processUpdate($table, $id); } else { updateForm($table, $id); } } function processUpdate($table, $id) { print $table; //testing print $id; //testing $email=addslashe...

PHP Script crashes IE6

The code below crashes IE6 for some reason. Much as IE is god-awful, i have never seen this before. Does anyone have any ideas? <div id="edit"> <?php $a = $_POST['category']; if ($a == "") { $a = $_GET['category']; } $result = mysql_query("SELECT * FROM media WHERE related_page_id = $a && type= 'copy'"); ?> <table width="460px;"> ...

Order of tags in <head></head>

does it matter at all what order the <link> or <script> or <meta> tags are in in the <head></head>? (daft question but one of those things i've never given any thought to until now.) ...

How to get started creating CSS for given (dynamically generated) HTML?

The Separat*ion* of Layout and Content is the domain of CSS and HTML - so far well understood. Now about separat*ing*... I'm looking for hints and Best Practices to get started with the task of providing a "skin" or "theme" for a content management system. Background: We are starting to embrace a Portal Server/Content Management Syst...

Can an html element have multiple ids?

I understand that an id must be unique within an HTML/XHTML page. My question is, for a given element, can I assign multiple ids to it? <div id="nested_element_123 task_123"></div> I realize I have an easy solution with simply using a class. I'm just curious about using ids in this manner. ...

table-based forms?

Looking for sites which offer templates for creating styled table-based web page forms. Similar to css-based forms at: http://www.smashingmagazine.com/2006/11/11/css-based-forms-modern-solutions/ (please no css is better than tables discussions) ...

jQuery Scrollable, Sortable, Filterable table

I'm looking to utilize jQuery to handle a few very common requests we get for data tables of varying sizes: scrolling, sorting, and dynamic filtering. I've handled scrolling in the past by having two separate tables with fixed width columns, along with associated div containers for the "actual" scrolling. However, this method doesn't w...

Wait cursor over entire html page

Is it possible to set the cursor to 'wait' on the entire html page in a simple way? The idea is to show the user that something is going on while an ajax call is being completed. The code below shows a simplified version of what I tried and also demonstrate the problems I run into: if an element (#id1) has a cursor style set it will ig...