Search Results

Search found 2174 results on 87 pages for 'dom'.

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

  • Determining the order of DOM elements

    - by sonofdelphi
    Given two DOM elements, say a and b, how can we determine which comes first in the document? I'm implementing drag and drop for a set of elements. And the elements can be selected in any order, but when they are dragged, these elements need to be moved in the "correct" order.

    Read the article

  • VB6: assign javascript function to a dom element

    - by Fuxi
    hi, i'm using the mshtml library for parsing out html via MSHTML.HTMLDocument. my question: is there a way to assign a javascript function to a dom element? i've tried something like: div.onmouseover = "function(){alert('mouseover')}" and div.setattribute "onmouseover" , "function(){alert('mouseover')}" without success (no error but no effect either). anyone knows if its possible? thx

    Read the article

  • XML + DOM + replace text in element

    - by yael
    from XML < NET ID="10.10.10.10, 255.255.255.0" / I need to replace the text 10.10.10.10, 255.255.255.0 with 192.9.1.1, 255.0.0.0 by VB + DOM script so the final line in the XML should be < NET ID="192.9.1.1, 255.0.0.0" / THX

    Read the article

  • Silverlight 4 OOB application access HTML DOM of the page in WebBrowser control

    - by Mike Weerasinghe
    Does anybody know if it is possible to access and manipulate an element in the html page that is rendered by the Silverlight 4 WebBrowser control. The scenario is like this. The user launches a Silverlight OOB application with elevated trust. The user manipulates some data in the application but must submit part of the data to an external web site. If I open the external site in a WebBrowser control, is there any way I can assist the user by pre filling some information in the external sites' web form via programmatic access to the DOM?

    Read the article

  • http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html#getDoctype()

    - by Tom Brito
    The Document class have a getDoctype method but doesn't have a setDoctype. The documentation says: The DOM Level 2 does not support editing the Document Type Declaration. docType cannot be altered in any way, including through the use of methods inherited from the Node interface, such as insertNode or removeNode. and in my project I need to generate xml files with my specified doctypes. I've tryied to create my own DefaultNode, but it throws "DOMException: Method not supported" for the setters. Any idea?

    Read the article

  • "return false" is ignored in certain browsers for link added dynamically to the DOM with JavaScript

    - by AlexV
    I dynamically add an <a> (link) tag to the DOM with: var link = document.createElement('a'); link.href = 'http://www.google.com/'; link.onclick = function () { window.open(this.href); return false; }; link.appendChild(document.createTextNode('Google')); //someDomNode.appendChild(link); I want the link to open in a new window (I know it's bad, but it's required) and I don't want to use the target attribute. My code works well in IE and Firefox, but the return false don't work in Safari, Chrome and Opera. By don't work I mean the link is followed after the new window is opened.

    Read the article

  • How to get elements from a page using Simple HTML DOM Parser

    - by sm56d
    Hi I am trying to parse a HTML page using the Simple HTML DOM Parser. This HTML page doesn't make use of IDs which makes it harder to refer to elements. On this page I am trying to get the Album name, Song title, download link and the album image. I have done this but I can't even get the Album names! $html = file_get_html('http://music.banadir24.com/singer/aasha_abdoo/247.html'); $article = $html->find('table td[class=title]', 0); foreach($article as $link){ echo $link; } This outputs: 1tdArrayArrayArray Artist Array I need to get this sort of output: Image Path Duniya Jamiila [URL] Macaan Badnoo [URL] Donimaayee [URL] ... Thanks all for any help Please note: This is legal as the songs are not bound by copyright and they are available to download freely, its just I need to download a lot of them and I can't sit there clicking a button all day. Having said that, its taken me an hour to get this far.

    Read the article

  • Clone a node using Javascript DOM

    - by Abhimanyu
    I want to create a clone for below code using javascript DOM var summaryDiv = __createElement("div","sDiv","sDiv"+j); summaryDiv.onmouseover = function() {this.setAttribute("style","text-decoration:underline;cursor:pointer;");} summaryDiv.onmouseout = function() {this.setAttribute("style","text-decoration:none;");} if(browser.isIE) { summaryDiv.onclick = new Function("__fc.show_tooltip("+j+",'view_month')"); } else { summaryDiv.setAttribute("onclick", "__fc.show_tooltip("+j+",'view_month',event)"); } someobj.appendChild(summaryDiv); I m using obj = summaryDiv.cloneNode(true) which is creating node. but onclick event is not getting fire in case of Internet Explorer.can any body help me over it?

    Read the article

  • DOM innerHTML Duplicate Problem

    - by Kubi
    function SwapPlans(city, id) { var tp = GetTravelPlanById(id); var content = MakeHTMLAccordionMe(tp.items[0]); document.getElementById(city).innerHTML = " "; document.getElementById(city).innerHTML = content.innerHTML; document.getElementById(city).outerHTML = " "; document.getElementById(city).outerHTML = content.outerHTML; } Hi, I have a problem with the snippet above. MakeAccordionME function returns the content that I want to change by document.getElementById(city) = value; but It doesn't remove the first content of the first div. Is there any content.clear method in DOM javascript ? thx p.s. the div that returns from document.getElementById(city) is a jquery accordion div.

    Read the article

  • XML creation using DOM and MYSQL

    - by dbomb101
    I am trying to create a XML document from information extracted from a mysql table. I am using a tutorial to accomplish this http://www.tonymarston.net/php-mysql/dom.html#a5 what I want to do is to create each element separately, instead of creating them all at once as shown in the tutorial. In order to do that I am trying to place the specific field name into the foreach loop below, any help would be greatly appreciated. foreach ($row as where fieldname should go => $row['artistname']) { $artval = $doc->createTextNode($row['artistname']); $artval = $chil->appendChild($val); }

    Read the article

  • Javascript - how to change elements content inside a page when using iframes, using dom, not jquery

    - by Erez
    Hello all, I have this iframe and as u can see it call a js function with the onload trigger. <iframe name="top" id="top" width="99%" height="20%" src="top.htm" frameborder="0" scrolling="no" onload="log_in()"></iframe> What i need to do is to effect the element inside "top.htm" (change innerHTML and stuff like that) from that function. But the problem is that the funnction does not recognize the elements of the "top.htm" page, only the ones in index.htm (the page with the iframes). p.s. i have to use DOM and i have to use iframes. Any one knows how to do that? 10x :-)

    Read the article

  • Using Simple HTML Dom to match a string on the page

    - by Abs
    Hello all, How do I match and get the flash vars on a HTML page? I am using simple HTML dom element and I am able to narrow down to a div containing the text I need. <script type="text/javascript"> var s1 = new SWFObject("jw4.4/player.swf", "player", "400", "50", "9"); s1.addParam("allowfullscreen", "true"); s1.addParam('allowscriptaccess','always'); s1.addVariable("width","400"); s1.addVariable("height","50"); s1.addVariable("overstretch", "false"); s1.addParam('flashvars',"this_id=/tg&amp;autostart=true"); s1.write("container"); How do I get the value of this_id, so I want to return /tg? What would I put in find? Or do i have to use something else? $html = file_get_html("$url"); $file_path = $html->find('this_id=/'); Thanks all for any help

    Read the article

  • Hudson XML error-- No module named dom.minidom

    - by Arnab Sen Gupta
    I am trying to send a simple XML file of the format given in http://wiki.hudson-ci.org/display/HUDSON/Monitoring+external+jobs . I was able to send it easily and was getting desired result!! Then I tried to build this XML file using python script and it was giving me the exact file that I wanted without any problem. But when I tried to run this and send it to Hudson, I was getting the error - "No module named dom.minidom" . I checked again by executing in Python IDLE and it ws working fine but when I tried to send it again, I was getting the same error.. plz help..

    Read the article

  • Making an SVG DOM JavaScript class

    - by CryptoQuick
    I'm unsatisfied with other JavaScript libraries and frameworks like jQuery, MooTools, and Raphael, because of their inability to support SVG grouping. You'd think it'd be a very simple thing for them to implement. Anyway, I'm trying to make a JavaScript class (using John Resig's class.js script) like this: var El = Class.extend({ el: null, svgNS: "http://www.w3.org/2000/svg", init: function (type) { this.el = document.createElementNS(this.svgNS, type); }, set: function (name, attr) { this.el.setAttributeNS(null, name, attr); }, get: function (el, name) { var attr = this.el.getAttributeNS(null, name); return attr; }, add: function (targEl) { targEl.el.appendChild(this.el); }, remove: function (targEl) { targEl.el.removeChild(this.el); }, setEl: function (docId) { this.el = document.getElementById(docId); } }); I can add elements to the DOM using these statements outside of the class, but storing the element inside the class becomes problematic. Anyone have any creative ideas?

    Read the article

  • How to enable gzip compression using PHP Simple HTML DOM Parser

    - by brant
    I have tried a few things to enable gzip compression using PHP Simple HTML DOM Parser but nothing has seemed to work thus far. Using ini_set I've manged to change the user agent, so I figured it might be possible to also enable gzip compression? include("simpdom/simple_html_dom.php"); ini_set('zlib.output_compression', 'On'); $url = 'http://www.whatsmyip.org/http_compression/'; $html = file_get_html($url); print $html; The website above tests it. Please let me know if I am going about this the wrong way completely.

    Read the article

  • jQuery DOM append losing markup

    - by Raj
    This is related to an earlier question. I try to append HTML DOM returned in an AJAX response to an existing DIV. I see all the text, but it seems all markup such as bold, italic, etc is lost. My AJAX (XML) data is like so: <event source="foo"> <contents> <h1>This is an event</h1> This is the body of the event </contents> </event> My jQuery code does this: $("#eventDiv").append( jData.find("contents").contents().clone() ); Attempting to do .html() on the cloned contents throws an exception: TypeError: Cannot call method 'replace' of undefined. I am a little surprised that it is so excruciatingly hard to do this with jQuery. Am I doing something too far off the track?

    Read the article

  • Problem with acceding in DOM with jQuery

    - by Tristan
    Hello, I changed the tree of my JSON-P output, and i cannot access to my object DOM anymore : Here's my output : jsonp1271634374310( {"Inter-Medias": {"name":"Inter-Medias","idGSP":"14","average":"80","services":"8.86"} }); And here's my jQuery script : success: function(data, textStatus, XMLHttpRequest){ widget = data.name; widget += data.average ; .... I know one level is missing, but if I try to do : data.Inter-Medias.name or data.name.name it's still not working. Any idea please ? I will have case where i'll have multiple Ojbect, so i want to display all of them, how to do that ? for (i=0;i < data.length;i++) Does it look right ? Bonus question : i understand function(data, textStatus, XMLHttpRequest) that in case of success this function is triggered, the data is what the script recieved from his request, but i have no idea what textStatus or XMLHttpRequest are here too and why ?! Thank you.

    Read the article

  • php DOM, get values from xml document, php xml

    - by Michael
    I'm trying to get some information (itemID, title, price and mileage) for multiple listings from ebay website using their api . So far I got this link up http://open.api.ebay.com/shopping?callname=GetMultipleItems&responseencoding=XML&appid=Morcovar-c74b-47c0-954f-463afb69a4b3&siteid=0&version=525&IncludeSelector=ItemSpecifics&ItemID=220617293997,250645537939,230485306218 I've saved the document as .xml file using php curl and now I need to get/extract the values(itemID, title, price and mileage) into arrays and store them in database. Unfortunately I never worked with php dom and I can't figure it out how to extract the values . I tried to follow the tutorial found on IBM website http://www.ibm.com/developerworks/library/os-xmldomphp/ but I had no success. Some help would be highly appreciated.

    Read the article

  • Loading and removing images with DOM, Javascript

    - by jesse
    I'm new to DOM and I'm having trouble removing multiple images that I loaded this loads 7 images (1.jpg, 2.jpg, etc..) function loadImages() { for (var i = 1; i < 8; i++ ) { var img = document.createElement("img"); img.src = "images/"+i+".jpg"; var idName = "img"+i+""; document.getElementById(idName).appendChild(img); } } this should remove all of them, but doesn't.. I think it breaks at the removeChild line. function removeImages() { for (var i = 1; i < 8; i++ ) { var idName = "img"+i+""; var d = document.getElementById(idName); d.removeChild(document.getElementById(img)); } } I think I'm doing something fundamentally wrong, because I don't fully understand how this works...

    Read the article

  • Map browser DOM using Javascript

    - by EddyR
    I'm trying to map a browsers DOM using javascript. It should list all the functions and attributes associated with it and it should also recurse through any object attributes. Now as I understand it 'window' is the most top-level node (although I've see a reference to 'top' as well in Chrome.) then 'document', etc. However I've never seen 'Node' under 'window' and yet I can call it. So where is 'Node' located? Is there a level above 'window' or is it a separate object (W3C says it's supposed to be inherited by 'document' only.)? I've been playing with a function to do this but I keep getting weird results so I'm not post it here. Alternatively - is it possible to get the properties from the object types instead of the object reference itself? for example 'DOMWindow' instead of 'window'. I think this would stop duplicating data from inherited objects.

    Read the article

  • Problem with accessing in DOM with jQuery

    - by Tristan
    Hello, I changed the tree of my JSON-P output, and i cannot access to my object DOM anymore : Here's my output : jsonp1271634374310( {"Inter-Medias": {"name":"Inter-Medias","idGSP":"14","average":"80","services":"8.86"} }); And here's my jQuery script : success: function(data, textStatus, XMLHttpRequest){ widget = data.name; widget += data.average ; .... I know one level is missing, but if I try to do : data.Inter-Medias.name or data.name.name it's still not working. Any idea please ? I will have case where i'll have multiple Ojbect, so i want to display all of them, how to do that ? for (i=0;i < data.length;i++) Does it look right ? Bonus question : i understand function(data, textStatus, XMLHttpRequest) that in case of success this function is triggered, the data is what the script recieved from his request, but i have no idea what textStatus or XMLHttpRequest are here too and why ?! Thank you.

    Read the article

  • How to manage different form contexts of same form element in single DOM tree

    - by nimp
    Hi, As my question title could be bit unclear to you (I tried best), following is what I'm exactly trying to do. I'm having a form element (say a user_info form), where such form elements will be generated for different users by java script and displayed in different js tabs (example: dojo tabs). once form elements are generated, later I need to react on user actions performed on different html elements defined inside user_info form. In this case I need to identify what is the context (in which user_info form element) in which user is working on. The simplest example would be how to retrieve form id of the form in which user actions are being performed. According to my understanding, I can not simply retrieve from by form id, because now DOM tree contains duplicate form instances of the same from element. So, IS there anyway, I could identify form context based on the user actions on its input elements. Thank You.

    Read the article

  • Storing information in the DOM?

    - by John
    Im making a small private message application in the form of a phone. Ten messages are shown at the time. And the list of messages are scrolled up/down by hiding them. Just how bad is it to use the DOM to store information in this way. My main goal for doing this is to reduce calls to the database. And instead of making a new call all the time, it only checks if any new messages has arrived and ads the new message(s). Whats the alternative, cookies anyone? Thank you for the time

    Read the article

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