Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now