473,396 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
4 2745
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

"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
"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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: 2obvious | last post by:
This is a pipe dream, I realize, but I'm trying to emulate the functionality of the W3C DOM-supported document.getElementsByTagName method under the very nightmarish Netscape 4. Through some...
1
by: nickolausp | last post by:
When embedding a JavaScript document.write within a JavaScript document.write in Netscape 4.x (example below), the text is written out of logical order. <script type="text/javascript"> <!--...
3
by: Catherine Lynn Smith | last post by:
I am creating a webpage with dhtml <DIV> layers and I want a link on one layer to modify the content on another but I seem to keep running into errors. Basically I create a layer in the middle...
2
by: Chris | last post by:
Hi, I'm having a problem utilizing the DOM. I tried using my own code, but it wasn't working, so I tried to use code straight from another web site and it verified that the problem may not be...
3
by: Hermit Crab | last post by:
I'm seeing some unexpected (at least to me) behavior in the 'window' and 'document' objects under Netscape 7.1 and Internet Explorer 6.0. When a property is added to the prototype for 'Object',...
12
by: *.* | last post by:
Hey- I seem to be having a problem with the document.lastModified property. The way it is suppose to work is that it returns the date and time at which the document was last modified. IN my...
14
by: Eli | last post by:
I've got a script that I'm trying to debug which uses document.write() to place HTML within a page. In both IE6 and Firefox when I view source, I see only the script itself and not any HTML as...
4
by: ashkaan57 | last post by:
Hi, I am using the following code to show/hide part of an html page. It works in Netscape and Firefox but dies in IE: "Error: document.layers is null or not an object" <style> ..noshow {...
15
by: Cerebral Believer | last post by:
Hi all, I am a newbie to JavaScript and am just trying to get a script going that will write the ful date and time to each webpage as it is viewed. Can anyone point out what mistakes there are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.