element

How to position an element next to another an element of undefined position?

Hi, I am very new to html/xml/css and I'm trying my best to teach myself. However, I have run into a problem that a Google search could not solve. I would like to position a small image in a fixed location relative to another element(?) I believe this is the code of the element i want to position the second element relative to. <styl...

jQuery window scroll and elements in position problem

I'm using the $(window).scroll(function() to set classes on the navigation of a site. When a section rolls into view the navigation class changes to 'current'. $(window).scroll(function() { var top = 0; top = $(window).scrollTop(); if(top < 1000){ $("a[href='#uk']").p...

ActionScript Dictionary: How to access the first element? How is it stored?

Hello, When you do a "for... in" loop, it will iterate over a Dictionary for example. I was wondering how internally this is being tracked and how it could be accessed? I think the Dictionary class stores a reference to the first item, but I would like to access it and check but I cannot figure out how. This is a bit advanced, does any...

Cast ASP type object to HtmlControl

Hey'all How do I cast a li dom element as HtmlControl from an ASP type object? I tried it like this: var li = (HtmlControl)sender; I get a InvalidCastException... The thing is, I want to make the li (a tab) clickable, and then update an UpdatePanel... But when I start like this <li id="li" runat="server" onclick="tab2_Click"> FooBa...

how to using jquery get select element has MULTIPLE mode and reverse

Hi everyone! I have a stack with my work today. My stack here: I have a select html element and it has MULTIPLE mode: <select class="test" MULTIPLE></select> (MULTIPLE mode also type as : multiple="multiple" i inclue here) <select class="test" multiple='multiple'></select> now i only want select this element in many normal select ...

Export Failed Element Log(s) after deliver?

When a deliver has been performed I can rightlick an entry in the GUI version/element log and it displays me a popup with the element log. Quite handy. I now have a delivery with about 25 failed ones and a couple of hundred OK's. Sadly I can not sort on the column "status" so I have to make screenshots wherever I find a [!] to sit toget...

Can I debugger.break() on all changes to a DOM element?

I would really love to be able to see the code that is affecting a specific DOM element. But I also would really love not to have to look through all my javascript searching for references/selectors that might be causing the issue. Does anyone have a technique for causing a browser debugger to break on any changes to a specific DOM ele...

How do I constrain a container's height to the height of a specific content element?

I'm trying to do something which seems like it should be extremely simple and yet I can't see how. I have a very simple layout, a TextBox with an image next to it, similar to the way it might look adorned with an ErrorProvider in a WinForms application. The problem is, I want the image to be no higher than the TextBox it's next to. If...

CakePHP dynamic element

I am trying to create a message-board type element in a CakePHP app. This element will be displayed on all pages and views that use a particular layout. I want it to display all the messages in the model, then show the add form when a link is clicked, then return to the updated message list when submitted. All this without affecting the ...

How to tell if 2 arrays share the same element.

So this is a simpler form of my problem. Lets say I have 2 arrays. A= {1,2} and B={2,4,6}. If A and B share an element then delete that element from B. I know you can loop through and compare each element in A to each element in B, but there's got to be a better way! ...

How to remove all the Null elements inside a generic List in one go?

Hi, Is there a default method defined in .Net for C# to remove all the elements within a list which are NULL? List<EmailParameterClass> parameterList = new List<EmailParameterClass>{param1, param2, param3...}; Lets say some of the paramters are NULL; I cannot know in advance and I want to remove them from my list so that it only cont...

convert nu.XOM.Element to org.w3c.dom.Element

Is it possible to convert nu.XOM.Element to org.w3c.dom.Element? Am trying to construct XML using XOM APIs. But few of my legacy APIs expects org.w3c.dom.Element. So, I just want to know if I can convert. Thank You :) ...

Converting HTML string into DOM elements?

Hi, Is there a way to convert HTML like: <div> <a href="#"></a> <span></span> </div> or any other HTML string into DOM element? (So that I could use appendChild()). I know that I can do .innerHTML and .innerText, but that is not what I want -- I literally want to be capable of converting a dynamic HTML string into a DOM element so th...

top left and top right button

Dear Expert, I want to know How to create top left button and top right button element on a single row using css or jquery. Please kindly provide details step by step. Thanks MHB ...

Using Simple_Html_Dom Find with 2 attributes

Hey, Does anyone know how i could use simple_html_dom's find function to find an html element specifying 2 attributes instead of 1? Like right now I was using $area2 = $html->find('td[width="450"]'); but say I want to also specify the height for the object, etc How could I do it? Thanks! ...

How to make use of element versioning in an EHCache instance?

I am caching objects that are being sent to my component in an asynchronous way. In other words, the order in which these objects arrive is unpredictable. To avoid any issues, I have included a version attribute to my objects (which basically is a timestamp). The idea is that any object that arrives with a version that's older than the o...

XSD: disallow empty element

I have an XML Schema that looks like this: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:element name="root"> <xs:complexType> <xs:sequence> <xs:element name="A" minOccurs="0" maxOccurs="1"/> <xs:element name="B" minOccurs="0" maxOccurs="1"/> <xs:el...

Rails, element show and page updates

I have a series of divs, and each one has a delete link. Each one also has a currently hidden spinner image. Idea is that when the delete link is pressed (and the object in the div is being deleted), the spinner is displayed. Once the AJAX call to delete the object is done, then the div item is removed from the series. My problem here i...

Nodes and Elements in the DOM

Why are Element objects a subclass of Node objects? Aren't elements and nodes the same thing, with different names? Or are there other kinds of Node? ...

Setting an event with DOM javascript

I am trying to set an event in JavaScript but it is not really working. I am pretty sure I am doing it correctly too. // in index.htm: function foo() { // Load gets code from a php file via ajax document.getElementById('div').innerHTML = load('phppage.php'); document.getElementById('element').onClick = func; } // in lib.js: func...