element

jquery drag element

Hi All, i have a problem that i cant understand what to pass in the draagable function to make an elemnt draagable. I want to make my draggable through its id test. Can anyone tell me how to do this. Code Sample normal_tag11=' <div style="position:fixed" id="Normal_Tag1_div_dummy'+count1+'" class ="Normal_Tag1_div_dummy" >'+ 'Normal D...

jquery draggable element lost

Hi all , Can anyone help me by telling me that in the given code below when the first time element is dragged it works fine but when a new element is dragged then the draggable property of the earlier created element is lost. How can i do the dragging without losing it? if(tag==normal_tag1.id) { normal_tag_d=' <di...

How to add an element using a custom SOAPHandler

This is related to a previous question. I've pulled out the main problem as I've updated much of the code but I still have an issue. How can I have a custom SOAPHandler class add a new element to a SOAP message? I need to add a username and password to the message. If I use: public boolean handleMessage(SOAPMessageContext context) {...

How can I get the TRUE height of a div?

I'm trying to determine the height of a div. This sounds simple, but is complicated by the fact that it's only descendant contents are floated, so asking for the height/outerHeight (using jQuery)/clientHeight/offsetHeight only returns 0, even though it's clear that on the page, it is rendered certainly with a height. Here is an example o...

If a schema requires an attribute and I send it as an element, is it invalid?

A related node here was - http://stackoverflow.com/questions/152313/xml-attributes-vs-elements but that was more a design question. My question is about validity. If a schema requires <record name="foo" description="bar" /> and I supply <record> <name>foo</name> <description>bar</description> </record> Will the XML be conside...

wpf minimize the width of a ToggleButton

Does anyone know a good way to minimize the width of a ToggleButton to only the width of the content plus padding? I've found 500 posts on how to make it stretch, but none for keeping it from stretching to fill the available space. ...

Given an x,y coordinate, I need to find all html elements underneath it.

I am building an app where I repeatedly need to get lists of html elements sitting under a specific location (x,y relative to the viewport, e.g.). I am considering the following approaches, but none are satisfying: (1) Go through the html, build a data-structure that keeps track of the x,y position of every element (x,y -> set of eleme...

jQuery - .each() returning only the first element attributes, need to store each element attribute and use in each child element

I'm having headaches trying to make this work: I have a <a> element with a background-image defined with style="" attribute and I have put a function to append inside the <a> element a <span> handling different background-positions for :hover effects with opacity changes. The thing is, I need to get the same style attribute from each <a>...

XML Schema: Different Element Names (sequence)

I think the solution to my problem is very easy, but i couldn't fint it So, here is: I have an XML which have a list of elements with different names, but in sequence. An example: <DOC> <DOC_OBL_1> <TIP_DOC_OBL>1</TIP_DOC_OBL> </DOC_OBL_1> <DOC_OBL_2> <TIP_DOC_OBL>2</TIP_DOC_OBL> </DOC_OBL_2> <DOC_OBL_3> <TIP_DOC_OBL>3</...

javascript - Can not access cross domain parent element inside my iframe

Hi all. Below is description of my que: I have added bookmarklet feature to my site. For this, I have provided one link called "my bookmark" in my site.. So, I will drag that link to bookmark and it will be added to bookmark. So, from now, when I m visiting other site say "yahoo.com" .. and I like any content of that site so I can se...

jQuery: How to find prev or next element based on name?

Here's what I'm trying to do, simplified: <input rel="TimeStart"> // bunch of HTML code in between <input rel="TimeEnd"> In the Javascript: $("[rel="TimeEnd]").blur(function() { // find first previous element named "TimeStart" // compare their dates }); I tried using $(this).prev("[rel=TimeStart]") but it keeps returning nu...

how do I extract the 1st element from a ant CSV property..

given a CSV ant property, <property name="module.list" value="mod1,mod2,mod3,mod4,mod5"/> how can I just get the first element (ie "mod1" here)? I want to execute a command that will take in "mod1" as one of the arguments. Moreover.. I cannot modify this original "module.list" property to a list or anything else.. although I can crea...

Jquery sortable element

Hi All, How to access the jquery sortable element. function dropMembers() { $("ul.present").sortable({ connectWith: 'ul', containment: 'window' //containment: 'ADD_MEMBER_DIALOG' // sort: function(event, ui) { // var present_result=$("ul.present").sortable('toArray'); // ...

jquery element sortable

How can i find out which element is selected for sorting ...

finding kth largest element in an array implemented bag

we have a collection of comparable held in a bag and have to find the kth largest element. I copied to a hashSet to remove duplicates then converted the hash set to an array to be sorted and consequently the kth element accessed. its compiling but fails the testing, and I can't figure out whats wrong. any ideas? public E kth(int K){ ...

jQuery - Best way to determine a child element inside list item

From the following HTML I need to figure out which List tag has class active and further on for the active List I need to find the relevant value <li class="active"> <a href="value1" class="Tab1">Services</a> </li> <li><a href="value2" class="Tab2">Create Account</a> </li> <li><a href="value3" class="Tab3">Modif...

Is there a generally accepted way to add meta information to array-elements indicating how to handle them?

I am using an array which contains the results of a database-query, which is later formatted as html (for a webapplication) or as csv (for import in a spreadsheet). I want to attach information to the array-element which has some additional information about how the data of this element can be used. For instance, array-element-data... ...

What does the ref attribute on an element in an xsd do?

As the question says really, documentation seems to say that it references another element in the schema, but how could it be used - I've never seen it in schemas that I have worked with. Anyone got any nice use cases or something that could explain its use further? Thanks :) ...

Cannot find the declaration of element 'assignments'

So I am beginning with XML and Schemas and I ran across this today and I have not been able to figure it out. I am getting and error that says, Ln 5 Col 2 : Cannot find the declaration of element 'assignments'. I believe I have declared the element, but perhaps I am missing something and have not. This is my XML file: <?xml ve...

XSLT - Adding Elements dynamically

Hello, I've a need to display certain XML content in tabular form (XSL-FO for pdf reports), and not all the columns to displayed are present in source XML. So, I was wondering if there is a way to transform source XML by embedding additional columns based on certain element values, and then process the resulting XML to display content?...