Search Results

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

Page 2/359 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • how to remove element.style in css

    - by Aruna
    Hi I am using Joomla 1.5. i am having a page where a cSS has been added for the title which is in <strong></strong> I firebug it , it appears as element.style { color:#666666; } i dont know of from where it comes from.. but i am having a css applied for the same tag with other color. but it disappeared. How to remove the element.style globally..

    Read the article

  • jaxb namespaces in each element instead of root element during marshalling

    - by Anton
    By default, jaxb 2 lists all (all possible required) namespaces in root element during marshalling: <rootElement xmlns="default_ns" xmlns:ns1="ns1" xmlns:ns2="ns2"> <ns1:element/> </rootElement> Is there a way to describe namespace in each element instead of root element ?: <rootElement xmlns="default_ns"> <element xmlns="ns1"/> </rootElement> It also solves the problem of "unnecessary namespaces", which is also important in my case. Any suggestions appreciated.

    Read the article

  • [GWT] Change Element's node name?

    - by rybz
    Is it possible to change the element's node name in GWT? I mean something like this: HTML h = new HTML(); h.getElement().setNodeName("mydiv") while there is no setNodeName() method for Element. I'd like to acquire <mydiv>some contents</mydiv> instead of default tag <div>some contents</div> Thanks for any hints.

    Read the article

  • Passing variables to a Custom Zend Form Element

    - by user322003
    Hi, I'm trying to create a custom form element which extends Zend_Form_Element_Text with a validator (so I don't have to keep setting up the validator when I use certain elements). Anyway, I'm having trouble passing $maxChars variable to it when I instantiate it in my Main form. I've provided my shortened code below This is my custom element below class My_Form_Custom_Element extends Zend_Form_Element_Text { public $maxChars public function init() { $this->addValidator('StringLength', true, array(0, $this->maxChars)) } public function setProperties($maxChars) { $this->maxChars= $maxChars; } } This is where I instantiate my custom form element. class My_Form_Abc extends Zend_Form { public function __construct($options = null) { parent::__construct($options); $this->setName('abc'); $customElement = new My_Form_Custom_Element('myCustomElement'); $customElement->setProperties(100); //**<----This is where i set the $maxChars** $submit = new Zend_Form_Element_Submit('submit'); $submit -> setAttrib('id', 'submitbutton'); $this->addElements(array($customElement ,$submit)); } } When I try to pass '100' using $customElement-setProperties(100) in my Form, it doesnt get passed properly to my StringLength validator. I assume it's because the validator is getting called in Init? How can I fix this?

    Read the article

  • hide part of the content of an element

    - by user1843471
    Sorry, this may be kind of weird problem: I have an existing HTML code, which I can not directly edit or delete parts of it. The problem is: Inside a div-element in this code, there is some text which I want to hide. There are also another element inside of this div, which I don't want to hide. It looks something like this: <div> ....Text I want to hide.... <table> ... Text I don't want to hide...</table> </div> My question: Is it possible to hide the "....Text I want to hide...." while not hiding the "... Text I don't want to hide..."? (for example using javascript?)

    Read the article

  • Get a single element with PHP and XPath

    - by daliz
    Lots of tutorials around the net but none of them can explain me this: How do I select a single element (in a table, for example), having its absolute XPath? Example: I have this: /html/body/table/tbody/tr[2]/td[2]/table/tbody/tr/td/table[3]/tbody/tr/td/table/tbody/tr[3]/td/table/tbody/tr[4]/td[5]/span What's that PHP function to get the text of that element?! Really I could not find an answer. Found lots of guides and hints to get all the elements of the table, all the buttons of a form, etc, but not what I need. Thank you.

    Read the article

  • jquery element click event only allowed once? confuddled

    - by claw
    One a click event of an element, it only works once. Say the value is 2 it will increase/decrease/reset only once. How to I reset the event so the user can keep clicking on the element increasing the value of the value .item-selection-amount $('.item-selection-amount').click(function(event) { var amount = $(this).val(); switch (event.which) { case 1: //set new value + $(this).val(amount + 1); break; case 2: //set new value reset $(this).val(0); break; case 3: //set new value - if(amount > 0){ $(this).val(amount - 1); } break; } }); Thanks

    Read the article

  • DOM: element created with cloneNode(true) missing element when added to DOM

    - by user149327
    I'm creating a tree control and I'm attempting to use a parent element as a template for its children. To this end I'm using the element.cloneNode(true) method to deep clone the parent element. However when I insert the cloned element into the DOM it is missing certain inner elements despite having an outerHTML value identical to its parent. Surprisingly I observe the same behavior is in IE, Firefox, and Chrome leading me to believe that it is by design. This is the HTML for the node I'm attempting to clone. <SPAN class=node><A class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf> <IMG class=nodeIcon alt="Taylor Swift" src="images/node.png"><SPAN class=nodeText>Taylor Swift</SPAN></A><SPAN class=nodeDescription>Taylor Swift is a swell gall who is realy great.</SPAN></SPAN> Once I've cloned the node using cloneNode(true) I examine the outerHTML property and find that it is indeed identical to the original. <SPAN class=node><A class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf><IMG class=nodeIcon alt="Taylor Swift" src="images/node.png"><SPAN class=nodeText>Taylor Swift</SPAN></A><SPAN class=nodeDescription>Taylor Swift is a swell gall who is realy great.</SPAN></SPAN> However when I insert it into the DOM and inspect the result using FireBug I find that the element has been transformed: <span class="node" style="top: 0px; left: 0px;"<a class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf>Taylor Swift</a><span class="nodeDescription">It's great</span></span> Notice that the grandchildren of the node (the image tag and the span tag surrounding "Taylor Swift") are missing, although strangely the great grandchild "Taylor Swift" text node has made it into the tree. Can anyone shed some light on this behavior? Why would nodes disappear after insertion into the DOM, and why am I seeing the same result in all three major browser engines?

    Read the article

  • jQuery draggable + droppable: how to snap dropped element to dropped-on element

    - by 10goto10
    I have my screen divided into two DIVs. In the left DIV I have a few 50x50 pixel DIVs, in the right DIV I have an empty grid made of 80x80 LIs. The DIVs on the left are draggable, and once dropped on a LI, they should snap to center of that LI. Sounds simple, right? I just don't know how to get this done. I tried by manipulating the dropped DIV's top and left CSS properties to match those of the LI they're dropped into, but the left and top properties are relative to the left DIV. How can I best have the dropped element snap to the center of the element it's dropped into? That's gotta be simple, right? Edit: I'm using jQuery UI 1.7.2 with jQuery 1.3.2. Edit 2: For whoever else has this problem, this is how I fixed it: I used Keith's solution of removing the dragged element and placing it inside the dropped-on element in the drop callback of the droppable plugin: function gallerySnap(droppedOn, droppedElement) { $(droppedOn).html('<div class="drop_styles">'+$(droppedElement).html()+'</div>' ); $(droppedElement).remove(); } I don't the dropped element to be draggable again, but if you do, just bind draggable to it again. For me this method also solved the problem I had when positioning the dropped elements (which would be relative to the left DIV) and scrolling inside the second DIV. (Elements would remain fixed on page, now they scroll along). I did play with the snap options to make it look good while dragging, so thanks to karim79 for that suggestion. I probably won't win any Awesome Code prizes with this, so if you see room for improvement, please share!

    Read the article

  • Unique element ID, even if element doesn't have one

    - by Robert J. Walker
    I'm writing a GreaseMonkey script where I'm iterating through a bunch of elements. For each element, I need a string ID that I can use to reference that element later. The element itself doesn't have an id attribute, and I can't modify the original document to give it one (although I can make DOM changes in my script). I can't store the references in my script because when I need them, the GreaseMonkey script itself will have gone out of scope. Is there some way to get at an "internal" ID that the browser uses, for example? A Firefox-only solution is fine; a cross-browser solution that could be applied in other scenarios would be awesome. Edit: If the GreaseMonkey script is out of scope, how are you referencing the elements later? They GreaseMonkey script is adding events to DOM objects. I can't store the references in an array or some other similar mechanism because when the event fires, the array will be gone because the GreaseMonkey script will have gone out of scope. So the event needs some way to know about the element reference that the script had when the event was attached. And the element in question is not the one to which it is attached. Can't you just use a custom property on the element? Yes, but the problem is on the lookup. I'd have to resort to iterating through all the elements looking for the one that has that custom property set to the desired id. That would work, sure, but in large documents it could be very time consuming. I'm looking for something where the browser can do the lookup grunt work. Wait, can you or can you not modify the document? I can't modify the source document, but I can make DOM changes in the script. I'll clarify in the question. Can you not use closures? Closuses did turn out to work, although I initially thought they wouldn't. See my later post. It sounds like the answer to the question: "Is there some internal browser ID I could use?" is "No."

    Read the article

  • Block element, horizontal center aligned and minimum width possible

    - by Nazgulled
    Hi, I'm trying to have this block element to be horizontally aligned in the middle but at the same time I would like the width to be the minimum possible for the contents inside. But I don't think it's possible or I'm not able to do it myself... a#button-link { background: url("images/button-link.png") no-repeat scroll center left; margin: 12px auto 0 auto; display: block; width: 125px; height: 32px; line-height: 32px; padding-left: 35px; font-weight: bold; } This is my current code... The idea behind this is that the text for that tag could be slightly bigger or smaller depending on the user language and how much characters the same sentence has for that specific user's language. There's no way I can control but I still would like to have this element horizontally aligned to center. Is this possible with CSS?

    Read the article

  • Streaming PDF via invocation of HTTPHandler using $.get into object element

    - by mythicdawn
    What I am trying to do is invoke an HTTPHandler via the $.get method of jQuery which will stream back a PDF and display it in a web page using an object element. My previous method of setting the src attribute of an IFrame to be the result of a handler invocation works, but I would like cross-browser completion notification, so have moved to using $.get(). Sample code: function buttonClick() { $.get("/PDFHandler.ashx", {}, function(data, textStatus, XMLHttpRequest) { var pdfObjectString = "<object data='' type='application/pdf' width='600' height='600'></object>"; var pdfObject = $(pdfObjectString); pdfObject.attr("data", data); $("#container").append(pdfObject); }); As you can see, I am attempting to stick the 'data' variable into an object element. This is not working (no error, PDF just doesn't display), presumably because the data that comes back is binary, yet the attr() method expects a string (I think). My question is thus: how can I invoke an HTTPHandler via $.get and somehow assign the data from the callback to the data attribute of an object?

    Read the article

  • JS. How to replace html element with another element/text, represented in string?

    - by EL 2002
    I have a problem with replacing html elements. For example, there is a table <table><tr><td id="idTABLE">0</td><td>END</td></tr></table> (it can be div, span, anything) And string in JS script var str='<td>1</td><td>2</td>'; (it can be anything, '123 text', '<span123 element</span 456' or ' <tr<td123</td ' or anything) How can I replace element 'idTABLE' with str? I mean really replace, so <table><tr><td id="__TABLE__">0</td><td>END</td></tr></table> becomes <table><tr><td>1</td><td>2</td><td>END</td></tr></table> //str='<td>1</td><td>2</td>'; <table><tr>123 text<td>END</td></tr></table> //'123 text' <table><tr> tr><td>123</td> <td>END</td></tr></table> //' <tr><td>123</td> ' I tried with createElement, replaceChild, cloneNode, but with no result at all =(

    Read the article

  • Javascript : Modifying parent element from child block the web site to display

    - by Suresh Behera
    Well recently i was working with Dotnetnuke and we are using lots of JavaScript around this project. Internally, dotnetnuke use lot of asp.net user control which lead to have a situation where child element accessing/modifying data of parent. Here is one example   the DIV element is a child container element. The SCRIPT block inside the DIV element tries to modify the BODY element. The BODY element is the unclosed parent container of the DIV element. 1: < html > 2: < body >...(read more)

    Read the article

  • jQuery - toggle the class of a parent element?

    - by Nike
    Hello, again. I have a few list elements, like this: <li class="item"> <a class="toggle"><h4>ämne<small>2010-04-17 kl 12:54 by <u>nike1</u></small></h4></a> <div class="meddel"> <span> <img style="max-width: 70%; min-height: 70%;" src="profile-images/nike1.jpg" alt="" /> <a href="account.php?usr=47">nike1</a> </span> <p>text</p> <span style="clear: both; display: block;"></span> </div> </li> <li class="item odd"> <a class="toggle"><h4>test<small>2010-04-17 kl 15:01 by <u>nike1</u></small></h4></a> <div class="meddel"> <span> <img style="max-width: 70%; min-height: 70%;" src="profile-images/nike1.jpg" alt="" /> <a href="account.php?usr=47">nike1</a> </span> <p>test meddelande :) [a]http://youtube.com[/a]</p> <span style="clear: both; display: block;"></span> </div> </li> And i'm trying to figure out how to make it so that when you click a link with the class .toggle, the parent element (the li element) will toggle the class .current. I'm not sure if the following code is correct or not, but it's not working. $(this).parent('.item').toggleClass('.current', addOrRemove); Even if i remove "('.item')", it doesn't seem to make any difference. So, any ideas? Thanks in advance, -Nike

    Read the article

  • Find Shortest element in Array

    - by Ani
    I have a Array string[] names = { "Jim Rand", "Barry Williams", "Nicole Dyne", "Peter Levitt", "Jane Jones", "Cathy Hortings"}; Is there any way to find which is the shortest(Length wise) element in this array and then store rest of elements in a different array. Thanks, Ani

    Read the article

  • Reset Particular Input Element in a HTML Form

    - by SKR
    I have multiple input textboxes in my page. I want to reset particular text box to its onload state if certain conditions fails. I am considering using a Hidden element to store the onload state of the textbox. I would other suggestions or solutions to resolve this issue.

    Read the article

  • Creating an element and insertBefore is not working...

    - by sologhost
    Ok, I've been banging my head up against the wall on this and I have no clue why it isn't creating the element. Maybe something very small that I overlooked here. Basically, there is this Javascript code that is in a PHP document being outputted, like somewhere in the middle of when the page gets loaded, NOW, unfortunately it can't go into the header. Though I'm not sure that that is the problem anyways, but perhaps it is... hmmmmm. // Setting the variables needed to be set. echo ' <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/dpShoutbox.js"></script>'; echo ' <script type="text/javascript"> var refreshRate = ', $params['refresh_rate'], '; createEventListener(window); window.addEventListener("load", loadShouts, false); function loadShouts() { var alldivs = document.getElementsByTagName(\'div\'); var shoutCount = 0; var divName = "undefined"; for (var i = 0; i<alldivs.length; i++) { var is_counted = 0; divName = alldivs[i].getAttribute(\'name\'); if (divName.indexOf(\'dp_Reserved_Shoutbox\') < 0 && divName.indexOf(\'dp_Reserved_Counted\') < 0) continue; else if(divName == "undefined") continue; else { if (divName.indexOf(\'dp_Reserved_Counted\') == 0) { is_counted = 0; shoutCount++; continue; } else { shoutCount++; is_counted = 1; } } // Empty out the name attr. alldivs[i].name = \'dp_Reserved_Counted\'; var shoutId = \'shoutbox_area\' + shoutCount; // Build the div to be inserted. var shoutHolder = document.createElement(\'div\'); shoutHolder.setAttribute(\'id\', [shoutId]); shoutHolder.setAttribute(\'class\', \'dp_control_flow\'); shoutHolder.style.cssText = \'padding-right: 6px;\'; alldivs[i].parentNode.insertBefore(shoutHolder, alldivs[i]); if (is_counted == 1) { startShouts(refreshRate, shoutId); break; } } } </script>'; Also, I'm sure the other functions that I'm linking to within these functions work just fine. The problem here is that within this function, the div never gets created at all and I can't understand why? Furthermore Firefox, FireBug is telling me that the variable divName is undefined, even though I have attempted to take care of this within the function, though not sure why. Anyways, I need the created div element to be inserted just before the following HTML: echo ' <div name="dp_Reserved_Shoutbox" style="padding-bottom: 9px;"></div>'; I'm using name here instead of id because I don't want duplicate id values which is why I'm changing the name value and incrementing, since this function may be called more than 1 time. For example if there are 3 shoutboxes on the same page (Don't ask why...lol), I need to skip the other names that I already changed to "dp_Reserved_Counted", which I believe I am doing correctly. In any case, if I could I would place this into the header and have it called just once, but this isn't possible as these are loaded and no way of telling which one's they are, so it's directly hard-coded into the actual output on the page of where the shoutbox is within the HTML. Basically, not sure if that is the problem or not, but there must be some sort of work-around, unless the problem is within my code above... arrg Please help me. Thanks :)

    Read the article

  • CSS :after pseudo element on INPUT field

    - by matra
    I am trying to use :after CSS pseudo element on INPUT field, but it does not work. If I use it with SPAN, it works OK. <style type="text/css"> .mystyle:after {content:url(smiley.gif);} .mystyle {color:red;} </style> This works (puts the smily after "buu!" and berfore "some more") <span class="mystyle">buuu!</span>a some more This does not work - it only color someValue in red, but there is no smiley. <input class="mystyle" type="text" value="someValue"> What am I doing wrong? should I use another pseudo selector. Note: I can not add SPAN sround my INPUT; because it is being generated by a third party control. Matraj

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >