|
Posted by one man army on 01/18/06 20:52
In article <newsAT-93280A.09494218012006@newsclstr02.news.prodigy.com>,
one man army <newsAT@screenlightDOT.com> wrote:
> Hi All-
> I am new to PHP. I found FAQTS and the php manual. I am trying this
> sequence, but getting 'no zip string found:'... PHP Version 4.4.0
>
> $doc = new DomDocument;
> $res = $doc->loadHTMLFile("./aBasicSearchResult.html");
> if ( $res == true )
> {
> $zip = $doc->getElementById('zipRaw_id')->value;
> if ( 0 != $zip ) {
> ... stuff that works
> } else {
> $res = "no zip string found: " . $zip;
> }
> } else {
> $res = "loadHTMLFile() returned false";
> }
>
> -----
> in Javascript, this works in the doc
>
> setTextContent( getElementById_s('divZipCheckRes'),
> getElementById_s('zipRaw_id').value );
>
> getElementById_s() is a cover func for browser compatability..
>
> -----
> I just tried these variations
>
> $elem = $doc->getElementById('zipRaw_id');
> //$zip = $elem->getAttribute( 'value' );
> $zip = $elem->innerText;
>
> still nothing
> any clues?? thanks in advance
>
> ====
> PHP Version 4.4.0
btw- the element is an <INPUT type="text"> within a form. There is only
one ID by that name, and only one INPUT in the form. A Very Simple Page.
Navigation:
[Reply to this message]
|