Jump to content

jasonc

Members
  • Content count

    841
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jasonc

  • Rank
    Prolific Member

Profile Information

  • Gender
    Not Telling
  1. I have looked at the children() link but its gone completely over my head. It looks like the only way I can do this is the long way and search the html code for the <dt>item7:</dt> then grab the text within the next element if the text was found. I was just wondering if there was an easier way of doing this without all the extra code.
  2. The code is from a third-party site which I wish to get certain content from. I am wanting to search within the "b" class (there is only on in the source code!) for the <dt>item7</dt> then grab the content of the element that follows it. the otherwise return an empty string $b = ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html"> <head> </head> <body> <div class="b"> <dl> <dt>item1:</dt><dd>1</dd> <dt>item2:</dt><dd>2</dd> <dt>item3:</dt><dd>3</dd> <dt>item4:</dt><dd>4</dd> <dt>item5:</dt><dd>5</dd> <dt>item6:</dt><dd>6</dd> <dt>item7:</dt><dd>7-</dd> <dt>item8:</dt><dd>8</dd> <dt>item9:</dt> </dl> </div> </body> </html> '; $b = new SimpleXMLElement($b); echo $b->dl->dt; // echo the content of <dd> only if the previous <dt> node has the text 'item7' in it.
  3. If I done a JSFiddle it would be the same code. I recreated the same problem using my original code and stripped out everything that was not needed to show my issue. The right side select is the issue. I am wanting the options 'container' to be right aligned to the select as shown in the image I added in the OP
  4. For the sake of simplicity I have used instyle. I am wanting the right side select to have its option 'container' to be moved over to the left so it is like that in the image in my first post. <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style> .form2 { width: 200px; margin: 0 auto; padding: 0.5em 0.5em 0.5em 0.5em; } .form2 input.field { float: left; width: 100%; height: 2em; border: 0.02em solid #000; line-height: 1.7em; font-size: 0.9em; padding: 0.2em; } .form2 select { } .form2 select.field { float: left; width: 100%; height: 2em; border: 0.02em solid #000; line-height: 1.7em; font-size: 0.9em; padding: 0.2em; } </style> </head> <body> <form class="form2" id="form2" name="form2" method="post" action=""> <div style="float: left; width: 48%;"><select class="field" title="Select Stairs, Lift or N-A" name="stairliftna" id="stairliftna"><option value="Select Stairs, Lift or N-A">Select Stairs, Lift or N/A</option><option value="Stairs">Stairs</option><option value="Lift">Lift</option><option value="n-a">N/A</option></select><br><br> </div> <div style="float: left; width: 4%;"> </div> <div style="float: left; width: 48%;"><select class="field" title="Select Packing service" name="packingservice" id="packingservice"><option value="Select Packing service">Select Packing service</option><option value="Self packing">Self packing service</option><option value="Part packing">Part packing service</option><option value="Full packing service">Full packing service</option></select><br><br> </div> <br class="clearFloat"> </form> </body> </html>
  5. I have been looking via google and this forum but still no closer to finding the answer to this. I have a select that is in the right side of my page but the options are jumping out to the right side of the page. So I am looking to get the 'container' moved to the left so it is aligned to the right of the select.
  6. jasonc

    Project assist

    Hi, Are you still looking for a coder ? Cheers Jason
  7. can this be done using preg_replace?
  8. I wish to read all data from a DB table and display it. Displaying each record, if there is a character is between x0 and x7F then wrap it in a span that will highlight it using CSS.
  9. I wish to highlight the special characters that fall within the following range x00 to x7F Please can someone advise how could I do this ?
  10. I downloaded Netbeans and installed it and like the look of it. I have not had an major issues with uploading any of my custom written files directly to the server using DW. (from the errors point of view) I would really like to have it all setup just like I had with DW, where I edit the files and it saves it locally and then immediately to the server. I have yet to go through all the settings to see what under the hood. But did see something about saving locally for some testing server or something, will have to check that again. Think I will check a bit more of the help pages as well. Are any of the settings files of the project saved to the server ? Change is good sometimes but only if it does not take away some of the original features that I was use to.
  11. I do see your point.. but I like the features of DW. Also the ability of of being able to upload files, folder within the editor at the same time.
  12. When I open a file be it a html or in most of the cases a PHP file the view changes to what it was saved as. So say I have indented a portion of text to 2 or 3 or more tab indents and save the file. When I open it again in dreamweaver the tabs are still there, but the whole portion that was indented is now brought to the next line and taken to the first column and not indented as it was previously saved. If I enit the file in notepad and open it the file is how it was saved as I wanted it. But opening this file in DW and the code gets changed. I have looked through a lot of the settings nad can not find anything that has helped stop this. Even the do not change files with certain extentions stops it. Is there another setting that I have missed that will stop this ?
  13. Please can someone advise how I correctly access each of the nodes in an XML file. echo($geoLocXML->isp . '<br>'); this is what I used before and it worked up to last month, then all of a sudden it failed. I have also tried this code on a different server and it fails there too, so it suggests there is an error in the code, but for the life of me I can not find it. <?php //exit; error_reporting(-1); //$ip = $_SERVER['REMOTE_ADDR']; //$geoLocXML = getGeoLocXML($ip); //->result[0]; //$geoLocXML = file_get_contents('http://api.geoiplookup.net/?query='.$ip); $getGeoLocXML = simplexml_load_file('http://www.mysite.com/getGeoLocXML.xml'); /* $getGeoLocXML = '<?xml version="1.0" encoding="iso-8859-1"? > <ip> <results><result><ip>123.123.123.123</ip><host>123.123.123.123</host><isp>Provider</isp><city>My City</city><countrycode>GB</countrycode><countryname>United Kingdom</countryname><latitude>123.123</latitude><longitude>-1.123</longitude></result></results> </ip> '; */ $geoLocXML = $getGeoLocXML->result[0]; echo($geoLocXML . '<br>'); echo($geoLocXML->isp . '<br>'); echo($geoLocXML[city] . '<br>'); echo($geoLocXML[countryname] . '<br>'); /* <results> <result> <ip>123.123.123.123</ip> <host>123.123.123.123</host> <isp>Provider</isp> <city>My City</city> <countrycode>GB</countrycode> <countryname>United Kingdom</countryname> <latitude>123.123</latitude> <longitude>-1.123</longitude> </result> </results> */ ?> <?xml version="1.0" encoding="iso-8859-1"?> <ip> <results><result><ip>123.123.123.123</ip><host>123.123.123.123</host><isp>Provider</isp><city>My City</city><countrycode>GB</countrycode><countryname>United Kingdom</countryname><latitude>123.123</latitude><longitude>-1.123</longitude></result></results> </ip>
  14. jasonc

    Cannot modify header information

    Hi please can you let us know the content of your logout.php file as this is where the error is, as stated in the error message. It's likely that there is some output too soon,
  15. The £ is showing as a diamond for one, I'll have to check for the other characters.
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.