element

check if HTMLElement exists in Document in webbrowser control (vb.net)

I am trying to get the HTML inside a HTMLElement which has an id "block". I have tried: If webbrowser1.document.getelementbyid("block") isnot nothing then MsgBox(webbrowser1.document.getelementbyid("block").innerHTML) end if But it keep throwing a NullReferenceException and tells me to check if it null/nothing which is what I'm do...

XSLT Assignment of element value to variable: Works with Altova XML Spy, but fails in .NET app.

I want to tightly grasp the hair on the back of a Microsoft employee's head, using it as leverage to pound his head forcefully and repeatedly against a hard surface! That would make me feel nearly as good as solving this problem right now. I've got a simple XML message that looks like this: <?xml version="1.0" encoding="utf-8"?> <mess...

What could we put into Value element in CAML?

First sorry for my English. I'm very confuse about querying ListItem using CAML.Look like the Value element could contain many different content. For example,When we query a field that is type of DateTime, It can be <Value Type="DateTime"><Today Offset="20" /></Value>. Or a Lookup field, <FieldRef Name='Meeting_Set' LookupId='true'/><V...

problem baking view in cakephp

I've created a custom view template (see link below), which I'm using to bake my views in cakephp. http://book.cakephp.org/view/789/Modify-default-HTML-produced-by-baked-templates Everything works fine, but if I try to incorporate an element in my view template, such as <?php echo $this->element('menu'); ?> I get an error while baki...

onClick event does not work with xbl:inherits

I'm developing a Firefox add-on and having a problem: onClick event does not work with xbl:inherits. Other attributes like value and src work well Here is my code Binding: <binding id="CF-review"> <content> <xul:vbox> <xul:label class="CF-review-url" xbl:inherits="onclick">[more]</xul:label> </xul:vbox>...

Cannot click on textNode element

Here is my XBL code: <binding id="CF-cart"> <content> <xul:hbox onclick="return productClick(event)"> <xul:label value="Text line 1"/> <xul:description> <children includes="#text"/> </xul:description> </xul:hbox> </content> </binding> And JS: var elem = docum...

jQuery addClass to a tag problem

I have this in my html code: <ul id="navlist" <li id="tabItem1"><a href="#">Item one</a></li> <li id="tabItem2"><a href="#">Item two</a></li> <li id="tabItem3"><a href="#">Item three</a></li> <li id="tabItem4"><a href="#">Item four</a></li> </ul> I want to add a class to the a element with jquery like this: (its not working) var curr...

refer to an element of JSON (Javascript) object.

How do I refer to an element of JSON (Javascript) object. exampe: alert(homes.Agents[1].name); <script> var homes = [ { "Agents" : { "name" : "Bob Barker", "name" : "Mona Mayflower" }, "Listings" : [ { "h_id": "3", "city": "Dallas", "state": "TX", ...

xsl:element apply attributes

this question relates to http://stackoverflow.com/questions/2086179/xslt-to-generate-html-tags-specified-in-xml where I had an xml docment and used an xsl to generate html tags using <xsl:element name="{Type}" > the problem I have is that I want to specify some html attributes in my xml for example <Page> <ID>Site</ID> <Objec...

is there a way for keeping a variable from changing inside recursions, in haskell?

i'm trying to define the isInfixOf function, and i came to a solution(hope it works good :-)), but because of the recursion nature of haskell, i wrote another (help) function that almost duplicate the code of the function isInfixOf. this is the code: myIsInfixOf :: (Eq a) => [a] -> [a] -> Bool myIsInfixOf [] [] = True myIsInfixOf [] ...

jquery find element's position

<ul> <li>one</li> <li>element</li> <li>text</li> <li>val</li> </ul> how can i get the position in the ul of the clicked li ? ...

Jquery - How to find an element using class and attribute.

I am trying to figure out the most efficient way to find my element. Following i smy structure: <div class="a" customattrib="2"> in order to find this element can I do something like : $("div.a [customattrib='2']") This does not seem to work, is there another way to do this? Without the class I am able to get the value but I do no...

What is the fastest way of replacing DOM element(jQuery)?

My application is a real-time apps using ajax environment. It is a live picking of schedule. The users want see the available slot in real-time way. such that they can see other ticking schedule. And i'm using ajax to replace the element with the new one. Example: $.get(my_url, function(data){ $('#area').innerHTML(data); }); On succ...

XPath element which contains an attribute and whose parent's parent contains another attribute

Hey everyone, This is my first post here and since I've seen many great answers I thought I'd give it a try. I'm trying to use XPath to obtain a specific element in an HTML document. Here is an example based off of the Google web page: <html> <head> <title>XPath Test</title> </head> <body> <form name='f'> <table> ...

PHP - How to get the element before the last element from an array ?

How can I get the element before the last element from an array in PHP5 ? ...

jQuery new element appended to DOM does not work

I have a script that selects and drags several elements. It works fine but when I want to add another new element to that function, append it to DOM, it does not work. The function is: $(function() { var selected = $([]), offset = {top:0, left:0}; $("#selectable1").selectable(); $("#selectable1 span").draggable(...

jQuery - Best Practice for creating complex HTML Fragments

Is there a general best practice for creating somewhat complex HTML elements in jQuery? I've tried a few different ways. First I tried using createElement and chaining alot of those together with AppendTo and the like: var badge = $(document.createElement("div")).attr("class", "wrapper1").appendTo("body"); $(document.createElement("div...

jQuery: Check if jQuery object contains exact DOM element

I have a reference to a DOM element, and a jQuery object which is the result of a selector, and I want to check if that specific DOM element is in that jQuery object. Short of looping through the whole jQuery object and checking for equality, is there a straightforward way in jQuery to do this? I have tried .contains, :contains, .has an...

How do I select TD in current div element using Jquery?

I can't for the life of me figure out the correct selector syntax to get this to work. I have a div element. Using $(this), how would I select a <TD> that has a class="stock", but only within $(this) div element? ...

Zend Framework [Forms] - How to make an array of form elements (textbox)?

How can I achieve the ff. in zend using zend form: <input type="text" name="list[]" /> <input type="text" name="list[]" /> Thanks in advance! ...