html

How, using JavaScript, do I change an <a> tag's onclick event handler to a function with parameters?

I'm aware that you can set an onclick handler like this: my_a = document.createElement('a'); my_a.onclick = somefunction; ... but what if somefunction takes a parameter? For the sake of simplicity, let's say I need to pass it the string "x". Is is possible to dynamically set the onclick handler to somefunction('x')? ...

Escape HTML to PHP or Use Echo? Which is better?

In terms of performance , what would be better. Using PHP to echo all the HTML output so I can pepper it with the various bits of working code and variables or escape HTML to php periodically throughout the documents. I know there may be some readability issues but I'm not to worried about that. Thanks all! Example 1 echo '<html>', ...

Delay text from displaying and fading in the background-color

I want to fade in text when loading a page, w/ the background-color slowly fading in as well. <div id="alert-box"> <p>This is the alert box, this message will display 5 seconds after page is loaded, with the background-color fading in.</p> </div> Here is what I have for the jQuery for now: $(document.body).click(function () { $...

Embedding Quick Time movies in HTML Pages

I am trying to embed QuickTime movies into my HTML/ASPX pages but somehow they work on local machine but when i deploy them on my server they dont play at all. I tried all sorts of options but still unable to find a reason for that. anybody else have been though this issue ? I did a quick research and find few resources but even though...

delaying the loading of a certain css background image

in a CSS like this : ... #big-menu { background: #fff url(../images/big-menu.jpg) no-repeat; } #some-menu { background: #fff url(../images/some-menu.jpg) no-repeat; } #some-other-menu { background: #fff url(../images/some-other-menu.jpg) no-repeat; } ... is there a way to delay the loading of #big-menu's background image, ...

Warning: Cannot modify header information - headers already sent by

when am running player.php its giving an error Warning: Cannot modify header information - headers already sent by (output started at /www/110mb.com/m/u/s/i/c/k/i/n/musicking/htdocs/player.php:8) in /www/110mb.com/m/u/s/i/c/k/i/n/musicking/htdocs/player.php on line 24 can u plz help? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transi...

CSS: When using float:left to keep my content anchored to my menu by its left side, the menu dissapears in IE

I have a menu of links on the left, and content in the middle. If the content is longer than the links, it will wrap below them instead of staying neatly to the right. Adding float:left to my content div fixes this, except in IE, where it causes the menu (and the footer) to disappear entirely. I need to either fix the problem with floa...

Make a div fill the space

Hi, I'd like to put two columns on the side of the content div. The part I have problems with is that I want the columns being built from 3 parts. The top and bottom should have fixed heights, but the middle one would adjust depending on the content height. Look at the sample with one column: <html><head> <style> * { border: 1px solid ...

Single image file to store all the little images on a page

In one of the recent Stackoverflow podcasts, Jeff talked about having a single image file having all of those tiny images that are all over a page and then cutting it with CSS so that all the images get displayed correctly. The whole point is to reduce the number of server requests so that the page gets loaded faster. I was like "wow, th...

Issues with dynamically setting style.overflow in Firefox

I am working on a website for a client, and we have the following requirements: When the browser width is greater than 960px don't show a scroll bar. When the content is wider than the browser but the browser width is greater than 960 don't show the scroll bar If the browser is 960px don't show the scroll bar when it is needed. I hav...

Best Way For Back Button To Leave Form Data

I'm creating a web page based on user input from a form. After the user sees the generated page I want to allow them to press the back button and make changes to the form. I would like to display the form as they had filled it out previously. What is the best way to get this behavior (with cross browser support)? ...

What is the difference between form action="" and form action="."?

Is there any difference beween: <form action=""> ... and: <form action="."> ? ...

Block URL using IFrame

I'm loading an external page into an IFRAME, which contains an advertisment that I don't want to let load. Is there a way I can set a URL/domain blacklist for any content inside an IFRAME? ...

Notifications on a website

I am looking for different ways of how to display notifications. I was looking at the way Palms webOS does it and woundered if any one had done it like they did it but for a website. What do you think is the best way to display notifications? Edit: The notifications will be stuff like "you got a new mail", "you have an appointment" etc...

C#/asp.net; open a file write contents to a div, span, label, some kind of container.

I’d like to be able to open a text/html file and write its contents to a container, either an HTML div or an asp label would be fine. How do I go about doing this in the C# codefile for the page in question? ...

Trouble Using JQuery UI.Resizable() and UI.Draggable() with an iFrame

Hello All, I'm trying to create a dialog window using JQuery. I'm making progress so far, but running into some issues w/ the iframe... I know that iframes are usually frowned upon, but they are the only things that will meet the requirements of the project. Anyway, I can successfully implement the resizable and draggable plugins, bu...

Why does overflow:hidden not work in a <td>?

I've got a table cell that I would always like to be a particular width. However, it doesn't work with large strings of unspaced text. Here's a test case: <html><body> <table><tbody><tr> <td style="border: solid green 1px; width:200px; overflow:hidden;"> This_is_a_terrible_example_of_thinking_outside_the_box. </td> </tr></...

What is so evil about a Flash based website?

I have the feeling that Flash-based ( or Silverlight-based) websites are generally frowned upon, except when you are creating games or multimedia-content rich applications. Why this is so? ...

HTML List Problem

Dear all, I am making a list with heading and subheading, my main list Home1, followed by subheading. How can I exactly position the subheading content without affecting another list? Any idea? <div id="wrapper"> <ul id="testnav"> <li> <a href="#">Home</a> <ul id="subnav"> <div style...

Firefox sidebar extension link loaded into a new browser tab. How-To?

I have a friefox sidebar extension. If its opened by clicking on the toolbar icon I load it with a webpage ( that I have authored ). Now, if the user clicks on the link on the webpage ( thats loaded into the sidebar ) I want the linked webpage to open up in a new tab of the main window. I tried with this in my webpage markup: <a target=...