Solved

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

Posted on 2004-09-13
5
497 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange coexistence and migration from Lotus DOmino 8 243
Incorrect reply-to address Lotus 2 46
Lotus Domino server 11 72
Counting documents in a Domino View 3 135
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

739 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