html

loading div content from external with jQuery.load into own div

Let's say that I have two html pages that are identically designed, but have different content. I have the same div with the same id on both pages. How do I use jQuery.load (or what do I use) so that the div#conent does not get added into the div#content of the first page. I've tried this: $(document).ready(function(){ $("a#linkHome"...

Prevent tabstop on A element (anchor link) in HTML

Is it possible to cancel an <a href="..."> from being tabstopped in any browser? I would like to do this without Javascript. ...

Loaded HTML Text In Flash not displaying with BlendMode.LAYER

Have a textField in which I'm loading HTML formated text into it. This textField sits inside a parent container which has its blendMode property set to BlendMode.LAYER. When I run the movie, the html text doesn't display. Any clues why? ...

Open a new window more than once in IE via target="_blank" in a link tag?

I have a page with a ton of links (foo). If a user opens a link they get a new window (bar) via target="_BLANK" in the link. But if they go back to foo and click on another link instead of another new window (bar2), bar navigates to the new link. This is only an issue in IE Fx opens a new tab. I need IE to do the same. Or open a new win...

How do I prevent empty GET variables from displaying in the URL

I'm having a bit of a weird situation here. I have a form that submits using the GET method for a search function. On the subsequent page after a search, all the variables are displayed in the URL even if they are empty. For example if I make a search for movie title equaling "hello," I'll get this: /GetResults?title=hello&year=&directo...

HTML: How to limit file upload to be only images?

With HTML, how do I limit what kind of filetypes can be uploaded? To easy the user experience, I want to limit file uploads to be only images (jpeg, gif, png). <form method="post" action="..." enctype="multipart/form-data"> <label for="image">Photo</label> <input name="image" type="file" /> </form> ...

rendering thousands of thumbnails table vs div vs span

So my current code using tables to render thumbnails. when the page is resized, I use javascript to recalculate the number of rows and reinsert the cells into the correct columns. This works fine for 100 thumbnails but is kind of slow when displaying 3000 thumbnails. So I've looked at how bing displays its thumbnails and it appears to ...

Replace www.example.com w/ <a href="http://www.example.com">www.example.com</a>

I am not very good at regex, but I need to convert the following example from this <li>Creations by Carol - www.driedfloralcreations.com</li> to <li>Creations by Carol - <a href="http://www.driedfloralcreations.com" rel="external">www.driedfloralcreations.com</a></li> ...

CSS + IE 6 = Background-Image is not showing (and pulling hair out)

I have a web page. This web page looks correct in IE 7, 8 FF 2, 3, 3.5 Safari 3, 4 Opera 9, 10 and Chrome. Essentially everything except IE 6. The layout even looks fine. The only thing that is not working as expected is that none of the background-images are showing properly. Here is the code that I am trying to apply a background ima...

jQuery: prevent form submition with enter key.

I just wrote this nifty little function which works on the form itself... $("#form").keypress(function(e){ if (e.which == 13) { var tagName = e.target.tagName.toLowerCase(); if (tagName !== "textarea") { return false; } } } In my logic I want to accept enters during input of a textarea. Also wou...

rowspan with css

my website layout uses a table like this. <table> <tr> <td align="left" valign="top" rowspan="2" style="padding-right:41px;"> </td> <td align="left" valign="top" width="440px"> </td> </tr> <tr> <td align="left" valign="top" width="440px"> </td> </tr> </table> a nav bar on the left which takes up two rows and two columns. How can I ...

Set position of page footer using CSS/JS

I've created a standard header, body, footer web page. I want to position the footer to be at the bottom of the viewable browser window when the body is smaller than the height of the window, but at the bottom of the page when the body exceeds the browser height. Any suggestions on how I use CSS (preferably) or JS to accomplish this? ...

Multiple values for an input in a form?

Alright, let me start with an example. I have a bunch of items and they can fall into series of categories. An item can be in multiple categories. Basically what I have is a listing of items with checkboxes grouped by category. Again an item can appear more than once. So it could look something like: Blue Items: Item 1 Item 2 Item 3 Re...

(ruby) does one escapse using h() in view files only for security, or in controller files as well?

I receive input in the form of URL strings (aka controller/action?example=yes), and I'm wondering if I need to escape the content of the string for security. For example, if I assign the param to a variable: example = params[:example].to_s do I need to escape anything? or do I only apply h() when I put the value of :example back in t...

css for footer text

I'm having a hard time with a simple css snippet for footer text. The footer text must always be at the end of the page and the end of the screen whatever comes later. ...

Insert HTML into iframe

Hey Guys, I am creating a in browser HTML editor. I am using the syntax highlighter called Code Mirror which is very good. My setup is an iframe that holds a view of the page which is being edited and a textarea which the plain text HTML sits which the user edits. I am trying to insert the edited HTML from the textarea into the ifram...

override definition in css file

I have a css file that defines style for all <p> tags. like this p { ......... } How can I write a <p> in a page where the stylesheet is included that has default styling? ...

How can I control a dropdown's visible text's position?

Hi all, I have a dropdown that I'm looking to enlarge without effecting the text and ensuring the right hand down arrow remains at the full hieght of the element. I've tried adding padding but this effects the right side: I've tired adding height but I can't vertically align the text: Anyone solved this before? Thanks, Denis ...

How to deal with HTML-entities for publishing multilingual content

In case of publishing any text online as a HTML page – I face the problem of the correct reflection of symbols of several languages which require extended Latin character encoding. In this case I’m searching the Entity (hex) from the list on this site http://theorem.ca/~mvcorks/code/charsets/auto.html . I wonder If it’s possible to save ...

Any ideas on how to embedded image on the rich text editor??

It is the demo application web site: http://www.freerichtexteditor.com/index.php?inc=demo/index The rich text editor can insert image on it, just like a word document, but the traditional web html form can't add an image on the html form. How this rich text editor work? why it can insert an actually image on the html form instead of p...