html

With Jquery on page loading I want to move a div from its original place.

I'm trying to do the following: Get a DIV that is inside a hidden div in the page and put it next to another element via jquery. Is there any simple way to do that? ...

Check if an input item text is already selected?

I have text input item and using select() I can highlight the text inside it, however sometimes the text is already selected for a valid reasons and when I run select(), it deselects it I think, is it possible to check if the input item is selected ? ...

How do I select a class element based on its id in jQuery?

I have multiple dynamically generated buttons with a class name of ".button". Each of these are given an unknown ID value used to uniquely identify them. In jQuery I must select one and alert the values. <div class="button" id="3"></div> The ID value is dynamically generated, therefore I do not know it. I'm new to jQuery but am basica...

How do you populate a DIV with URL from another domain?

Hi. I know it's not possible on the client to fill a DIV with content from another domain. However, I've used the Google Feeds code and it's pulling information from other domains into a DIV (no iframe) without resorting to server-side code, so I'm assuming somehow it's doable. Thanks. ...

Show just some options in in HTML drop down list

Hi everyone, How can I show 10 option out of 100 in the drop down list and the rest to be available using scrollbar? thanks a lot. ...

load page with inactive scrollbar

I have a page that scrolls through images, some taller than the others. When a tall image loads it auto-creates a scrollbar in the browser window, causing a width jerk. Is there a way to load a scroll bar regardless of if it is needed, and when a tall image apears it activates itself accordingly, then deactivates its self accordingly whe...

Passing HTML using JSON

Hi All, I'm passing Data using JSON to iPhone and iPad. One Field of Data is HTML. The problem is the encoding. Here's what I get back: > "GadgetHTML": "<strong>Hello</strong> > from Catworld<br />\n<img alt=\"\" > src=\"http://www.iconarchive.com/icons/fasticon/ifunny/128/dog-icon.png\" > />", The \ are killing me. The \n does not ...

Custom HTTP Request headers in HTML

Does anyone know if its possible to send out custom http REQUEST headers in HTML without having to use javascript (no xhr wrapper). Would it be possible to define them as meta tags within the head? Or may they be defined in the form somewhere? <meta http-equip="x-something-custom" name="custom value" /> this works, however, this is a...

Best practice how to store HTML in a database column

I have an application that modifies a table dynamically, think spreadsheet), then upon saving the form (which the table is part of) ,I store that changed table (with user modifications) in a database column named html_Spreadhseet,along with the rest of the form data. right now I'm just storing the html in a plain text format with basic ...

How to Vertically Center Images on a Line?

What's the best way to center icons on a line when the images are smaller than the line height? For example (styles inline for easier reading): <div style="line-height: 20px"> <img style="width: 12px; height: 12px;"/> Blah blah blah </div> Here's a jsFiddle example. This example also shows why vertical-align: middle does not work...

How to return $(this)

I'm using jQuery and made a plugin for some in house work that basically builds URLs for our internal API. Anyways, I want to return $(this) and im not getting the right thing and im getting a createdocumentfragment error? Plugin code: $.get(base_url,{ agenda_id:defaults.id, action:defaults.action+defaults.type, output:defa...

How to specify the column width and text alignment of an HTML table using CSS?

Is it possible to specify the width of a table column in percentages using css? Also is it possible to specify the text alignment of a specific column? For example I have a table that has 3 columns. I would like to say col1.width = 20% col2.width = 40% col3.width = 40% col1.text-align = left; col2.text-align = right; col3.text-align ...

CakePHP Routing Problem

I suffered a CakePHP Route Problem. I can only access the root "/" and it shows the CakePHP default welcome home page. Later I try to write my controller (icons_controller.php) and views (views/icons/index.ctp), it has problem. I typed in http://localhost:8080/myapp/icons/ It always says "Not Found The requested URL /myapp/icons/ was not...

display gnu diff in HTML

Is there a lib i can use to diff between two pieces of code and display it in html? I am using diff - GNU diffutils version 2.7, C#, asp.net. I dont mind the code being in javascript. I would like just the output with color text + css. I'll build the page around it. Does anyone know a suitable lib? ...

How to gray out HTML form inputs?

What is the best way to gray out text inputs on an HTML form? I need the inputs to be grayed out when a user checks a check box. Do I have to use JavaScript for this (not very familiar with JavaScript) or can I use PHP (which I am more familiar with)? EDIT: After some reading I have got a little bit of code, but it is giving me probl...

Image in table cell doesn't scale down: using ie8/7

Can anyone help me troubleshoot my website? http://www.andrewstonyer.co.uk/test/ My problem: On IE8/7 if you click on a thumbnail (only 'Pulse' and 'Time Within The Hour' are wired in right now) an overlay appears with detail of that piece. What should happen, and does in Gecko/Webkit, is that the overlay contains a table with a head...

jqGrid concatenating/building html tag incorrectly

Please excuse the length of this post, but I needed to explain what I am seeing. I have a onSelectRow option that is supposed to build stacked html <li> tags (such as <li>...</li> <li>...</li> <li>...</li> ) up to the number of static xml elements that I am looking at. But my script is concatenating all the image src links toget...

How do I set the height of a floating div in CSS?

I have two floating divs, each is 50% wide, the problem I have is that I can't get them to stretch to the full height of the window. Essentially I want each div to have 50% width and 100% height (but it isn't working) html <section> <div></div> </section> <section> <div></div> </section> css section { background: black; ...

Jquery Sorting by Letter

I am using jquery to sort through a group of paragraph tags (kudos to Aaron Harun). It pulls the value "letter" (a letter) from the url string and displays only paragraphs that start with that letter. It hides all others and also consolidates the list so that there are no duplicates showing. See the code: var letter = '<?php echo(st...

CSS: allow image to overflow from a div?

I want to create the following situation: +--------------------------------------+-----------------------+ | 1| | | IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE | TEXT TEXT TEXT | |2 | | +-----------------------------------...