Solved

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

Posted on 2004-09-13
5
490 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
Comment Utility
What error ?
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

6 Experts available now in Live!

Get 1:1 Help Now