Search Results

Search found 8975 results on 359 pages for 'element'.

Page 16/359 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Only replace first matching element using PHP's mb_ereg_replace

    - by Mark L
    Hello, I want to replace only the first matching element in a string instead of replacing every matching element in a string $str = 'abc abc abc'; $find = 'abc'; $replace = 'def'; echo mb_ereg_replace( $find, $replace, $str ); This will return "def def def". What would I need to change in the $find or $replace parameter in order to get it to return "def abc abc"?

    Read the article

  • DOM + need to remove element from XML bt VB script

    - by yael
    I have the following VB script , I want to remove the "NET ID" element from name list but after running the VB script the "NET ID" element still exist in the XML doc? Something wrong in the VB? Yael Set objXMLDoc = CreateObject("Microsoft.XMLDOM") objXMLDoc.async = False objXMLDoc.load("\dir\d.xml") Set objRoot = objXMLDoc.documentElement Set objExNode = objRoot.removeChild(objRoot.childNodes.item(0)) objRoot.appendChild(objExNode) the XML file:

    Read the article

  • Why can't I add an event to each element in a collection that refers to Itself rather than the last

    - by user311403
    On Window's load, every DD element inside Quote_App should have an onCLick event appended that triggers the function Lorem, however, Lorem returns the nodeName and Id of the last element in the For statement rather than that of the element that trigged the function. I would want Lorem to return the nodeName and Id of the element that triggered the function. .js function Lorem(Control){ /* this.Control=Control; */ this.Amet=function(){ return Control.nodeName+"\n"+Control.id; }; }; function Event(Mode,Function,Event,Element,Capture_or_Bubble){ if(Mode.toLowerCase()!="remove"){ if(Element.addEventListener){ if(!Capture_or_Bubble){ Capture_or_Bubble=false; }else{ if(Capture_or_Bubble.toLowerCase()!="true"){ Capture_or_Bubble=false; }else{ Capture_or_Bubble=true; }; }; Element.addEventListener(Event,Function,Capture_or_Bubble); }else{ Element.attachEvent("on"+Event,Function); }; }; }; function Controls(){ var Controls=document.getElementById("Quote_App").getElementsByTagName("dd"); for(var i=0;i Currently you click on any DD element Lorem always returns the nodeName and Id of the last DD element. Lorem should return the nodeName and Id of the Control (Control[i]) that triggered Lorem. How do I go about making this happen? Thank you!

    Read the article

  • Javascript: getting element in dom tree when mouseover

    - by oimoim
    Hi, When using : document.onmouseover = function(e) {} Is there a property which gives me the element in the dom tree ? For example, I can set a style to e.srcElement But, how can I later access this element to (for example) reset its style ? And how can I know at which place in the dom tree it is ? I want to be able to situate it in the whole page dump. Many thanks.

    Read the article

  • JAXB unmarshal exclude specific element

    - by zigomir
    Hi everyone! I know for @XmlTransient annotation, but sometimes I need this element and in other use cases I really have to prevent it from unmarshaling, because it contains base64 text. So I need to exclude it because performance problems. Is there any way to dynamicly exclude one element from unmarshaling with JAXB?

    Read the article

  • Reset element to "default" event

    - by Channel72
    In Javascript, how can you set the event handler of a DOM element to default behavior? For example, suppose I set the onkeypress event of an input element: elem.onkeypress = function() { alert("Key pressed!"); } Later, how can I remove this event? Is it okay to simply set the onkeypress property to null? I tried that and it works, but I don't know if it is the proper way to do this.

    Read the article

  • Find the element with the most "neighbors" in a sequence

    - by Bao An
    Assume that we have a sequence S with n elements <x1,x2,...,xn>. A pair of elements xi,xj are considered neighbors if |xi-xj|<d, with d a given distance between two neighbors. So how can find out the element that has most neighbors in the sequence? (A simply way is sorting the sequence and then calculating number of each element but it's time complexity is quite large): O(nlogn) May you please help me find a better way to reduce time complexity?

    Read the article

  • Looping through all attributes of a XML element in XSLT

    - by TheGNUGuy
    Hey everyone, I am trying to use <xsl:for-each select="@*"> to grab all the attributes of a given element but when i do that my <xsl:choose> statement doesn't execute. Here is the element that I'm working with: <textBox id="Airfare" value="" label="text 1"/> Here is the XSLT template I'm using: <xsl:template match="textBox"> <div> <xsl:choose> <xsl:when test="@label"> <xsl:value-of select="@label"/> </xsl:when> <xsl:otherwise> <xsl:text>No Label Defined</xsl:text> </xsl:otherwise> </xsl:choose> <xsl:element name="input"> <xsl:attribute name="type">text</xsl:attribute> <xsl:for-each select="@*"> <xsl:choose> <xsl:when test="@id"> <xsl:attribute name="name">form_<xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="id">form_<xsl:value-of select="@id"/></xsl:attribute> </xsl:when> <xsl:when test="@label"> </xsl:when> <xsl:otherwise> <xsl:copy-of select="current()"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:element> </div> And when I generate the HTML using PHP I get this: <div>text 1<input type="text" id="Airfare" value="" label="text 1"></div> As you can see it didn't add form_ to the id attribute it didn't generate a name attribute and it didn't skip over the label attribute. Thanks for your help!

    Read the article

  • creating xml element with two namespaces using libxml APIs

    - by iSight
    Hi, I want to create an xml element having two namespace as below: element name="Root" xmlns:xsi="myXSI" xmlns:xsd="myXSD" I have checked out with the existing APIs, but it is not getting in this form. I am getting as Root xmlns:xsd:xsi="myXSI" xmlns:xmlns:xsd="myXSD" I am using this APIss as below: xmlTextWriterWriteAttributeNS(xmlWriter, BAD_CAST "xmlns:xsd", BAD_CAST "xsi" , BAD_CAST "myXSD", BAD_CAST "myXSI");

    Read the article

  • actionscript array remove element

    - by Naro
    I have an array Items which has 10 elements. I need to remove the 5th element (index=4) the new array should have 9 elements and all elements after the 5th element will be shifted forward what command(s) should i use?

    Read the article

  • Enabling EUS support in OUD 11gR2 using command line interface

    - by Sylvain Duloutre
    Enterprise User Security (EUS) allows Oracle Database to use users & roles stored in LDAP for authentication and authorization.Since the 11gR2 release, OUD natively supports EUS. EUS can be easily configured during OUD setup. ODSM (the graphical admin console) can also be used to enable EUS for a new suffix. However, enabling EUS for a new suffix using command line interface is currently not documented, so here is the procedure: Let's assume that EUS support was enabled during initial setup.Let's o=example be the new suffix I want to use to store Enterprise users. The following sequence of command must be applied for each new suffix: // Create a local database holding EUS context infodsconfig create-workflow-element --set base-dn:cn=OracleContext,o=example --set enabled:true --type db-local-backend --element-name exampleContext -n // Add a workflow element in the call path to generate on the fly attributes required by EUSdsconfig create-workflow-element --set enabled:true --type eus-context --element-name eusContext --set next-workflow-element:exampleContext -n // Add the context to a workflow for routingdsconfig create-workflow --set base-dn:cn=OracleContext,o=example --set enabled:true --set workflow-element:eusContext --workflow-name exampleContext_workflow -n //Add the new workflow to the appropriate network groupdsconfig set-network-group-prop --group-name network-group --add workflow:exampleContext_workflow -n // Create the local database for o=exampledsconfig create-workflow-element --set base-dn:o=example --set enabled:true --type db-local-backend --element-name example -n // Create a workflow element in the call path to the user data to generate on the fly attributes expected by EUS dsconfig create-workflow-element --set enabled:true --set eus-realm:o=example --set next-workflow-element:example --type eus --element-name eusWfe// Add the db to a workflow for routingdsconfig create-workflow --set base-dn:o=example --set enabled:true --set workflow-element:eusWfe --workflow-name example_workflow -n //Add the new workflow to the appropriate network groupdsconfig set-network-group-prop --group-name network-group --add workflow:example_workflow -n  // Add the appropriate acis for EUSdsconfig set-access-control-handler-prop \           --add global-aci:'(target="ldap:///o=example")(targetattr="authpassword")(version 3.0; acl "EUS reads authpassword"; allow (read,search,compare) userdn="ldap:///??sub?(&(objectclass=orclservice)(objectclass=orcldbserver))";)' dsconfig set-access-control-handler-prop \       --add global-aci:'(target="ldap:///o=example")(targetattr="orclaccountstatusevent")(version 3.0; acl "EUS writes orclaccountstatusenabled"; allow (write) userdn="ldap:///??sub?(&(objectclass=orclservice)(objectclass=orcldbserver))";)' Last but not least you must adapt the content of the ${OUD}/config/EUS/eusData.ldif  file with your suffix value then inport it into OUD.

    Read the article

  • MooTools: Fade out element?

    - by JamesBrownIsDead
    I have an Element object that I'm currently calling .hide() on. Instead, I'd like to fade out the opacity of the entire Element (and its children) to 100% (hidden) as a transition effect over maybe 500 ms or 1000 ms. Can Fx.Tween be used for this? Is this possible--does the MooTools framework have an effect like this in its UI library?

    Read the article

  • Rendering suggested values from an ext Combobox to an element in the DOM

    - by qui
    I have an ext combobox which uses a store to suggest values to a user as they type. An example of which can be found here: combobox example Is there a way of making it so the suggested text list is rendered to an element in the DOM. Please note I do not mean the "applyTo" config option, as this would render the whole control, including the textbox to the DOM element.

    Read the article

  • Pass first element of jsp list to javascript

    - by Lucian Enache
    Ok so I'm trying to access the first element of a JSP list, here's what I've come up with so far without any kind of luck: onclick="alert('<%=list[0]%>');" What's the best approach to access the first element and eventually to pass it to a javascript variable/function ? I've heard that the <% %> tags are deprecated and some are suggesting relaying on JSTL/EL how can one use those without having to iterate the entire list and put a breakpoint for the iterators ?

    Read the article

  • Radio button inside anchor element is reset after jQuery click handler

    - by GrievousAngel
    I have a situation where an element, of type radio, is contained in an element. The anchor element has a href but I want to override that behaviour by adding a jQuery 'click' handler to the element. The click handler makes the radio button inside it the selected one within the group. This all works when the anchor is clicked, however, when the radio button is clicked it appears that jQuery resets the selected radio to the previously selected one! Here is a the simplified page that duplicates the issue: <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#a1").click(function(event) { anchorClicked("a1"); return false; }); $("#a2").click(function(event) { anchorClicked("a2"); return false; }); }); function anchorClicked(anchorId) { $('#' + anchorId + ' input:radio').attr("checked", true); alert("Look at what is selected and what happens after the event when this dialog is closed!"); } </script> </head> <body> <form> <ul> <li id="li1"> <a id="a1" href="javascript:alert('default functionality')"> <input value="1" name="rb" type="radio" id="rb1"> <span>Details 1</span> </a> </li> <li id="li2"> <a id="a2" href="javascript:alert('default functionality')"> <input value="2" name="rb" type="radio" id="rb2"> <span>Details 2</span> </a> </li> </ul> </form> </body> Does anyone have any idea how I can prevent jQuery for resetting the radio button?

    Read the article

  • How can I unattach an element from another element in the XAML tree?

    - by Edward Tanguay
    In my Silverlight application, I load all the images I need at application start and store them in a dictionary. Then as I need them I pick them out of the dictionary and attach them in XAML trees etc. However, I have the problem that if I attach an Image object to a Grid, then want to use that image again, it tells me: The image element is already a child of another element. How can I run through my dictionary and "detach all images from parent XAML elements"?

    Read the article

  • Cocoa Scripting Bridge and <contents> element

    - by Stephen
    So, the application I'm trying to script has a scripting definition file that includes a <contents> element, which is an "implicitly specified container." The question, how do I get at what's inside this element using Scripting Bridge? Or alternatively, how do I send the Apple Event necessary to retrieve it and then transform what I get back into an SBObject? I already tried: [document nameOfKey] document.nameofKey [document contents] document.contents

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >