26 Solved Topics
Remove Filter
|
|
@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); … |
|
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 … |
|
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 … |
|
<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 … |
|
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 = … |
|
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() … |
|
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 … |
|
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 … |
|
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[] … |
|
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? |
|
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 < and > so trying to wrap copy within <![CDATA[]]> is proving problematic. Example of my code below: // Initiate the … |
|
i have a script which will fetch content from a website, what i wanna do is modify all that links. Suppose: $html = str_get_html('<h2 class="r"><a class="l" href="http://www.example.com/2009/07/page.html" onmousedown="return curwt(this, 'http://www.example.com/2009/07/page.html')">SEO Result Boost <b> </b></a></h2>'); so, is it possible to modify or rewrite it in this way> <h2 class="r"><a class="l" href="http://www.site.com?http://www.example.com/2009/07/page.html">SEO … |
|
My PHP script can fetch content from a div id, but what is the way to filter this fetch data and exclude some of its content which has this div id `<div id="navbar" class="n">content here content here</div>` I have tried with this code but its not working $regex = '#\<div … |
|
[B]Hello guys i have a problem with PHP code and i dont know what is wrong i want to get the content of a website then search for specific tags then take the value of tags , lets say i want to search for example for these tags [/B] <div … |
|
It makes since that, when working with javascript, document.getElementById() can't find the Id of an object that hasn't yet been added to the DOM, however when I nest document.getElementById() in a function and call it after the object has been created, document.getElementById() still can't find the object. is there a … |
|
Hi All, Just a quick one, My code (Below) works in Internet Explorer, but not in Chrome, Safari or Mozilla Firefox. Not sure why, but would it be possible for someone to point me in the right direction? Thanks! Code attached; [CODE=Javascript]<script language="javascript"> function formAction(flag) { switch (flag){ case "create": … |
|
I am starting out with PHP and in my project I'm trying to fetch XML data from a url and parsing it for data. Now the url that I use is being fetched from a webpage and hence I know that it is correct and it exists. Still, when I … |
|
Hi everybody! Well my question is as follows, I need to search for a div with a specific ID using php under wordpress, till now I found images and links, but I need to find a specific div ID and copy it, for now tested with this: [CODE] $html->find('$html->find('#divid');'); $html->find('div[id=divid]');[/CODE] … |
|
I am selecting an image as part of a html form. Once selected, jQuery assigns a user-defined attribute of the image to a hidden form variable and passes it to form handler. Neat. Problem is when I dynamically add images that can be selected. I am using live function to … |
|
hey people, i have the following problem, i'm setting up a webshop with over 2k items and every 6months the prices are changing(wines) so i was wondering how to import an xml file into a mysql database without having to go in phpmyadmin. this because i don't want the people … |
|
I'm construted a php-class where I create and save some elements in an XMLfile. Outside that class I instantiate the class and save it in a _SESSION['obj'] if the session has not been created yet, otherwise I want to get the document back and add new elements to the XMLfile. … |
|
Hi all, I have an XML File: staff_record> <staff> <username>user1</username> <password>password1</password> </staff> <staff> <username>user2</username> <password>password2</password> </staff> <staff> <username>user3</username> <password>password3</password> </staff> </staff_record> I have a form (login.html) and I need to use an ASP page (login.asp) to redirect the user to home.asp when they have successfully logged in, based on the … |
|
I am creating controls which are added to the page at run time. As these controls are added I separate them into a UL/LI list by injecting literals assigned as (<ul>, </ul>,<li>,</li>). The page in question uses a master page template. The ul/li function is called in the page_load event … |
|
How would I go about passing a user agent when requesting an external xml feed from a 3rd party web service. Need to pass the user agent or else the feed produces an error. I am using DOM [code] <?php $request1 = 'http://www.abc123.com/webservice/this.xml'; $requestIT1 = $request1; $response1 = new DOMDocument(); … |
|
I want to remove the JOB node with JOBNAME "One" from the following file: <SETTINGS> <SYSTEM> <VERSION>3.1<VERSION> </SYSTEM> <JOB> <JOBNAME>One</JOBNAME> </JOB> <JOB> <JOBNAME>Two</JOBNAME> </JOB> </SETTING> The code that is supposed to remove it looks like this: [CODE]try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); Document doc = docBuilder.parse(new … |
|
Hi there, I am wanting to find out how to add text to a hidden field in a HTML form. I want to add text from an array, the array holds the information for the caption placeholder for the images. Basically i have an image viewer which lets you scroll … |
The End.