elements

What methods are present to select elements in chrome extensions?

I know about getElementById, getElementByNames ... and getElementsByTagName What other methods are available to select an element or elements from the DOM ? What if an item does not have an Id or Name. I have heard that I can use XPath expression to select a range of HTML elements. How do i do that using JavaScript? Is there a library ...

add onfocus element to html form using js

I have an input box that that is part of a form . depending on some circumstances I want to add an Onfocus element to my form but i want to do this using js and only if needed. I have listed the html code below . Can anyone tell me how I can add the onFocus element using js ? thanks <input name="associate" id="associate" type="text" s...

The list of common GUI elements.

I need a glossary with graphical examples of elements accompanied by their (I hope) standardized names. Is there some centralized resource or every framework/platform out there has it's own naming conventions? ...

SharePoint CAML View Elements index

I find it hard to find available elements I can use when creating Views. Also on MSDN they are paginated over 3 pages. Would be nice if this could be improved with examples like what can we do with these properties, because MS documentation does not provide that. So here they are: Aggregations Batch Case Column Column2 ContentTyp...

get element id that was involved in triggering an event

I have searched google but it seems no one has come across this issue. I have an keypress event set on a form. I am disabling the enter key(until all required fields are filled in) and trying to enable the + key to be used to move to the next available input area on the form. My form is highly dynamic other than the couple required fie...

Builder::XmlMarkup add multiple elements to root

I already create a xml documnt by using Builder::XmlMarkup lib and add elements something like that <sportVenueNextBookingConfigurations> <sportVenue id ='23'> <numberOfMonthsForBookings> <value type='staff'>8</value> <value type='normal'>7</value> <value type='booking_start_date'>2010-09-01...

JQuery - Browse elements from a main div

hi. i've a list of div linked to a main div-root. How can browse all elements of the main div? example : <div id="main"> <div class="trackon" id="trackline1">Line 1</div> <div class="trackon" id="trackline2">Line 2</div> <div class="trackon" id="trackline3">Line 3</div> <div class="trackoff" id="trackline4">Line 4</div> ...

XML sequence with arbitrary number of comments

Alright, so I'm using XML schema to validate a following type of xml file: (just pretend the parens are actually angled brackets). <root> <A> <B></B> <C></C> </A> </root> pretty simple -> except the catch is that I also want to have a comment element, which can occur an unbounded number of times in any order (provid...

Click through a DIV to underlying elements

Hi there, I have a div that has a transparent background, and a border - sort of like an actual window, window-frame, and transparent walls. Under this, I have more elements. Currently, I'm able to click the underlying elements when I click outside of the overlay div; however, I'm unable to click the underlying elements when clicking ...

jquery separate the onclick events of wrapped elements

I have an anchor link inside a div. I would like both the anchor link and div to process onclick events separately, but right now clicking on the anchor link also triggers the onclick event for the div. How do I prevent this? Here's the code: <html> <head> <style> #box { background-color: #ccffcc; ...

jquery.Event of dynamic elements.

my code and my problem is: <script type="text/javascript"> $(document).ready(function() { // this variable is used to set the dynamic elements tagFlag = ''; $("#a1").click(function(event) { event.preventDefault(); tagFlag = 'me'; // setting the element which I want to trigger later }); $('#'+tagFlag).click(funct...

R: removing the last elements of a vector

Hello How can I remove the last 100 elements of a zoo series? I know the name[-element] notation but I can't get it work to substract a full section ...

Android Layouts: Moving Items

Greetings From Canada. I was wondering how one might align two or more UI elements to the bottom of a screen instead of them just stacking as they normally do. ...

XML Schema: how to have multiple identical elements?

Hi everyone, I'm having quite a hard time on constructing my 1st XML Schema. I need it to verify the correctness of an XML document that forms a questionnaire. So here's the section in don't get: I changed the source. The 1st answer refers to this code: <root> <values> <value>Lorem</value> <value>ipsum</value> ...

MAking an element hidden in XSL FO

Hi, I am trying to make on eofmmy elements in XSL FO hidden by using either XSLT, or FO attributes, but I am not sure what attribute to use. I have tried visibility="hidden", and also visible="false" to no avail. Any profesionals know the correct attribute name to perform this function. Thanks, ...

jQuery inserting element .before() and .after() does not work as expected, what am I doing wrong?

I am trying to dynamically surround sets of IMG and A tags with a div tag but am unable to make it work. my html: <img class="myClass-1" src="img5" /> <a class="myClass-2" href="url"></a> my script: $('img.myClass-1').each(function(){ $(this).before('<div style="position: relative;">'); $(this).next().after('</div>'); ...

CSS line spacing problem.

why is the word BESTSELLER skipping a line... there is nothing in the code telling it to do so? (forgive me -- here is the link http://u.neighborrow.com/) <div class="input text required"> <label for="ItemItem"></label><input type="text" id="ItemItem" value="" maxlength="255" style="font-size: 25px; width: 200px; m...

Use jQuery to apply styling to all instances of clicked element

What I'm aiming for is for jQuery to look at the element I've just clicked on (for example a p or an li tag), then apply a styling to all instances of that element (so all p tags on the page). This is my code so far, but it only applies the styling to the single element that has been clicked on. $("article *", document.body).click(func...

Applying Class to Customer Zend Decorator

I found code that would change the standard dt and dd tags to table tags for a Zend_Form_Element. Here is the code I used: $element->setDecorators(array( 'ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')), array('Label', array('tag' => 'td', 'class' => 'rightAlign')),...

Sorting array of type of object respecting to one of the object values

i have a class called student, the class have two elements (Name, ID). in my main class, i have created about 10 students in an array i called it students, now i want to sort the the students array respecting the ID, or the name!! if i used this line of code array.sort(students); is there a way to use the sort method and choose whi...