78 Topics

Member Avatar for
Member Avatar for Dani

I think that I understand the difference between: document.addEventListener('DOMContentLoaded', callback_fn); and: window.addEventListener('load', (event) => { ... }); However, as a jQuery user, what is the difference between DOMContentLoaded and the jQuery ready fn?

Member Avatar for pritaeas
0
79
Member Avatar for borobhaisab

@dani Checking these 2 working codes of your's out. I got some basic questions. 1 ```` <?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(E_ALL); //Dan's Code. //Code from: https://www.daniweb.com/programming/web-development/threads/538868/simplehtmldom-failing#post2291972 //Sitemap Protocol: https://www.sitemaps.org/protocol.html // Initiate ability to manipulate the DOM and load that baby up $doc = new DOMDocument(); $message = file_get_contents('https://www.daniweb.com/programming/web-development/threads/538868/simplehtmldom-failing#post2288453'); // https://www.php.net/manual/en/function.libxml-use-internal-errors.php libxml_use_internal_errors(true); …

Member Avatar for borobhaisab
0
78
Member Avatar for Mrewan79

I understand how to generate objects from the database, using Sinatra with formatting, and I understand from tutorials how to use POST to send information back, but I don't understand how to use POST to transfer information from the browser (for instance from a text field, or inside <p id="stufftotransfer"><%= …

Member Avatar for cereal
0
450
Member Avatar for Rahul_56

**I have tried 1st, 2nd points are working good just have to solve 3rd issue:** **1.** Title with bold: "THIS IS MY MAIN TITLE IN CAPS" (title not always same) **2.** Words with bold: TEST ABC:, TEST XYZ:, TES T TEST:, TESTXXX: (this words are always same) **3.** Some strings …

Member Avatar for cereal
0
400
Member Avatar for Habib_7

