Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-09-13
5
Medium Priority
?
521 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 500 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

609 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