html

javascript in html spacing

<SCRIPT LANGUAGE="JavaScript"> DynamicImage1(xx) DynamicImage2(yy) DynamicImage3(zz) </SCRIPT> This snippet of JS is in my html. (Each function will display a different value based on the input parameter.) How do I set the spacing between these images? I would like them all on the same row (as they are by default) but with spacin...

asp.net: Prevent Generating Server Control Ids

The Problem When using asp.net server controls id attributes such as the following are automatically generated. <img id="ctl00_body_ULRepeater_ctl01_LIRepeater_ctl00_PartImg" src="img.png" /> While I'm not averse to id attributes in general, I try to stay away from using these unnecessarily verbose types of names and use concise, des...

HttpUtility.HtmlEncode doesn't encode everything

I am interacting with a web server using a desktop client program in C# and .Net 3.5. I am using Fiddler to see what traffic the web browser sends, and emulate that. Sadly this server is old, and is a bit confused about the notions of charsets and utf-8. Mostly it uses Latin-1. When I enter data into the Web browser containing "special"...

Two submit buttons in one form

I have two submit buttons in a form. How do I determine which one was hit serverside? ...

How can I capture rich text as input to a web form?

I need to have the user be able to cut-and-paste rich text into a big text box on my web page. How do I do that? ...

Safest way to make sure a HTML button does not send any information to the server

I'm working on a javascript app that has a form with a button that processes inputs in the browser. It is important that the data never accidentally get sent to the server when the button is pushed. Situations where this might happen is the browser may not have javascript enabled or the DOM implementation may have a bug where the click...

Select all HTML checkboxes

I have a small list of checkboxes (see below), and I noticed I can use an input element with type="reset" and it will uncheck all the boxes. I know using the input would be better than an "onClick" event of the link, because I wouldn't be relying on JavaScript, but for this example I have both. <a onclick="javascript:document.myList.re...

How can I call an XML Action from an HTML Form?

I'm trying to submit an HTML form to an action of an XML page. The XML page is called, for instance, myXMLPage.xml. The action name would be myAction. In the form action tag this is what I have: <form action="myXMLPage.xml/myXMLPage.myActoin"> </form> I know this is probably wrong, but I can't figure out what's correct. Can someone ...

What's the best way to add colored-sytax code snippets to a web page?

Is there a web gadget or service or some open source solution for doing this? Or do people just hand-code this in the HTML? I need to add some Ruby and Python code to a web page. ...

Netbeans has "Print to HTML" - is there a way to add this feature to Eclipse?

I want to print out some syntax-highlighted Ruby and Python code and Netbeans has a feature on the File menu for "Print To HTML". I'm wondering if there is a plugin or some add-on for Eclipse that enables a feature like this since it is my preferred IDE? ...

Tips for optimizing a website for Android's browser?

I'm looking for tips, tricks and resources on optimizing a website design for Android's browser. I'm building an Android app and some of the functionality will be accessible through a web interface. ...

Scrolling a page using location.hash in Safari

I have a forum page that displays a tree view of messages below the currently selected message. When you click on a message in the tree the new message body is loaded into a div near the top of the page using AJAX and then the following code is run: window.location.hash = "page_top"; Of course "page_top" is an anchor element near the ...

Can i make an XSLT transformation directly in html page ?

I know namespace are used to describe, like doctype, but is there a way or a trick to transform inner namespace html with an xsl using xsd ? <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" x...

Google translate breaks button that makes javascript function call

Hello all, I have site that works fine but when i put it through Google translate my button that initiates a javascript function doesn't work. However, some other Javascript calls via links work. Whats wrong? Example translation Thank you for any help. Update The sister site is even worse, the whole left side goes white?? Wait for ...

Why should I use 'li' instead of 'div'?

I'm not sure why I need to use ul-li vs simply using divs when listing items. I can make both look exactly the same so where is the functional advantage to creating an unordered list vs lining up divs? ...

How can I set one style to override another conflicting style in CSS?

I'm displaying links that get marked as read in a database when a user clicks them. I want to style the clicked and unclicked links based on the database information not the user's browser history. So far, when I use: 10 a:visited { 11 color: #444; 12 } 13 14 a:link { 15 font-weight: bold; 16 color:black; 17 } 18 19 .rea...

Embed YouTube videos while staying XHTML 1.0 Strict?

Is there a way to embed a YouTube video while still staying standards compliant (XHTML 1.0 Strict)? Thanks in advance. ...

HTML text not formatting

so I have HTML formatted Sql text stored in my database, I populate the contents of a <p></p> tag with it on page load, but though HTML tags are showing up in the text they are not formatting the text. Is there a step I am missing? ...

Focus on a non-input/anchor element?

I'm working on some JavaScript that requires a tag that can get focus. I'd like to be able to use a <div /> tag, however <div /> tags can't get focus. It looks like the only elements that can gain focus are <input /> tags and <a /> tags. Is there any other way to allow an element to gain focus that isn't an <input /> or <a /> tag? I ca...

Single line select box with up/down arrows like in a multi line select box

Basically, I want this: <select size="2"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> But instead of having two lines, I want it on a single line. Can this be done without Javascript? If not, I would imagine it's common enough (though I can't find any relevant links on Google)...