forexample I can go to [Click Here](http://www.msn.com/) and open developer tools and write this code `document.querySelector('.news a').click()` and it will open news. Now I want a program to do this automatically for me. write a javascript code that do this for me actully this was just a simple example I …

Member Avatar for Taywin
0
425
Member Avatar for Habib_7

for example I have this html code: <select id="mySelect"> <option value="0">apple</option> <option value="1">orange</option> <option value="2">banana</option> <option value="3">tomato</option> </select> 1-how can I select ` <option value="2">banana</option> ` (by passing the value attribute to selector function)then click on it with javascript with out using jquery 2-Is there any way to select this …

Member Avatar for phoenix254
0
307
Member Avatar for sing1006

I having a problem with the cloneNode tag problem. NodeList movielist = doc.getElementsByTagName("movie"); Element child = (Element)movielist.item(6); Element newNode = (Element)child.cloneNode(true); child.appendChild(newNode); newNode.setAttribute("id", "this is newnode"); code above will clone the whole set of thing. but the problem is it colne in wrong tag. i want some thing like this …

Member Avatar for sing1006
0
327
Member Avatar for tiredoy

<table class="filetable" id="filetable"> <thead> <tr> <th width="25%">名称</th> <th width="6%">大小</th> <th width="10%">类型</th> <th width="19%">修改日期</th> <th width="40%"></th> </tr> </thead> <tbody id="FileList" runat="server"> <tr> <td><img src="images/f01.png" />Adobe Dreamweaver CS5简体中文绿色</td> <td>2013/10/14 17:38</td> <td>文件夹</td> <td class="tdlast">0 KB</td> <td></td> </tr> </tbody> </table> this is a table, I want to get the value of each FileName when …

Member Avatar for tiredoy
0
310
Member Avatar for PsychicTide

Hey guys, this seems to be a thorn in my side. I've been working on scraping a website which uses aspx and has eventvalidation/viewstate inputs. Every other scraping experiment I've made was not this difficult. Maybe one of you geniuses here at Daniweb has an idea of how to solve …

Member Avatar for PsychicTide
0
887
Member Avatar for ikel

The following code produces the XML file that I am after. $dom = new DOMDocument('1.0', 'UTF-8'); // pretty formatting $dom->formatOutput = true; // create root element $root = $dom->createElement('Poem'); $root->setAttribute('object_id', '542'); $dom->appendChild($root); // create title element $title = $dom->createElement('title'); $root->appendChild($title); // create a node for the title element $text = …

Member Avatar for diafol
0
2K
Member Avatar for PsychicTide

Dajia hao, daniwebians! Just a quick question, is it possible to focus on a textbox on an externally loaded website? My goal is to load an external website, focus on a textfield, auto fill it with the current date, then submit it to then run my newly created scraper tool …

Member Avatar for PsychicTide
0
2K
Member Avatar for nikk8a

Hi Friends, Working with communication between a child javascript window and parent jsp function, I am trying to access a function defined in the parent jsp from its child window which is a separate js file. This logic works fine in IE, but breaks in Chrome. * Parent function: multiCreateCallback() …

Member Avatar for nikk8a
0
1K
Member Avatar for kannan mangalar

in this table how to extract table data and mainly get value after the <b> tag like email id, tel, address <table width="100%" cellspacing="0" cellpadding="10" border="0" class="text"> <tbody> <tr valign="top" onmouseout="this.className = 'pa-nor'" onmouseover="this.className = 'pa-row-highlight'" class="pa-nor"> <td width="50%"> <span class="text1"> School name</span><br> <font color="#cococo"><i>Secondary School</i></font><br> <b>Principal Name:</b> kannan<br> <b>Name …

Member Avatar for diafol
0
335
Member Avatar for kannan mangalar

**this table dont have a id,class, i want get the content** <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td width="14%" height="25">FullName:</td> <td width="86%">kannan</td> </tr> <tr> <td height="25">email</td> <td>kanna@sample.com</td> </tr> </tbody> </table>

Member Avatar for diafol
0
221
Member Avatar for alexjewell

I'm using the Prototype framework to send a form via Ajax, and I'm using a form validation script ([url]http://tetlaw.id.au/view/javascript/...eld-validation[/url]) to validate the form. Both work beautifully by themselves. The problem is this: I need some way to merge the two so that the form submits after validation, and that the …

Member Avatar for Troy III
0
537
Member Avatar for klemme

Hi all, I am creating a function, that filters products, that are allready loaded into the DOM. JSFiddle: http://jsfiddle.net/Klemme/8CFVa/2/ Please read on, two get the issue :-) In each product div, I have listet an HTML5 data attribut like this example: data-options="{"brand":"acer","screenSize":"17","processor":"intel","grafik":"intel"}" I have 2 groups of checkboxes working now, …

0
232
Member Avatar for mkweska

Hello everyone! Needing some help with styling a DOM parse. I have been toying around with the style but continue to end up with whitespace parse errors... So first of all here is the working code Sorry about the paste however the code snippet continued to display: The code snippet …

Member Avatar for nauticalmac
0
290
Member Avatar for george61

Hi all I've created simple javscript gallery using previous and next links. The problem is that I want fade effect between images like this: [url]http://tobia.github.com/CrossSlide/[/url] I've pasted few lines of jquery code in my javascript functions but the fade effects aren't the same. Any help will be greatly appreciated. Best …

Member Avatar for Mukund_1
0
1K
Member Avatar for eburlea

Hello everyone, I am trying to retrieve some info from a remote site using PHP DOMDocument and I cannot figure out why the code returns NULL, although the provided ID exists on the page. Please help. $dom = new DOMDocument("1.0", "utf-8"); @$dom->loadHTMLFile('http://sports.yahoo.com/news/messis-tax-hearing-put-back-122033643--sow.html'); $content = $dom->getElementById('yog-content'); var_dump($content);

Member Avatar for pritaeas
0
147
Member Avatar for PriteshP23

I would like to get Type, Id and Height values in database table. It is not working. There is no error message. Objective is to get RESPECTIVE "Type" from Catalaog which has same Reference from Installed. Well, I have 850 Mb XML file and i just would like to present …

Member Avatar for PriteshP23
0
269
Member Avatar for Suzie999

A short while ago I was intrigued by a reply made by nullptr in [this thread](http://www.daniweb.com/software-development/cpp/threads/458583/shellexecuteex-api). So I began to look for ways to access the rest of IE (IWebBrowser2) interface, and met limited and varied success. Accessing for instance a <div></div> element in a wep page html document was …

Member Avatar for Suzie999
0
264
Member Avatar for scarcella

I have written a script to get all elements then i go and find this element in another iframe. Wait, so essentially i have 2 frame's on a page, the one on the left i called the "online" and the 2nd one i called the "base". My end result is …

Member Avatar for LastMitch
0
301
Member Avatar for atikah8890

Hi. I'm using JS for d3. What I intend to do is get some data from database and plot them in a diagram I've created. Here's what I've done so far: Fetched the data from database: <?php while($row = mysql_fetch_assoc($query)){ $q_id[] = $row['q_id']; $res_val[] = $row['response_value']; $chpt[] = $row['cr_chpt']; $lvl[] …

Member Avatar for atikah8890
0
330
Member Avatar for Suzie999

Hi. I am looking at creating a small app which will gain access to and use the Internet Explorer DOM. I want to access the DOM of an existing instance of Internet Explorer. The app will be basic and simple, and will be first used to retieve properties of web …

Member Avatar for Suzie999
0
526
Member Avatar for eburlea

Hi. I use a fuction to retrieve some information from a remote site: $dom = new DOMDocument; @$dom->loadHTMLFile($url); $page_content = $dom->saveHTML(); When I echo the content, some characters appear like 'á'. I have tried many things from the internet, but nothing helped. Is there a solution?

Member Avatar for eburlea
0
2K
Member Avatar for rakibtg

I am using PHP Simple HTML DOM Parser * [Manual] to fetch data from websites. Now what i wanna do is to remove first three words from all span which has `class="yeah"` from the fetched content So i have implement this code but it has a problem: foreach($html->find('span.yeah') as $xdat) …

Member Avatar for rakibtg
0
230
Member Avatar for rakibtg

how to get content from a table id in [simple html dom parser](http://simplehtmldom.sourceforge.net), the table id is `products` and i have tried with this code: <?php include("dom.php"); $html = file_get_html("http://www.example.com"); $result = $html->find('table[id=products]'); echo "$result"; ?> but don't works, any idea to fetch content of a table which id is …

Member Avatar for LastMitch
0
233
Member Avatar for rakibtg

I am just starting with Simple PHP HTML DOM PARSER so, what is the way to replace text only of any fetched content. Suppose i have fetched some content from a website with full HTML codes, but while applying PHP code like `$html = str_replace(".", "DOT", $html);` it cause a …

Member Avatar for rakibtg
0
482
Member Avatar for Venom Rush

I'm trying to create an xml document without converting html entities but when I create and save the file with DOMDocument the < and > characters are converted to &lt; and &gt; so trying to wrap copy within <![CDATA[]]> is proving problematic. Example of my code below: // Initiate the …

Member Avatar for Venom Rush
0
938
Member Avatar for rakibtg

i wonder if it is possible to fetch images using [PHP Simple HTML DOM Parser](http://simplehtmldom.sourceforge.net/) and obtain it in a specific URL. Suppose it fetched a Image in a variable like $img = 'http://www.example.com/some_image_address.JPEG'; Now is it possible to get this image in my own domain path, like $new_img = …

Member Avatar for diafol
0
227

The End.