element

Refresh an elements style in Javascript

I have a table which the rows are loaded dynamically from a recordset. I also have used Javascript so that when a checkbox (not in the table) is checked it hides all the rows when column x = y, but I have a vertical border (really just a background image positioned to the right)which fades on the last row of the table using the CSS .sort...

getting a list of all descendants of an element in mootools

Hi there... suppose I have a mootools Element and I want to get a list of all it's descendants (not only direct children)... how can I do this? Thanks! ...

XmlWriter Not Creating New Element in VB.net

I'm writing out an XML file using VB.net. When I try to create another element to be written past the first, it errors out saying: "Token StartElement in state EndRootElement would result in an invalid XML document. Make sure that the ConformanceLevel setting is set to ConformanceLevel.Fragment or ConformanceLevel.Auto if you want to...

What is the proper way to compare an element of an std::string with a character?

Hello, I am not a very experienced C++ programmer, i get a warning when i do the following: if (myString[i] != 'x') { } what is the appropriate way to compare these? thanks for your help! ...

How to find the snippet of JavaScript that modifies an element?

The page I'm trying inspect has a hidden <input type="hidden" name="Foo" value="123 /> element on a page, where Javascript/AJAX modifies the value. I'm trying to find where on earth in Javascript is the code that modifies this value from time to time. Is there a tool that could help me find the places in javascript that use/modify that ...

how to get the name of the parent element of the cursor positioned using javascript in html/jsp

I need to get the element name(i.e. text area name where the cursor positioned), and pass the name to the server then when it is back I need to pass thru the url for anchoring to the position of the element. every text/textarea have its own anchor names defined in a form i need to know where the cursor was positioned before form submit ...

Is there a style selector in jQuery?

If I want to select every image which it's alt is Home for example, I can do something like this: $("img[alt='Home']") But how can I select every elements which their width CSS property is 750px for example in a single selector? EDIT: If there is no such selector, is there any plugin, or any plans to do it in the next jQuery versions...

Dojo attach event to dynamically created element

I have a form. I include Dojo. Everything works fine. I use Dojo to change the class, values and attributes of input elements based on user input(sort of like validation). The problem is, because of IE, I'm required to create a new input element(that I know of) if I want to change the 'type' of an input from 'text' to 'password'. Once ...

XSLT - Match element with multiple child elements

<xsl:template match="element[child]"> The above works. What is the real syntax for the following pseudo-syntax? : <xsl:template match="element[child1 AND child2]"> In the place on AND: and doesn't work & doesn't work , doesn't work What is it? Thanks. ...

Select content from JQuery ajax return object

As I understand it, the JQuery load() function retrieves a document and can perform the quivelent of: $('#somecontenttograb').html() upon it. I would like to know how to do that... In essence, I want to use JQuery to asynchronously download a web page and then grab elements from it and insert them into my own document at different pl...

MVVM Sliverlight - can not assign existing control to a property of collection of custom elements in XAML.

I have a class public class Item { public string A { get; set; } public Control B { get; set; } } I'm using MVVM with Silverlight. I have a custom view that is inherited from a standard view. Custom view has public property public ICollection MyItems { get; set; } which should store items described above. In x...

CSS Hover attribute on sub-element rather than entire element

Hopefully this makes sense - my html is as follows html <a href="#" class="someclass">An <span class="sub">Interesting</span> Link</a> where the css is simply color information. What I'd like to do is to make it so when you mouseover the link as a whole only the "sub" information is affected by the hover attribute. While this would b...

XPath: what can be selected?

Am I correct in thinking an XPath expression can only point to/select either an element or an element attribute? ...

[Silverlight] How to determine if the mouse cursor is over a given uielement ?

I need to determine whether the mouse cursor is over a given UIElement. The method should work even if another element is placed on top of it (because it has a bigger Zindex). I tried using MouseEnter/Leave events but mouseenter does not trigger if the element is not the top most element. Any ideas ? ...

Connecting two WPF canvas elements by a line, without using anchors?

I have a canvas for diagramming, and want to join nodes in the diagram by directed lines (arrow ends). I tried the anchor approach, where lines only attach at specific points on the nodes but that did not work for me, it looked like crap. I simply want a line from the centre of each object to the other, and stop the line at the nodes' e...

Get the string representation of a DOM node

Javascript: I have the DOM representation of a node (element or document) and I'm looking for the string representation of it. E.g., var el = document.createElement("<p>"); el.appendChild(document.createTextNode("Test"); should yield: get_string(el) == "<p>Test</p>"; I have the strong feeling, that I'm missing something trivially s...

How to get the HTML for a DOM element in javascript

Hi, Imagine I have the following HTML: <div><span><b>This is in bold</b></span></div> I want to get the HTML for the div, including the div itself. Element.innerHTML only returns: <span>...</span> Any ideas? Thanks ...

IE6 floated element wrapping problem

I am trying to get tags to wrap to the next line by left floating them. In firefox the text will wrap onto the start of the next line, however IE6 will wrap the text onto the line directly under the start of the text of the tag. So for example if the a tag is halfway along the line it will wrap to the next line but halfway along it inst...

Javascript Checking array for presence of a specific number

Hi all, I have search through quite a lot of questions here, but havent found one that i think fits my bill, so if you know of one please link to it. I have an array that i want to search through for a specific number and if that number is in the array, i then want to take an action and if not then another action. I have something lik...

Button Element with Type Submit & PHP Challenges

Recently I change from <input type="button"> to <button> in my forms however the form being processed by PHP wouldn't then submit to the database. Am I missing something in my code? Basically all I have done is changed this: <input type="submit" name="submitAdd" value="Ask Question! " /> To this: <button type="submit" class="btn" n...