html

What is the best way to determine if a web-page is for mobile?

Should I scan for tags in the html code? Or what? What determines whether a page is optimized for mobile? One option is to scan for tags. If so, what other tags are there? <link rel="apple-touch-icon" href="..." /> <meta name="viewport" content="width=device-width, user-scalable=no" /> Another option is to see if the HTML returned fr...

UI Design disabled radio buttons

Hi, I have an HTML interface developed using the usual suspects and I have a list of check boxes, which are segments / groups which the user can run a report on. These segments need to be created on the server, so generally would not be available until the next day after creating them. My issue is that I need a graceful way to di...

What is the correct way to stop form input boxes auto-completing?

I have a form which includes a JQUERY datepicker attatched to an <input> on the form. My problem at the moment is that since the input is a text-box, most major browsers attempt to auto-complete entries for the user, which looks very silly over the datepicker: Browsing the internet, I discovered that way back in the days of IE-5, Micr...

CSS Dropdown Menu Misaligned in IE8

Hi all, I have some drop down menus that don't seem to be aligning nicely in IE8 - they are aligning well in Firefox 3 and IE7. Specifically, the dropdowns seem to be ignoring my right:0; style. A picture says a thousand words so this is what it looks like: As you can see, the right side of the dropdown should be aligning with the ri...

Parse a string containing html using JQuery

Astounded this question didn't show up in the related questions list. There's some similar stuff, but I'd like to know: string s = "<p>Cats</p><div id='fishbiscuits'>myValue</div>"; I want to use JQuery to get myValue. How can I do this? ...

Turning off the html interpretation in php

Hi everybody, I have a problem with getting some html value stored in a php array: $data = array("Name"=>'<div style="color:red"></div>'); while(list($key,$val) = each($data)){ print_r($key." => ".$val) ; } The problem is that the script (put inside html tags) returns: Name => Foo Bar So, the div (so the html) is interpretated. ...

Transitions between different HTML pages using JQTouch for iPhone

Hi, I am trying to create a simple iPhone application using HTML/JavaScript/CSS with the help of JQTouch and PhoneGap. For accessing different parts of a web page, the transitions work fine, however when I try to do the same for different web pages, they do not work. I am doing this: <li><a class="slide" href="http://www.flickr.com/p...

How would I trim the input to a JQuery auto-complete box?

Is there any way to trim (remove leading/trailing spaces) the input entered by a user into a jQuery auto-completing text <input> box before it is matched against the list of names:values? I currently have a textbox in which users are meant to enter names. The names are then matched against a list of name:value pairs by jQuery: <script t...

Is it possible to display a results array in a defined number of columns using only client side scripting?

I have an array of images/links that need to be displayed in columns of 8 for however many rows there are, but I can not control this array. Is it possible to format this using CSS/HTML (or as a last resort Javascript) so that a new row is created after x items is displayed? ...

Is there a way to merge get parameters? - HTML/Javascript

Hi folks, often I find myself suprized about simple things, I'm not sure but I believe that this might be one of them. Often I find myself needing to merge get attributes, especially within filters and search pages within sites. This come be at times quite complicated, as you might want to remove and add parameters dynamically. Simple...

php image uploads

Hi Im wanting to accept image uploads onto my server. When a user uploads an image to the server I want to store its location in a database table. tblPictureStore: pictureid | serverlocation | caption | date added How can I do this? Also, How could I set up my add_Images form to quickly accept multiple uploads in one go, without know...

Supersleight IE png fix causing overflow problem

I am using supersleight to fix png transparency, but it is causing a strange bug, where the browser seems to ignore any overflow rule in IE6. Here is what it looks like (had to hide the list of things, but you get the idea...) I am stuck with using the fix and never come across a problem with it before. Here is the markup: ...

How to apply min-height to DIV using jQuery?

Hi I want to apply min-height to ".wide-content" min-height of .wide-content = height of right content - "274px" var leftHeight = $(".wide.content").height(); var rightHeight = $("#right_column").height(); alert (leftHeight); alert (rightHeight); if (leftHeight < rightHeight) { $(".wide.content").css('minHeight' 'leftHeight - 274');...

Get HTML area tag name from Javascript?

I would like to display area tag name after a person clicks on it. Unfortunately when I use code below for map area I get undefined name of obiekt name. It's weird because for textbox 'kot' it works well. <script> function metoda(obiekt) { alert(obiekt.name); //Here I get undefined! } </script> <input type='text' value='kot' nam...

Stop iPhone loading compressed images

When I view a JPEG image on my iPhone, it apparently load a compressed version of the image (pressumably to save network bandwidth). It has heavy artefacting and makes much of the text on the jpeg unreadable. I know the answer to this question is probably no, but is there any way to force it to load the original image served by the web...

CSS no text wrap

Please see see code http://jsbin.com/eveqe3/edit, also quoted below. I need to show text inside the item divs in such a way the the text appear only in the green box with specified width rest of the line need to be hidden. Any suggestions please... <style> #container{ width : 220px; } .item{ float:left; border: 1px so...

javascript, html document.write

I'm trying to write a javascript using document.write but for some reasons it doesn't work . I also need to make a kind of trick to 'obfuscate' the url and "src" attribute by automated bots .Any idea why ? <script type="text/javascript"> document.write("<scr\" + \"ipt type=\"text\/jav\" + \"ascript\" s\" + \"rc=\"http:\/\/www.a\" + \"u...

HTML 1 click delete from MySQL database

Hey Guys, how would I create a link that would when clicked erase a record from a MySQL database based on the id of that item? using php if possible. edit// The link will require authentication in order to view Thanks ...

IE8 vertical scrollbar problem

i have a problem in ie8, my site is http://www.2sinfotech.com/demo/guitar// when i click on join now or other link like faq. i didn't get vertical scrollbar in my site. some time i get scroll or some time not. ...

How to disable input field's autocomplete with EditorFor?

<%= Html.EditorFor(product => product.Name) %> I need the generated output to have autocomplete="off" attribute set. What I'm missing? Edit: I'm looking an extension method for EditorFor that accepts key/value dictionary for attributes, so I can call it like this: <%= Html.EditorFor(product => product.Name, new { autocomplete = "off"...