Re: [PHP] DOM TextArea (and dom chart please)

2010-02-03 Thread Ryan S
> I think what you are looking for is $input2->textContent in PHP. Hey Andrew (and everyone else was was kind enough to write back) ! Found the solution, this is what i am using (and it works!), and i hope it helps anyone else who finds themselves in the spot i found myself $inputs2 = $dom->

Re: [PHP] DOM TextArea (and dom chart please)

2010-02-03 Thread Michael A. Peters
Michael A. Peters wrote: $website_data = new tidy('dom_test.html',$tidy_config); Doh! Should be $website_data = new tidy('dom_test.html',$tidy_config,'utf8'); Otherwise it has the same problem with multibyte characters that loadHTML() has. But with the 'utf8' specified it works beautifull

Re: [PHP] DOM TextArea (and dom chart please)

2010-02-02 Thread Andrew Ballard
On Tue, Feb 2, 2010 at 2:29 PM, Ryan S wrote: > Hey! > i'm just starting with PHP's DOM-XML and need a little help please. > > > Basically, first i am trying to see if a input like a textbox has a 'VALUE=' > associated with it, if yes, i leave it be, if no, i add a default value. > > This *is wor

Re: [PHP] DOM TextArea (and dom chart please)

2010-02-02 Thread Michael A. Peters
Ryan S wrote: $website_data = file_get_contents('dom_test.html');//load the website data, $dom = new DomDocument; //make a new DOM container in PHP $dom->loadHTML($website_data); //load all the fetched data into the DOM container I'm not sure what the answer to your issue is, but mind if I

Re: [PHP] DOM TextArea (and dom chart please)

2010-02-02 Thread Ryan S
>// I have even tried this instead of the above: > >foreach ($inputs2 as $input2) { >if(!$input2->getAttribute("defaultValue")=="") { >$input2->setAttribute("defaultValue","it works!"); >} >} > >but no joy. > >I'm betting its pretty simple but i dont have a "DOM c

Re: [PHP] DOM TextArea (and dom chart please)

2010-02-02 Thread Ashley Sheridan
On Tue, 2010-02-02 at 11:29 -0800, Ryan S wrote: > Hey! > i'm just starting with PHP's DOM-XML and need a little help please. > > > Basically, first i am trying to see if a input like a textbox has a 'VALUE=' > associated with it, if yes, i leave it be, if no, i add a default value. > > This *

[PHP] DOM TextArea (and dom chart please)

2010-02-02 Thread Ryan S
Hey! i'm just starting with PHP's DOM-XML and need a little help please. Basically, first i am trying to see if a input like a textbox has a 'VALUE=' associated with it, if yes, i leave it be, if no, i add a default value. This *is working* as can be seen by the attached code below. But a bit