Netscape vs Iexplore and parsing
[1/4] from: philippe1:legoff:francetelecom at: 19-Mar-2002 9:22
Hi, rebolers,
I'm a newbye with Rebol and I try some scripts on rebol.com.
1/ For example, I try a example cgi-bin script. (cgiformobj.r)
This is the body script :
print "Content-Type: text/plain^/" ;-- Required Page Header
cgi-form: make object! [ ;-- Default form values.
Nom: "Pas de nom"
Pass: "Password"
Annee: now/year
]
cgi: make cgi-form decode-cgi system/options/cgi/query-string
print [
<html>
<body bgcolor="orange">
<center>
<h1>"Resultats cgi-reb"</h1>
"Nom : " <B> cgi/Nom </B><P>
"Password : " <B> cgi/Pass </B><P>
"Date : " <B> cgi/Annee </B><P>
</center>
</body>
</html>
]
this script runs well, with apache 1.3.12 or IIS 5, and Iexplore 5.5 , but NOT
with Netscape 4.5 where the browser response is :
<html> <body bgcolor="orange"> <center> <h1>"Resultats cgi-reb"</h1> ....
etc in line not interpreted by the browser.
I suppose it's a problem with CR or LF (I'm on Windows) . Is someone could help
me ?
2/ Parsing :
I want to parse a html file with anchors like
<a href="equipes/affectations.php?projet_id=8">
TEST</a>
How could I get the data TEST with parsing ?
It's probably very easy for reb-gurus, so thanks for help,
Philippe
[2/4] from: john_kenyon::mlc::com::au at: 20-Mar-2002 9:16
Philippe,
1/
>this script runs well, with apache 1.3.12 or IIS 5, and Iexplore 5.5 , but
NOT
>with Netscape 4.5 where the browser response is :
><html> <body bgcolor="orange"> <center> <h1>"Resultats cgi-reb"</h1>
....
>etc in line not interpreted by the browser.
>I suppose it's a problem with CR or LF (I'm on Windows) . Is someone
could help
>me ?
I think it is the <P> tags you are using. They should be opened and closed
<P>like this</P>
This is stopping Netscape from displaying the page. IE is more forgiving.
>2/ Parsing :
>I want to parse a html file with anchors like
><a href="equipes/affectations.php?projet_id=8">
>TEST</a>
>How could I get the data TEST with parsing ?
You could try ...
>> text: {<a href="equipes/affectations.php?projet_id=8">TEST</a>}
== {<a href="equipes/affectations.php?projet_id=8">TEST</a>}
>> parse text [ thru {<a href="equipes/affectations.php?projet_id=8">}
copy data to {</a>} (print data) to end]
TEST
== true
Cheers, John
[3/4] from: gchiu:compkarori at: 20-Mar-2002 19:48
> This is the body script :
> print "Content-Type: text/plain^/" ;-- Required Page
This should be text/html
Dunno if that will help though.
--
Graham Chiu
[4/4] from: philippe1:legoff:francetelecom at: 21-Mar-2002 16:02
--------------EEF4C6D650785658C8C183F8
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
John, graham,
Thanks a lot for help.
The problem with Netscape vs Iexplore is resolved :
---> print "Content-Type: text/plain^/" ;-- Required Page > print
Content-Type: text/html ^/
;-- Required Page
and the parsing looks well !
regards,
Philippe LE GOFF
[john_kenyon--mlc--com--au] a =E9crit :
> Philippe,
> 1/
<<quoted lines omitted: 27>>
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with
unsubscribe" in the
> subject, without the quotes.
--------------EEF4C6D650785658C8C183F8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
John, graham,
<p>Thanks a lot for help.
<p>The problem with Netscape vs Iexplore is resolved :
<p>---> print "Content-Type: text/plain^/" ;-- Required Page
===> print "Content-Type: text/<b>html</b> ^/" ;-- Required Page
<p>and the parsing looks well !
<br>
<p>regards,
<p>Philippe LE GOFF
<br>
<br>
<br>
<br>
<p>[john_kenyon--mlc--com--au] a écrit :
<blockquote TYPE=CITE>Philippe,
<p>1/
<br>>this script runs well, with apache 1.3.12 or IIS 5, and Iexplore 5.5
, but
<br>NOT
<br>>with Netscape 4.5 where the browser response is :
<br>><html> <body bgcolor="orange"> <center> <h1>"Resultats
cgi-reb"</h1>
<br>....
<br>>etc in line not interpreted by the browser.
<p>>I suppose it's a problem with CR or LF (I'm on Windows) . Is
someone
<br>could help
<br>>me ?
<br>I think it is the <P> tags you are using. They should be opened
and closed
<br><P>like this</P>
<br>This is stopping Netscape from displaying the page. IE is more forgiving.
<p>>2/ Parsing :
<br>>I want to parse a html file with anchors like
<br>><a href="equipes/affectations.php?projet_id=8">
<br>>TEST</a>
<br>>How could I get the data TEST with parsing ?
<p>You could try ...
<p>>> text: {<a href="equipes/affectations.php?projet_id=8">TEST</a>}
<br>== {<a href="equipes/affectations.php?projet_id=8">TEST</a>}
<br>>> parse text [ thru {<a href="equipes/affectations.php?projet_id=8">}
<br> copy data to {</a>} (print data) to end]
<br>TEST
<br>== true
<p>Cheers, John
<p>--
<br>To unsubscribe from this list, please send an email to
<br>[rebol-request--rebol--com] with "unsubscribe" in the
<br>subject, without the quotes.</blockquote>
<br> </html>
--------------EEF4C6D650785658C8C183F8--
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted