We help IT Professionals succeed at work.

JS error in Opening frame in Database

GaryZ
GaryZ asked
on
I am getting an error saying $main is not described, but it is. I am trying to pass data in an onLoad from the top frame to bottom, I am using the onLoad function in the top frame where the field is defined.

parent.frames[1].window.location='/TBopRatin.nsf/LinkBar?OpenDocument&Field1' + $main;
Comment
Watch Question

Change the name of the $Main to Main, I hope JS variable doesn't accept any special char as a starting.

BTW, Gary is this related to other question u asked previously, and how is it going ?

~Hemanth

Author

Commented:
I have tried that and I get the same error. No matter what I try to send in query_string I get an error.

Yes this is all tied together, I think this is the last part.  I can create a small sample nsf and the code works, when I put it in my production document, it won't work.

Author

Commented:
I have tried that and I get the same error. No matter what I try to send in query_string I get an error.

Yes this is all tied together, I think this is the last part.  I can create a small sample nsf and the code works, when I put it in my production document, it won't work.
Can u post the whole js code ?

Author

Commented:
That's it in the first post, it is in the onLoad

Commented:
GaryZ, be so kind a paste the URL of this "first post" here.

...or even better: the actal code you are working on

So long,
zvonko

Author

Commented:
The actual code is in the first post. I am sorry I cannot post the URL as this is on a secure server.

Commented:
GaryZ, give me the Title of this first post.

Author

Commented:
The code is in the first post to this message

parent.frames[1].window.location='/TBopRatin.nsf/LinkBar?OpenDocument&Field1' + CurrLocation;


I get an error saying CurrLocation is not definded, I have recoded it 5 times. I have also tried other fields on the form and I get the same error for any field on the form.

This code is on the main form in the onLoad which is also the top frame. The LinkBar is the form used for the bottom frame.
Application Engineer
Commented:
Try to refer to the value as follows :
document.forms[0].CurrLocation.value
If you just put CurrLocation you are passing an unknown object, if you use the full descriptive name with the .value propertie you will pass the value of the field to the function and I'm thinking that's what you want to do ?

I'll be leaving on hollidays to Canada tomorrow, so I hope I could help you with this little comment. If not, I'm sure the other experts will be able to help you out further.
Take care,

JM

Author

Commented:
YES YES YES.

Thanks a lot, have a good vacation, if I could be there I would buy you a beer (and a good Cuban cigar).
Jean Marie GeeraertsApplication Engineer

Commented:
Glad to have been of some help.  And yes I had a very good vacation in Canada. Canadians are very friendly and the national parks are all well worth the visit!

Author

Commented:
Yes, Canadians are very friendly. I was in the Air Force in Germany in the late 60's and the Americans and Canadians were about the only people that got along.

Author

Commented:
Yes, Canadians are very friendly. I was in the Air Force in Germany in the late 60's and the Americans and Canadians were about the only people that got along.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.