By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,382 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,382 IT Pros & Developers. It's quick & easy.

Probelm with cfoutput / document.write JS function in Netscape 7

P: n/a
I am encountering a strange problem in Netscape 7 with a CFM file I am
trying to troubleshoot (the page is working fine in NS Communicator
and IE). Below is a sample of the problematic line of javascript code.
Note that in the actual file, I've surrounded the variable
'#cookie.cookiename#' with CFOUTPUT tags:

document.write('<input type="Hidden" name="affiliate"
value="#cookie.cookiename#">');

When I load the document in Netscape 7, I get a CF Error message, like
the #cookie.cookiename# variable isn't being replaced with the actual
value (the cfoutput tags are being ignored). I suspect that it's a bug
of some kind in NS 7's implementation of the document.write javascript
function, and am hoping that there is some kind of workaround. Has
anyone else encountered this problem? If so, is there a fix for it,
and if so, what is it?

thanks,
- yv**@ideasdesigninc.com
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
you'd better try an Coldfusion newsgroup...
My gues is that the cookie isn't been written
properly...
what does the CF error look like?

"Yvan J. Gagnon" <yv**@ideasdesign.com> wrote in message
news:cb**************************@posting.google.c om...
I am encountering a strange problem in Netscape 7 with a CFM file I am
trying to troubleshoot (the page is working fine in NS Communicator
and IE). Below is a sample of the problematic line of javascript code.
Note that in the actual file, I've surrounded the variable
'#cookie.cookiename#' with CFOUTPUT tags:

document.write('<input type="Hidden" name="affiliate"
value="#cookie.cookiename#">');

When I load the document in Netscape 7, I get a CF Error message, like
the #cookie.cookiename# variable isn't being replaced with the actual
value (the cfoutput tags are being ignored). I suspect that it's a bug
of some kind in NS 7's implementation of the document.write javascript
function, and am hoping that there is some kind of workaround. Has
anyone else encountered this problem? If so, is there a fix for it,
and if so, what is it?

thanks,
- yv**@ideasdesigninc.com

Jul 20 '05 #2

P: n/a

"Yvan J. Gagnon" <yv**@ideasdesign.com> wrote in message
news:cb**************************@posting.google.c om...
I am encountering a strange problem in Netscape 7 with a CFM file I am
trying to troubleshoot (the page is working fine in NS Communicator
and IE). Below is a sample of the problematic line of javascript code.
Note that in the actual file, I've surrounded the variable
'#cookie.cookiename#' with CFOUTPUT tags:

document.write('<input type="Hidden" name="affiliate"
value="#cookie.cookiename#">');

When I load the document in Netscape 7, I get a CF Error message, like
the #cookie.cookiename# variable isn't being replaced with the actual
value (the cfoutput tags are being ignored). I suspect that it's a bug
of some kind in NS 7's implementation of the document.write javascript
function, and am hoping that there is some kind of workaround.
Since you are getting a CF error message, it is unlikely the problem is with
Netscape, since the CF is processed on the server before the page is sent to
the browser. Is netscape affecting the cookie being set?

Check the CF code that sets the cookie. If I remember correctly you can't
use the cflocation tag and set cookie values in the same script, this might
be something to check for.
Has
anyone else encountered this problem? If so, is there a fix for it,
and if so, what is it?

thanks,
- yv**@ideasdesigninc.com

Jul 20 '05 #3

P: n/a
"Richard Hockey" <ri***********@dsl.pipex.com> wrote in message news:<3f*********************@news.dial.pipex.com> ...
"Yvan J. Gagnon" <yv**@ideasdesign.com> wrote in message
news:cb**************************@posting.google.c om...
I am encountering a strange problem in Netscape 7 with a CFM file I am
trying to troubleshoot (the page is working fine in NS Communicator
and IE). Below is a sample of the problematic line of javascript code.
Note that in the actual file, I've surrounded the variable
'#cookie.cookiename#' with CFOUTPUT tags:

document.write('<input type="Hidden" name="affiliate"
value="#cookie.cookiename#">');

When I load the document in Netscape 7, I get a CF Error message, like
the #cookie.cookiename# variable isn't being replaced with the actual
value (the cfoutput tags are being ignored).

I suspect that it's a bug
of some kind in NS 7's implementation of the document.write javascript
function, and am hoping that there is some kind of workaround.


Since you are getting a CF error message, it is unlikely the problem is with
Netscape, since the CF is processed on the server before the page is sent to
the browser. Is netscape affecting the cookie being set?

Check the CF code that sets the cookie. If I remember correctly you can't
use the cflocation tag and set cookie values in the same script, this might
be something to check for.
Has
anyone else encountered this problem? If so, is there a fix for it,
and if so, what is it?

thanks,
- yv**@ideasdesigninc.com

As I had implied, I suspect that this is an issue with Netscape's
improper handling of the Javascript document.write function when
combined with dynamic Cold Fusion content.

When I view the document source code in Netscape 7, I see the
beginning part of the javascript code, and then right where the
variable is supposed to be displayed, I get something like the
following:

document.write('<input type="hidden" name="affiliate"
value="</td></tr></table></td></tr></table>

(etc., etc., -- where the CF error message gets displayed.)

What's strange is that the page is designed to have the affiliate
value passed to it via the query string (ie:
index.cfm?referrer=companyname). And when I pass a value to it in
Netscape 7, the page loads fine (no errors), -- and loads fine
afterwards, --- even when no value is passed to it via the query
string. But as soon as I delete the cookie and try to access the page
again without passing a value to it, I get the CF error message.
Again, I do not get this behavior when accessing the page in IE, with
our without a referrer being passed to it.

- yvan
Jul 20 '05 #4

P: n/a

"Yvan J. Gagnon" <yv**@ideasdesign.com> wrote in message
news:cb**************************@posting.google.c om...
"Richard Hockey" <ri***********@dsl.pipex.com> wrote in message

news:<3f*********************@news.dial.pipex.com> ...
"Yvan J. Gagnon" <yv**@ideasdesign.com> wrote in message
news:cb**************************@posting.google.c om...
I am encountering a strange problem in Netscape 7 with a CFM file I am
trying to troubleshoot (the page is working fine in NS Communicator
and IE). Below is a sample of the problematic line of javascript code.
Note that in the actual file, I've surrounded the variable
'#cookie.cookiename#' with CFOUTPUT tags:

document.write('<input type="Hidden" name="affiliate"
value="#cookie.cookiename#">');

When I load the document in Netscape 7, I get a CF Error message, like
the #cookie.cookiename# variable isn't being replaced with the actual
value (the cfoutput tags are being ignored).

I suspect that it's a bug
of some kind in NS 7's implementation of the document.write javascript
function, and am hoping that there is some kind of workaround.


Since you are getting a CF error message, it is unlikely the problem is with Netscape, since the CF is processed on the server before the page is sent to the browser. Is netscape affecting the cookie being set?

Check the CF code that sets the cookie. If I remember correctly you can't use the cflocation tag and set cookie values in the same script, this might be something to check for.
Has
anyone else encountered this problem? If so, is there a fix for it,
and if so, what is it?

thanks,
- yv**@ideasdesigninc.com

As I had implied, I suspect that this is an issue with Netscape's
improper handling of the Javascript document.write function when
combined with dynamic Cold Fusion content.

When I view the document source code in Netscape 7, I see the
beginning part of the javascript code, and then right where the
variable is supposed to be displayed, I get something like the
following:

document.write('<input type="hidden" name="affiliate"
value="</td></tr></table></td></tr></table>

(etc., etc., -- where the CF error message gets displayed.)

What's strange is that the page is designed to have the affiliate
value passed to it via the query string (ie:
index.cfm?referrer=companyname). And when I pass a value to it in
Netscape 7, the page loads fine (no errors), -- and loads fine
afterwards, --- even when no value is passed to it via the query
string. But as soon as I delete the cookie and try to access the page
again without passing a value to it, I get the CF error message.
Again, I do not get this behavior when accessing the page in IE, with
our without a referrer being passed to it.

- yvan


Oke, but still CF is being interpreted on the server... so CF doesn't
know about the javascript... What is the CF error??
Is there an extra # in the cookie variable?
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.