html

Can I tell anything about a hyperlink that was clicked in JavaScript?

If I have code like this: <script> function determine() { // ???? } </script> <a href="blah1" onclick="determine()">blah1</a> <a href="blah2" onclick="determine()">blah2</a> Is there a way in determine() to see which link was clicked? (Yes, I know, the easy and correct thing to do would be to pass "this" to determine()...but in ...

PHP: How do you determine every Nth iteration of a loop?

I wanted to echo an image every after 3 post via XML here is my code : <?php // URL of the XML feed. $feed = 'test.xml'; // How many items do we want to display? //$display = 3; // Check our XML file exists if(!file_exists($feed)) { die('The XML file could not be found!'); } // First, open the XML file. $xml = simplexml_load_file($fee...

How to render HTML chunk?

What's the best way to render a chunk of HTML in an application? We have a rich text editor control (from Karamasoft) in a web page, and need to generate a PDF with records saved from the control (with custom page headers, page footers, and record headers) so I need to be able to render the html so it can be "drawn" onto the page to be s...

Which are the valid control characters in HTML/XHTML forms.

Hello, I'm tring to create form validation unit that, in addition to "regular" tests checks encoding as well. According to this article http://www.w3.org/International/questions/qa-forms-utf-8 the allowed characters are CR, LF and TAB in range of 0-31, the DEL=127 in not allowed. On the other hand, there are control characters in rang...

Create HTML webpage programmatically in C#

Hello. I was wondering: is there a way to create HTML files programmatically in C# as you can do with XML? Mine is a console application, so maybe some of the options are not available. Basically, I would like to do something smarter than just building a big string. Possible scenario: Instead of writing: string html="<html><head...

Where can I find a standard set of rules for designing web pages?

I have been making webpages for about 5 years now. I'm a C# programmer but I do know HTML, JavaScript, and CSS by nature and all my websites seem to look like they just walked out of the year 1995's internet. Is there quick reference to a set of do's and don't in web design? Note: Even though my websites don't look great, at least they...

Order of stacked HTML elements

I am looking at a jQuery screencast (jQuery for Absolute Beginners: Day 8). It has this code: <script type="text/javascript"> $(function() { $('.wrap').hover(function() { $(this).children('.front').stop().animate({ "top" : '300px'}, 900); }, function() { $(this).children('.front').stop().a...

Desktop search that won't display source files rendered as HTML

I've been using X1 and Microsoft Search to index my source code, but find that asp and other web files are indexed as HTML and searchable by the HTML content rather than the source code. Is there a desktop search that lets me index my code samples as TEXT and not apply the formatting and restrict my search? ...

Why do browsers insert tbody element into table elements?

I was playing around with some ideas using raw html and JQuery. One thing I did was to create an table element with a set of rows. <table id="MyTable" > <tr> <td>Title</td> </tr> <tr> <td>1</td> </tr> <tr> <td>2</td> </tr> <tr> <td>3</td> </tr> <tr> <td>4</td> ...

Webpage localization

Hi friends i develop a website . in that i need to customize for localization . i keep the different country flag images . when i click images the webpage is changed to that relevent country language.i tried google language translater tool , But it is not efficient Please guide me to do that . Thanks in advance... ...

Why does the content of this page shift a few pixels to the left/right?

I'm using a "Centred Header/Footer/2 column CSS" layout. In test1.htm if their is minimal page content and the page footer is fully visible within the browser window then when you click on test2.htm the page content shifts to the left. If test1.htm has enough content to push the footer off the bottom of the browser window then when you...

Can CSS be used to target user definded attributes in HTML tags?

I have a lot of divs with attributes and values. My question is can I target these divs using CSS for styling purposes? That way I can create CSS classes for styling and have javascript for adding functionality on the page. Otherwise I need to create CSS classes and attributes individually. An additional point - I'm doing this so that...

load html page into flex textarea

Hello I would like to show some textcontent from a website in a textarea box in flex. <?xml version="1.0" encoding="utf-8"?> import mx.managers.PopUpManager; import mx.core.Application; import flash.net.URLLoader; import mx.rpc.events.ResultEvent; import mx.controls.Text; import mx.controls.Alert; [Bindabl...

is there any difference between echoing a line of output or closing the php tags and writing out the html code?

I'm almost sure the answer to this is "None at all!" but I'll ask anyway. If you have a conditional statement in PHP which echos a line of html, is there any difference performance-wise between these 2 examples: <?php if ($output) { ?> <h2><?=$output;?></h2> <?php } ?> and <?php if ($output) { echo "<h2>".$output."</h2>"; } ?> ...

Modal, modeless divs on a page

I'm using modal, modeless divs (I mean fixed, styled divs) on my HTML page. This page contains iframes with modal divs as well. When I open a new div on the page, I need to disable keyboard events on the parent page (opener page). Also I need to be able to handle tab key presses on the parent page. I have Googled, but I haven't found ...

How to select items from multiple pages using PHP, HTML, etc?

On a site that I'm working on, I'm displaying results from a database query. Each page shows 15 results, so if there are 45 results returned from the query, they will be displayed on 3 separate pages, each containing 15 results. I want the user to be able to select any number of items from the first page, then switch to the other pages ...

Changing the border on an image map

How do I change the border of an image map(on mouse over) that i have placed over a part of the image ...

Using different CSS sheets with the same rule names for different HTML document elements

I need a way to load multiple style sheets with the same rule names, and then apply them to different elements on a page. Is this possible? Here's an example of something I'd like to do. Take the two style sheets below: style1.css: .size{ color: #FF6600; font-size: 18px; } style2.css: .size{ color: #FF0000; font-size: 14px; } ...

HTML naming conventions for ID, class and to include element type prefix?

Hi there, Does anyone know of a good resource to explain good naming conventions for HTML ID and classes and whether to prefix with IDs with an element type i.e. btn or button or similar? Should classes be plural or singular? I get that IDs should be singular due to them being unique, but what about classes? IDs and classes should us...

Prototype: How to prevent button pushing until response is made

I am using this piece of code to make text button on web page <a href='#' onclick="new Ajax.Updater('history', '/responsesG', {parameters: {name: '%s', port: '%s', profil: '201', action: 'profile'}, insertion: Insertion.Top} ); return false;">Do something</a> since it is costly call I would like to prevent user from multi...