Solved

opener.document.forms.0.CommentPrefix.value is null or not a object

Posted on 2004-09-13
5
495 Views
Last Modified: 2013-12-18
I have ask this question years ago and it worked well.  I am trying to update the database and this is there error I get on the web side.  

Here is the Code.

cw=window.open('','','height=150,width=300,status');
cw.moveTo(200,200);
cw.document.write('<html><head><title>Add Comment</title></head>'+
'<body><form><h3>Please Enter Comment</h3>'+
'<textarea name=add_comment_2 rows=2 cols=30></textarea>'+
'<input type=button value=OK '+
'onClick="opener.document.forms[0].Comments.value=\'\';'+
'opener.document.forms[0].CommentHistory.value+=\'\\n\'+'+
'opener.document.forms[0].CommentPrefix.value+'+
'document.forms[0].add_comment_2.value;'+
'opener.document.forms[0].RefreshButton.onclick();window.close()">'+
'<input type=button value=Cancel '+
'onClick="window.close()">'+
'</form></body></html>');
cw.document.close();

Here the attributes on CommentPrefix

value = @Name([CN]; @UserName) + " " + @Text(@Now)+" "
type = text - computed for display
hidden from client and web

Thanks
0
Comment
Question by:Jaziar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Expert Comment

by:Bozzie4
ID: 12045189
What error ?
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 125 total points
ID: 12045210
If CommentPrefix is a hidden field or a computed for display field, it won't normally exist on the web page.  Look at the page source, see if you can find any reference to <INPUT Name="CommentPrefix"...

What you can do is make it an editable field, and just put in an HTML attribute of TYPE=HIDDEN
0
 

Author Comment

by:Jaziar
ID: 12046165
I have added Type display:none to the field I still get the error in the dialog box bottom left hand side
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12048246
Jaziar,
Does the COmmentPrefix field is inside the form tag. As Qwal pointed , Just have a look at the view source and check whether COmmentPrefix is generated or  not, If it is not , then you might have to use ID to set the value

Partha
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 12053982
Also make sure that you have used the exact case for the reference, because JavaScript is case-sensitive.

As suggested above, make sure to remove any hide-when's for the browser use 'display:none' or 'type=hidden' parameters to hide the field in the browser.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question