html

jQuery.sortable. change the order by JS

How can I change the order of a list once applied by JS "jQuery.sortable". For example: <ul id="mylist"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> var x_sortable_list = $("mylist").sortable(); then, assuming this to work: x_sortable_list.changeOrder([ {item:1, newOrder:2 }, {item:2, newOrder:1 }, {it...

html document width

can someone plese clarify how to set width for an html document. i have set the width for my body tag and even made a wrapper div to set the width but still the page is running a few pixels wide? what am i doing wrong? ...

iPhone SDK: Tell UIWebView not to load images and CSS just plain HTML and JS?

Is there any way to tell a UIWebView not to load images and CSS for faster rendering? Solution: URL filtering for UIWebView on the iPhone ...

How do you make hint text like Mobile Me?

Could anybody tell me how to create something like the hint/labels on Apple's MobileMe login page (www.me.com) in that the label/hint text just fades when you click on the box and doesn't go away until the user starts typing? (And if you could use JQuery to do it, it'd be even better.) Thank you very much! (By label/hint text I mean t...

Replace a dropdown list in the last row of a table with text

I have an html table and in one column i have dropdown select. i would like a selector to get a handle to the dropdown in the last row of the table and change it to just regular text (using the value in the select). here is the tricky part, in some cases the last row will not have a dropdown and it will just be text in this cell and in...

Reference HTML Elements by name (with square brackets in them) via javascript

Hey everyone, I am trying to hide/show different html elements (div, etc...) based on whether a checkbox is checked or if a specific value is chosen from a dropdown box. I was wondering if someone can help me out. The html element is defined along the lines of this (below), and i'm not sure how to reference it by name with brackets in it...

Effect of adding excessiv ID's on html / js rendering performance

A project I'm currently working currently has about 10 ULs, each which will have anywhere from 10-50 elements in them. Its been proposed that each of those elements have a unique ID specified to it that we will use to update content with via Javascript. This seems like a large number of IDs to add to a page, but each field will have ...

Do search engines process Javascript?

According to this page it would seem like they don't, in the sense that they don't actually run it, but that page is 2 years old (judging from the copyright info). The reason I'm asking this question is because we use Javascript to replace text on our site with other more typographically sound content. We're worried that this may affect...

Is there a CSS3 selector driven Document Object Model (DOM) API for Delphi?

Or something that allows you to parse HTML in a similar way to JQuery? If not, in your opinion what is the best way to parse though HTML without having to be a regular expression expert and not rely on Internet Explorer to parse information for you? (AKA, not rely on something like: IEParser by bsalsa.com) Thanks -Brad ...

how can i grab a text from a href in a website (page source) using javaScript?

This is the part of page source of a website. I need to grab the " crsEdId=78 " in the last line. Using JavaScript or JQuery. I will use mozilla Jetpack to do the task. How can i Get this Code first? and What to do (RegEx or JQuery) on it !? <div class="tools-menu-body" id="tools-menu-div" style="display: none;"> <div id="me...

Access Dropdown Box Value When changed via JQuery

Hey, can you help me figure this out? I need to hide/show a div based on a dropdown box (the dropdown box only has a name, no id). If the value of the dropdown box is 2, it needs to be shown and for anything else it needs to be hidden. Here is what I have so far, but it doesn't seem to work (I tried using similar code on a checkbox and i...

How Can You Remove Unnecessary HTML elements with jQuery?

In wikispaces, they use one of two HTML elements as buttons in a wikispace. Here they are... <button name="lock" type="submit" class="btn"><span><span>Lock Topic</span></span></button> Or... <a onclick="jQuery(this).parents('form').submit();" class="btn"><span><span>Search Posts</span></span></a> <a class="btn primary" id="newPostT...

Is there any possibility of rendering differences betweeen firefox 3 and 3.5 and IE 7 and 8, even if we are not using any new css 3 property/selector?

I'm making a site for European client and he said Firefox 3 and IE 7 and 8 has more user than others browser for desktop in Europe http://gs.statcounter.com/#browser_version-eu-monthly-200812-201001-bar I've only IE 7 and Firefox 3.5.7 installed in my PC. Should I download portable Firefox 3.0 and test in it too even if I'm not using a...

php registration form - limit emails

i want to restrict certain emails to my website. an example would be that i only want people with gmail accounts to register to my website. { /* Check if valid email address */ $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if(!eregi($regex,$sube...

Why "alt" attribute for <img> tag has been considered mandatory by the HTML validator .. ?

Is there any logical or technical reason (with the W3C validation) for making alt as required attribute .. This is my actual problem:though my page is perfect enough with respect to W3C validation rules .. Only error I am getting is line XX column YY - Error: required attribute "ALT" not specified I know the significance of "alt" att...

Does Javascript have internal knowledge of the raw source code of a given document?

<html> <head> <script> remove_line(11); // This should remove the line 11 from source code, // eliminating the unordered list element. </script> </head> <body> <p>Some text</p> <ul><li>Some list item</li></ul> <a>Some link</a> </body> </html> I am totally aware that this code hurts your eyes. However,...

Add space between cells (td) using css.

I am trying to add a table with space between cell as the background colour of the cell is white and the background color of the table is blue, you can easily see that padding and margin are not working (I am applying it to the td), it will only add space inside of the cell. ...

Is there a Jquery plugin to fix content when scrolling?

Hi, I have a simple 3 column site - left, center and right. The center column is where the main text content goes and is generally much longer than the left or right content. before I write one, is there a JQuery plugin to keep my left and right column content in view when the user scrolls the window? i.e. they stick to 10px below th...

Using cellspacing and border-collapse:collapse cuts cell borders.

Hi I just added cellspacing to get space between the cell, but this has cut out the border of the cell an the left hand side. This is happening because of the use of border-collapse:collapse for all tables, but I read on the net that this is to standardize for cross browser. If this is true. Should I keep border-collapse:collapse for...

HTML coding and mixing of PHP or Javascript code

I am assigned a task to revise a website and at present I am working on index.html page. the previous coder has mixed a lot of javascript and CSS code in between and it is becoming difficult to read. I want to know whether it is necessary to include tags and CSS code in between? What about PHP code? Where each must reside? Edited: If...