html

Removing an element from DOM

I use this method to escape strings of HTML code on client side: function escapeHTML(str) { var div = document.createElement('div'); var text = document.createTextNode(str); div.appendChild(text); return div.innerHTML; }; I am a bit concerned about memory leaks because I'm creating DOM element and not destroying it. The p...

HTML scroll to bottom on a table

So I have a table set up that has a cutsy little javascript running in it, however it will not auto scroll to the bottom. So my question is, how the heck do I have it automatically do it? ...

IE8 ignores zero-width space when it comes before a slash in standards mode

I have a table with variable-width cells, and I want to give the browser the option to insert a line break before a slash, without forcing it. I tried this by inserting a zero-width space (ZWSP) character before the slash, and it works fine in all the browsers I tested it in, except IE6 and IE8. For IE6, I use some Javascript to replace...

CSS: Equal height divs without margin hack

Can you make two divs have equal height without 1) margin hacks because then I can't have a border : margin-bottom : -500px; padding-bottom : 500px; 2) Javascript because then there is flicker on the page for non-cached users. 3) Fixed height because then I can't add more content dynamically. It is for this page http://www.stdico...

input size Vs width

<input name="txtId" type="text" size="20" /> or <input name="txtId" type="text" style="width:150px;"/> Which one is optimal Cross-browser friendly code? Of course, it depends on requirement but curious to know how people around decide which on what basis. (afraid I expressed my question clearly) ...

jquery kwicks issue

Hi there, I've been working on my problem for the past few hours and am at the end of my rope. I need help. I have a staging page where I tested the code and verfied that it works, but on the live page, the code refuses to budge. I can't figure out why kwicks jq seems to be ignoring the html on the jujumamablog.com header. <-- this i...

Source code spellcheckers is there an open-source solution or should I make my own?

I need a source code spell-checker. Of course there is a closed source ones but I'm looking for an open source solution, That can spell check html files, php source codes any further types would be better. I also thought about making my own since there is a good libraries for spell checking, So what features you think it's good to be ...

minor jquery blip causing duplication in field

i'm trying to get jquery to add the value of a select box to both a hidden input field and a div to show in public view. here's my code <script type='text/javascript'> $("#departments_submit").click(function(){ added_departments = new Array(); var depo = $("#depo_list").val(); alert(jQuery.inArray(depo, added_departments)) if(...

css indentation

I like to do, as in indesign or quark... paragraph indent... for picure how is the proper way to do that in html and css I dont want the text to go round the image... i like to have the whole left part protected putting margin to the picture will do the trick... but for 10-20-30 pixel (fixed amount (bad)) i have try negative position...

What is currently the best HTML/CSS/Javascript configuration?

I'm getting more into jQuery and so have set up a HTML/Javascript/CSS base site which I use for all my tests. Since these tests will eventually turn into PHP and ASP.NET MVC websites, I want to use this opportunity to get the basics down right again for modern browsers and web standards before building the scripting languages on top of ...

Using non persistent Http Cookies to deliver out of band data to the browser

Imagine that your web application maintains a hit counter for one or multiple pages and that it also aggressively caches those pages for anonymous visitors. This poses the problem that at least the hitcount would be out of date for those visitors because although the hitcounter is accurately maintained on the server even for those visito...

Is Outlook-friendly HTML code different from code for a conventional web page?

My web-app has to deliver db-generated content by email. The HTML need not include javascript but _does have to include images and CSS. It's a safe bet that most users will be viewing this in Outlook. Are general guidelines different for html destined for email vs. IE? ...

jQuery - triggering function after click on <option> tag

Hello, I've got this code, that works in the latest version of firefox, opera and I'm not sure if in IE8, but it doesn't work in Google Chrome, Safari and ofc IE7 and 6. The script I have is a bit more complicated, but the problem is in this: <select> <option class='gramaz_vyber'>1</option> <option class='gramaz_vyber'>2</option> </s...

How to add a 'frame' image (png) without losing interactivity.

Hi there, I'd like to add a png frame over a kwicks image slider, but when I do, I lose the interactivity. How can I add a png frame over an element without losing the interactivity of the element below? You can see the example here: www.jujumamablog.com/jujumama/dev.html Below is the code for the dev page: <!DOCTYPE html PUBLIC "-...

Comparison between Corona, Phonegap, Titanium

I am a web developer and I want to move my web products to iPhone. One of the products is like Google Maps: show map on the phone screen, you can drag or resize the map and view some information that we add to the map. I know there are some technologies that enables you to use HTML, CSS and Javascript to develop native iPhone apps. I'v...

how to make a navigation such as this

I stumbled upon this site http://nathanborror.com/ and really loved the way they have done the navigation on the left hand site. I noticed that site is using jquery but didnt see any plugins. Any ideas on how to go about doing this? ...

input width vs textarea width

After reading the thread http://stackoverflow.com/questions/1480588/input-size-vs-width I'm clear that we should not use size attribute but css style. What will be the cross browser css that shows exactly same width for both input[text] and textarea? BTB, I tried #idInputText, #idTextArea { font: inherit; width: 60ex; } Is it cor...

html frames sizing parent according to child size

i have 2 frames in my parent frame say 1.htm ie left frame and 2.htm ie right frame now this 1.htm is quite a long frame and has a scrollbar and 2.htm is a short one i dont the scroll bar beside my frame 1 but want it to be for my entire parent window ie i wont to scroll both my left and right frames together how do i do that ...

Apply class to element if div is hidden or visible.

Check out my example here: http://timkjaerlange.com/foobar/test.html I'm currently trying to apply a class to a header based on the visibility of a div on the page. This is my markup: <a href="#">Toggle visibility!</a> <div></div> <h1 class="one">If the box is hidden this headline should be italic.</h1> <h1 class="two">If the box is...

storing additional data on a html page

I want to store some additional data on an html page and on demand by the client use this data to show different things using JS. how should i store this data? in Invisible divs, or something else? is there some standard way? ...