html

jQuery conditional selector for table rows

I have a table with data in: <td> item </td><td> order code </td><td> price </td> I'm processing the table with jQuery which needs to find the order code: $.each($('.productList tbody tr'), function() { var orderCode = $(this).find('td:eq(1)').html().trim(); // do stuff }); If there are no products, the table shows a message...

iphone development - automatically pop up keypad on a form

Hi, I have a form which I want the user to fill in and I want to have the keypad to pop up on the iphone automatically when they hit that page instead of them tapping on the input box first. What is the special tag in order to achieve that? Also, is it possible to set a timer, eg: 3 seconds, then have the keypad pop up, instead of pop...

Assigning a variable to a cookie.. no wait! The other way around...

I would like to assign a cookie to a variable... e.g. var aVariable = $.cookie("moo"); I am using the jQuery cookie functions - do I need to set the cookie AND set the variable at the same time or something? Help pretty please! ^.^ My Code: function goBackToPosition() { var xPos = $.cookie("yourPositionX"); var yPos = $...

Get away with built-in draging html elements.

I have a problem with html-objects that moving when I´m dragging them, you know the transparent "ghost" -copy of the element that appears when you holding down the mouse and drag it. My problem is that it interrupt my mouse event. I have a image that should be able to move inside a div when you draging it with the mouse. I have to events...

Can I change a web page's scale?

Hi folks, I really would love to scale webpages down or up. Is there any way I can implement this? ...

problem getting the back button to work when dealing with IFRAMES

Hi, I have a page that contains an IFRAME with src to page 1 I then created a button on the parent page that switches the IFRAME source to page 2. On Chrome when I hit the back button it directs me to the history page of the parent page instead of just redirecting the IFRAME content back to page 1. Has anyone seen this behavior? does i...

Direct page to other page

Hi, I am using HTML and would like to know why when I enter <a class="button flip" href="index2.html">List View</a> it tries to find the original_page_url#index2.html thanks Charlene ...

Do I need to use tbody, it looks like the browsers are generating it anyway

I do like this on my document ready: $("thead").addClass("ui-state-default"); $("tbody").addClass("ui-state-highlight"); And I noticed that the class is added also to the tables that don't have tbody, I tested on all browsers. Should I ever bother to write tbody when i generate/write my HTML? ...

Drop-down list dependent form

Hi, i think its a simple answer but not sure on the best method and i am new to forms. I want to have a drop-down list with model numbers in. When a certain model number is selected it displays a form with the appropriately named inputs. e.g. Model 1 - when selected - displays input field 1 and input field 2 Model 2 - when selected ...

Get ClientID of a parameter on an ASP site

I have a parameter for a method, that should be a string and I can't come up with how to <% *.ClientID %> to the thing as a variable like that. Since its a variable i can't wrap it in quotes since it will be taken literally and when I use the parameter like a variable (as you're supposed to) i get an ASP error saying it doesn't exist in ...

Remove text from fields on input

How do I make the text disappear like the way some fields work here on stackoverflow once I start putting in text? I tried out the different 'on'-actions in HTML but that didn't really do what I wanted. Thanks. ...

html select arrow look

Hi! In my html select element I would like to show a black arrow and no background. How can I do it? ...

How to Generate HTML from within ASP.NET MVC?

Hi guys My english very terrible, so i cant explain very clear. I will try my best. is it possible to generate HTML code from within ASP.NET MVC, please? This is Controller public class HomeController : Controller { public ActionResult Index() { ViewData["Message"] = "Hello ASP.NET MVC!"; ViewData["author"] = ...

CSS problem with header and missing right space between table and page's border

Hi, I'm writing a simple web report with a simple layout for internal use. The layout consists in a header on top and a content below, usually a table and a little more (very simple). My problem is that when the table is larger than the browser's viewport, the layout messes up: the header is wide as the viewport and not as the page bod...

Highlight text as you type on textarea

Hey all, I'm trying to create a textarea that will highlight some keywords as the user types in there. I understant textarea can only support plain text and that I have to use a 'rich text' editor in order to achieve this. I would like something really simple though and not the bloated 'rich editors' out there. Any ideas? Thanks! ...

how to return data in HTML pattern from asp.net method/webmethod?

hi, In my asp.net website I need to return data obtained from DB by adding html tags to it from a server side method,just like a webmethod returns jsonified data. I am having trouble understanding if a webmethod can serve the purpose(i.e., htmlifying the data).If not how do I acheive it? Could someone please help. Thanks. ...

jQuery Draggable() and keyboard control

Hey there, I have a page with the jQuery Draggable() enabled on #person and that #person is constrained to #map. (link to plugin: http://docs.jquery.com/UI/Draggables/draggable ) However, I have also added control with the Arrow keys on the keyboard. Now, they all play well together until I get to the edge of the constrained area (the ...

Go to page based on two menu selections

Javascript noob here (I'm assuming I will need Javascript to solve this). I need to make a page which directs a user depending on the selection they make from two dropdown lists. Lets say I have a form with two lists: A contains <option>1</option> <option>2</option> <option>3</option> B contains <option>1</option> <option>2</optio...

Calling Javascript on web page from Java

Hi, My goal is to connect to an OWA page (Microsoft Office Outlook Web Access - basically an email client) and log-in, then read the new page loaded and find the inbox count. To login, I need to fill the username and the password fields and call a certain javascript function for which I know the name and header. How do I: Get the DO...

jquery length of text()

Hi, What's wrong with the below <html> <body> <div id='test')28</div> </body> </html> <script> $(document).ready(function (){ if ($('#test').text().length() > 0) // error here? alert("test"); }); I get a javascript error in I.E 6 saying function expected on the line marked error..? ...