html

jQuery MetaData "data" attribute doesn't validate

Using the jquery metadata plugin, I have an element on my page that looks like this: But, if I run this through the W3C Validator - I get an error saying "there is no attribute "data"" ...have I missed anything (I realise data isn't a valid attribute, but this seems to be a 'bug' in the metadata plugin is it? - not one that's going t...

line break within Html.Encode & String.Join

I have the following line of code. <%= Html.Encode(string.Join(", ", item.company1.companies.Select(x => x.company_name).ToArray())) %> Would it be possible to somehow replace the comma with a line break? ...

Radio Button with html.radiobutton ASP.NET MVC

Hello, I'm a newbie to all this ASP.NET MVC stuff, and I was making some tests for my project. I wanted to ask how is it possible to introduce a javascript function call from the html.radiobutton function. For example, how would you declare this: <input type="radio" name = "Kingdom" value = "All" onclick="GetSelectedItem(this);" checked...

WebBrowser DrawToBitmap other methods?

I am trying to capture the content of the WebBrowser control. DrawToBitmap() would work perfectly, but it is not supported in documentation for the WebBrowser control. I have been trying to find another way to capture the contents of the WebBrowser control and save them to a local image file. Anyone have any workarounds or other metho...

How to display inline several <li> with 100% width?

Hi, I have the following html: <div id="container"> <ul> <li>element 1</li> <li>element 2</li> </ul> </div> applied with a css as follows: #container { width:100%; overflow:auto; } #container ul { width: 100%; } #container li { width: 100%; } So now I would like to have an indeterminate number of elements (<li>) all wi...

Converting a string to a mySql DECIMAL type

I am trying to insert data about an item's price from an HTML form into a mySQL database. The input field is defined as follows: <input type="text" name="price" value="0.00"/> The form is POSTed to the next page in which the database stuff is taken care of. Currently I just enter the exact contents of $_POST['price'] into the database...

Best way to convert log files (*.txt) to web-friendly files (*.html, *.jsp, etc)?

I have a bunch of log files which are pure text. Here is an example of one... Overall Failures Log SW Failures - 03.09.2010 - /logs/swfailures.txt - 23 errors - 24 warnings HW Failures - 03.09.2010 - /logs/hwfailures.txt - 42 errors - 25 warnings SW Failures - 03.10.2010 - /logs/swfailures.txt - 32 errors - 27 warnings HW Failures - 03....

Getting the directory of an uploaded file with perl

Hello, I have a Perl script which will allow for a file to be uploaded to my server. I'm not completely done with it yet, but I would like to know, if there is any way for me to get the full path of a file i uploaded. Shouldn't this be possible by checking the PATH_INFO environment variable, but when i try to check the path info, nothing...

How to make last div stretch to fill screen?

I have a site I'm trying to build and I've hit one little snag thats driving me insane. Essentially on pages without enough content to fill the viewport, I want to have the last div (my footer, fill the rest of the viewport, but it's currently being cut off. My html looks like this: <body> <div id="header"> </div> <div id="subNav"...

Best Practice: Access form elements by HTML id or name attribute?

As any seasoned JavaScript developer knows, there are many (too many) ways to do the same thing. For example, say you have a text field as follows: <form name="myForm"> <input type="text" name="foo" id="foo" /> There are many way to access this in JavaScript: [1] document.forms[0].elements[0]; [2] document.myForm.foo; [3] d...

Old fashioned html onclick return false doesn't work inIE when jQuery script is included

Ok, so I'm quite new to jQuery, but found this bizzare problem just now, If we ignore jquery for a second and consider this scenario, if i have two links like below both with an href and both with and onclick event. The first link will not follow the href because the onclick returns false, and the second link will because the onclick r...

I need a converter to make any jquery code to make no.conflict mode?

I need a converter to make any jquery code/plugin to make with no.conflict mode? or it's just possible with find and replace. ...

issue in firefox with commenting out html

I have an issue in firefox and not in IE, didn't think I'd hear myself say that one, where if I have an commented section in my html like so: <!--------------form---------------> <div id='form'> etc etc. </div> <!------------main content-----------------> The area in between the two comment tags is being completely struck out. What a...

Post parameters to a frame of new window

I have to modify an existing web search page. There is a page, where all the search filters are (form with name "searchform"). When the search button is pressed, results are shown in new window. Because the search takes up to 30 seconds, and while searching the window stays blank, I have to add a label "Searching. Please wait..." at the ...

HTML select box with a size of 1: when does selectedIndex is -1 ?

When I use a select box with a size atribute greater than 1 i.e. <select size="3"> <option value="a">a</option> <option value="b">b</option> <option value="c">c</option> <option value="d">d</option> </select> If user does not select any item I do get a selectedIndex of -1, as expected. When i use a 'classic' select box wi...

Javascript: creating div with absolute positioning

Hi, Just wondering if there's a way to position a div with absolute so that it ignores EVERYTHING else, if my site clears floats it seems divs that are created with Javascript and absolute positioning are still effected by it, is there any way to make them ignore EVERYTHING else and go exactly where I set them, regardless? ...

How to do like this list using <li> and CSS?

Hi, i want to make an stylized unordered list like the following, but i don't want it to be completely divs, i want to use the <li> & <ul> tags and maybe a div if it's necessary. Any sample code to make like this ? Thanks ...

IE 7 crashes with style position relative

Hi All, Below link code causing IE 7 to Crash when link is clicked , when googled it is saying there is bug in IE 7 DO there is any work around for this ? <a title="FAQ" style="position:relative;right:235px;top:-55px;" target="_blank" href="http://www.Google.com/ccp/index.jsp?pg_name=shared/help/page/Somahlep_FAQ_hwtp"&gt;READ OUR...

is application/x-www-form-urlencoded default for html form?

I found out that HTML form supports only two enctype tyeps. They are application/x-www-form-urlencoded and multipart/form-data. I understand that I use multipart/form-data when I need to upload a file. When do I use application/x-www-form-urlencoded? Is it default form enctype? ...

Vertically and Horizontally Center Image inside a Div, if you don't know Image's Size?

If I have a fixed sized container div, and an unknown sized image, how do I horizontally and vertically center it? using pure css using JQuery if css can't do it This answer makes sense for fixed width images, but not variable ones. Something like this structure (I have in mind item renderers similar to these in the list, but where ...