Link to home
Start Free TrialLog in
Avatar of GaryZ
GaryZ

asked on

JS error in Opening frame in Database

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;
Avatar of HemanthaKumar
HemanthaKumar

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
Avatar of GaryZ

ASKER

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.
Avatar of GaryZ

ASKER

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 ?
Avatar of GaryZ

ASKER

That's it in the first post, it is in the onLoad
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
Avatar of GaryZ

ASKER

The actual code is in the first post. I am sorry I cannot post the URL as this is on a secure server.
GaryZ, give me the Title of this first post.
Avatar of GaryZ

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Jean Marie Geeraerts
Jean Marie Geeraerts
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GaryZ

ASKER

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).
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!
Avatar of GaryZ

ASKER

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.
Avatar of GaryZ

ASKER

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.