html

trying to freeze the left column

I would like the left column fixed when I scroll to the right. Here is my code, thanks. css table <script type="text/javascript"> $(function() { //alert("testme"); //$('#addScroll').jScrollPane(); //$('#addScroll').scrollTo(150, 800 ); }); function show() { //alert("test"); var shDiv = doc...

Getting image width and height of an image being used as a CSS background.

Hello all, i'm building a jquery slideshow carousel for a theatre site, it's being used to display the titles and the associated photos of the 5 most recent shows at the theatre. The shows, and the URLs of the photos that have been uploaded for them, are loaded in from a database, and inserted into the structure below: <div id="slidesho...

Can you mix % and px to align a table?

I am trying to align different tables with different amount of columns so the first two columns are align and the rest are independently align but using % it is very difficult and when resizing window it losses alignment. That is why I was trying to align mixing with % and px on td, ex. <table> <tr> <td width="100px"></td> <...

What is the correct way to refer to HTML elements via JavaScript?

Hello. I am making a colour-picker using pure JavaScript and HTML. It consists of three HTML selects (drop downs boxes) and one div the background-colour of which will be changed by JavaScript. I am also trying to do this as "correctly" as possible. This means no Javascript code in the HTML. My code so far looks like this: var red ...

How do I get the counter for facebook share button to show all the time?

I have a twitter share button and a facebook share button in my blog page. The twitter counter always shows, but the facebook one only shows when you post something, and then goes away when the page is refreshed and does not show up again until something is posted. I want it to show all the time as to adhere to design cohesiveness. ...

How to toggle element visibility without jQuery?

I'm writing an auction template for eBay, hoping that eBay would allow it. Apparently they don't because jquery has things like string.replace() etc. The code is very basic. $(document).ready(function(){ function changeImage(){ if($("#coin1").css("display") == "none"){ $("#coin1").fadeIn("slow"); }els...

What is the correct way to have the option tag default value set in IE6?

What is the correct way to have the option tag default value set in IE6? I've tried doing <option SELECTED> <option selected='selected'> <option selected='true'> none of them work in ie6, any ideas? ...

Draw a Link and Graphic over another graphic

I have a picture on a page, and I simply want to draw a link with a small graphic in the upper left corner of the picture. Is there any way to do this? to overlap it on the picture appropriately? ...

Voting/rating system: How to fail gracefully when javascript isn't supported/enabled?

I'm implementing a voting system like the one used by stackoverflow. It's working with ajax sending POST request to an url. I'd like a way to fail gracefully when javascript/ajax isn't supported or enabled, a GET like /voteup/id isn't even considered because i'm altering the database. What's the best solution? I'm either considering a fo...

AutoComplete field and IE

My web page does not have the autocomplete attribute that would tell browsers not to autocomplete the field. In spite of not having this attribute, IE 8 or Safari (not sure on other browsers) does not autocomplete the page. Autocomplete does work on some sites (such as Gmail) so I am assuming that the browser setting is not causing it? ...

How can I launch a javascript from an <iframe>?

There is an iframe on the page. Can the parent document (iframe parent) be accessed from this iframe? What I want to do: when the user presses a button inside iframe something happens on the main page Thanks! ...

Detecting when HTML image source update is done

I'm using jQuery to update an image source $("#myImage").attr("src", imagePath); Immediately after, I try to detect the image's width with $("#myImage").width(); Looks like sometimes (especially on first update) the update is not done, and I get invalid data. Is there a way to make sure the image finished loading? ...

looping through html table with jquery

i have a html table and i want to basically loop through each row and each cell per row and simply print out the results. The one thing is some of the cells have input boxes, some have select dropdowns and some have raw content inside the TD. what is the fastest way to simply looop through every cell in an html table and get the result...

Limit Textfield Input to digits only

Hello. I've searched Google, but all the solutions I could find were really complicated and long. What I need is to limit the input of a textfield in a survey I'm making to digits only. What is the quickest and cleanest way to do this? (I'm using HTML 4.01 strict and ECMAScript) Thanks in advance. ...

IE6 position fixed problem

Ok I am not trying to get an element to a fixed position, im trying to get a div tag out of fixed position. i have a header that is at the top position relative. below it is just another div tag with content in it. when i went to preview it in IE6, the header was positioned at the very top, and was fixed. it stayed at the top when i scro...

how do i insert html markup into a new html page using php?

I have a php script that uses a $content variable to write text to a newly created html page that is empty. my php script works great using regular ascii text. when i try to insert html markup tags i get an error and script stops working. here is an example. the html write doesn't work no matter what html tags i use. $Content = "echo...

Display an html formatted string

I'd like to display a string that containts html code (mainly for formating purposes like italic, bold, indentation, colors etc.) from a C# console application. I don't think I'll need to go with a WebBrowser class for that, since there won't be any kind of navigation possible. 1) What would be the most straightforward way to do it? 2...

how to avoid a new line with p tag?

How can I stay on the same line while working with <p> tag ? Thank ...

a break in a table

i need to break them up ||name || id || __________________ ||tab || 1|| ||ritchie|| 2|| __________________ _________________ ||apple|| 3 if i use tr td, it would end up as ||tab || 1|| ||ritchie|| 2|| __________________ _______||_________ ||apple|| 3 ther ewould be a line in the break too. how to achieve the one whole single ro...

How to close current tab in a browser window ?

I want to create a link on a webpage that close current active tab in a browser without closing other tabs in browser. When user click that close link a alert message should appear asking user to confirm with two buttons, "YES" and "NO". If user clicks "YES", close that page and If "NO", do nothing. How it will be done? Thanks ...