html

jQuery to select where no children or first child is not image

I'm trying to dynamically style some elements on my pages. So, if I had the following code: <a href="#"> Select Me </a> <a href="#"> <img src="blah.jpg" /> Don't select me </a> <a href="#"> <div>Don't select me either</div> <img src="blah.jpg" /> </a> <a href="#"> <div>You can select me too.</div> </a> I would like it to...

jQuery way to handle select lists, radio buttons and checkboxes

When I handle HTML form elements with jQuery, I always end up with an ugly mix of jQuery syntax and plain JavaScript like, e.g.: function doStuff($combo){ if( $combo.get(0).options[$combo.get(0).selectedIndex].value=="" ){ var txt = ""; }else{ var txt = $combo.get(0).options[$combo.get(0).selectedIndex].text; ...

How does one validate an entire site?

I realize there's the W3C validator, which works great for one page. There's also the perl install they provide, but it seems to not work on a Mac or it's buggy. Given that 1) I have an entire set of local files How do I a) Validate the entire set b) do it behind a firewall c) do it simply without installing anything on my compute...

Problem getting the full path of the file uploaded using HTML inputfile type to read the content of the file.

Hi, I would like to use HTML input file type in my aspx page to allow user to browse for a excel file and then read the content of the excel sheet programmatically.If I want to read the excel sheet I need the full path of the file to connect to the excel sheet using asp.net.I do not understand how can I get the full path of the file. I ...

C# Localization - unexpected behaviour

Hi, I have the following line of code: <%= Html.Label((string) GetLocalResourceObject("Label_Email")) %> This generates a label within an HTML page. In the local resource file I have the following entry: Name: Label_Email Value:Email For some very strange reason when I load the page in the browser, it generates an HTML label with ...

How to efficently build an interpreter (lexer+parser) in C?

I'm trying to make a meta-language for writing markup code (such as xml and html) wich can be directly embedded into C/C++ code. Here is a simple sample written in this language, I call it WDI (Web Development Interface): /* * Simple wdi/html sample source code */ #include <mySite> string name = "myName"; string toCapital(strin...

HTML input not working correctly with AJAX update panels used else where on page

I have some update panels on my page that do some asyncpostbacks to keep some dropdownlists correctly populated. My problem is that on my page i have an HTML input that is handling some file uploads. With the AJAX on the page with asyncpostbacks, and while i step through my code behind, the files arent being uploaded. Using a postbacktri...

Trying to created a tabled layout won't work with CSS

Hello, I'm trying to recreate a sort of table layout of a contact form. Here's the current form: http://www.radonsystems.net/contact-us and this is what the work-in-progress is like http://www.radonsystems.net/newsite/?do=contact-us As you can see, there is an issue with the second form - I just don't know how to fix it. Any ideas o...

Iframe size manipulation

Is there a way to make the Iframe request an external website as if it is a mobile device, so the content returned will have a small dimension etc? I am displaying external websites in iframes, using width and height attributes <iframe src="http://marketwatch.com" width="300px" height="300px" ></iframe> but because the browser is no...

Static footer, with attached and scaling overlap

I have been asked by a client to create a site where the content area overlaps the footer. However they also want the footer to be attached to the bottom of the viewport, which I've done, but it seems that I can't find a good way to vertically stretch the content to maintain the overlap should the browser be resized. I've created a diag...

redirecting _top page from asp:login control in iframe onloggedin

So yeah, Im building a little authenticated content(.NET app) to a large html site managed by another group. They are only comfortable with managing html so all my app content will be contained in iframes. Everything is working fine as far as navigation and calling services and whatnot but i cant bust out of the frame with my asp:login c...

ASP.NET/.NET: Method to determine whether string is or contains HTML entity

Is there a method anywhere in the .NET framework or System.Web that will tell me whether a string contains an HTML or is one? Should I just Server.HtmlEncode(myString) and see if its length is longer than myString's length before encoding? ...

Select hidden input from within next td [jQuery]

I have a table layed out like this: <td> somename </td> <td class="hoverable value" > somevalue </td> <td class="changed"> </td> <td class="original value"> <input type="hidden" value="somevalue" /> </td> And what I'm trying to...

What is the most standard and compatible way to make a whole table row into a link?

Obviously you can't just surround the <tr> tag with an <a> tag and call it a day; this is invalid and doesn't even work. I have seen JavaScript used, but then what happens to browsers that don't support JavaScript? What is the best way to make an entire table row <tr> into a link? Edit: At the request of Lerxst, here is an example of a ...

HTML Double Click Selection Oddity

I didn't post this on DocType because it's not really a design thing, the visual representation isn't my problem, the behaviour is. I'm sorry if this is misplaced but I don't feel it's a designer issue. The following DOM: <ul style="overflow: hidden;"> <li style="float: left;"><strong>SKU:</strong>123123</li> <li style="float: le...

ASP.NET ListView - Scrollable with fixed headers using CSS

I am using an ASP.NET ListView control and, at the moment, I have a scrollable grid: (example below is simplified and contains embedded styling for sake of question) <asp:ListView ID="ListView" runat="server" DataKeyNames="Id"> <LayoutTemplate> <div style="height:225px; overflow:auto;"> <table runat=...

How can you convert RTF text to Markdown-syntaxed plain text in Cocoa?

I need to be able to convert RTF or HTML to Markdown-syntaxed plain text for uploading to my server. I need to achieve this in Cocoa/Obj-C 2.0. Does anyone know how to do this? Thanks so much —» Alex. Edited Thu 4:53 PM Umm. In answer to Yuji's comment, I'm trying to make an NSStatusItem droplet that accepts text. It doesn't matter ...

force refresh of part of page in browser

I have the following html: <ul class="scr"> <li class="scr"> <input type="checkbox" class="chkscr"/> <h3>Item Name</h3> <div class="scr">Contents</div> </li> .... </ul> And the following jQuery: //Set initial state of each scr section $('.chkscr input, input.chkscr').each(function() { chkSCR_Cl...

Is XSLT worth investing time in and are there any actual alternatives?

I realize there have been a few other questions on this topic, and the general concensus is to use your language of choice to manipulate the XML. However, this solution does not quite fit my circumstances. Firstly, the scope of the project: We want to develop platform independent e-learning, currently, its a bunch of HTML pages but as t...

HTML/Javascript Strange behavior with input field and TABBING

I have a strange error where if a user enters in data, say first name and then tabs, the text in the field is highlighted/selected as opposed to moving to the next. So, a person may type the first name and then tab to the next input item, text is selected and then they hit a character and now the name they typed in is deleted. If I use...