- Create Account

Position in a table which is in a framset

Forums > Cascading Popup Menus: Help > Position in a table which is in a framset
Author
Message

1) rkr Group: Guests
IP: 85.218.--.--
I'm evaluating 'Cascading Popup Menus v5.2' in the following context:
- Site is using frameset and asp
- Need to position Menu in a table cell
-------------------------
First, tried 'Cascading Popup Menus v5.2' without 'elmPos'
-->  everything works fine !
-------------------------
Then,  i tried to position the Menu in an anchor of the document in the framset named 'top_fr'.
For basic testing the anchor is placed at the top, just after <body>
<a id="PosMenu" name="PosMenu"></a>
The POP_EVENTS.JS script tag is placed immediately before the closing </BODY>

Tried  then to call the StartMenu
so:
startMenu('root', false, 'top_fr.page.elmPos("PosMenu").x', 'top_fr.page.elmPos("PosMenu").y', 17, hBar, 'top_fr');
and so:
startMenu('root', false, 'window.page.elmPos("PosMenu").x', 'window.page.elmPos("PosMenu").y', 17, hBar, 'top_fr');
In both cases it doesn't work.

Certainly I'm doing something wrong. Could you help me ?
Thanks in advance for your answer.

2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 202.137.--.--
elmPos isn't included by default in the frameset demo. Copy and paste it from the single-frame script pop_data.js and into the frameset script file under your menu data, and keep the first approach 'top_fr.page...' and things should work OK!

- Angus.

3) rkr Group: Guests
IP: 85.218.--.--
Thanks for your reply.

Not sure to have understood what to copy where - Sorry.
And actually in 'pop_data.js' loaded in the frameset (and from where I try to call the StartMenu) there's already a function named 'page.elmPos'
(which  begin with: "function(e,p) { var x=0,y=0,w=p?p:this.win; ... ...)

Hope  you can give me some more hints.
Hope you find some time to give me an answer again.
Thanks in advance.
Roger

4) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 203.109.--.--
Sorry, I was wrong, it didn't used to be in the frameset demo but in the current release it is :).

I  would try giving that link an HREF just for slightly better browser compatibility and testing. Failing that, I need to see a link to your implementation so far. I just tested putting a link in the content document and the submenus correctly positioned themselves relative to it in Firefox.

- Angus.

5) rkr Group: Guests
IP: 85.218.--.--
Sorry, but it doesn't work so far.
-------------------------------------
As explained the following works in a frameset context
[3 frames and two are concerned: 'top_fr' and 'main']:
startMenu('root',  false, 20, 35, 17, hBar, 'top_fr');
addItem('Groupes de travail', 'mag', 'sm:');
... ...
startMenu('mag', true, 'main.page.scrollX()+12', 'main.page.scrollY()+12', 185, subM, 'main');
... ...
-------------------------------------
Tested Browsers: Netscape v.7.0 + MS_Explorer v6.0.
'-------------------------------------
Now, i'm trying to position the menu in the frameset 'top_fr' relative to an anchor with 'elmpos'.
-----
Upon  your last answer, i've tried to add an 'href' in the anchor:
<a id="APosMenuT" name="APosMenuT" HREF="http://www.google.com">TEST</a>
-----
Then from 'pop_data.js' (contained in the frameset)
StartMenu is called:
so:
startMenu('root', false, 'top_fr.page.elmPos("APosMenuT").x +35', 'top_fr.page.elmPos("APosMenuT").y  +35', 17, hBar, 'top_fr');
or so:
startMenu('root', false, 'window.page.elmPos("APosMenuT").x +35', 'window.page.elmPos("APosMenuT").y  +35', 17, hBar, 'top_fr');
-----
<-->  Result: No luck - 'elmpos' doesn't work so far. Any other suggestions ?
Big Thanks in advance for your answer!
Roger

6) rkr Group: Guests
IP: 85.218.--.--
About link to implementation (evaluation):
Sorry, but to communicate a public link to site is currently not possible. Reason: Site in Dev.
IF needed could communicate pwd-access to the Site through eMail. BUT not before next week.
SO - Hope  you have some other suggestions without site-access.
+With best greetings.
Roger

7) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 203.109.--.--
Sorry, can't really tell you any more without seeing the page. You could always just "View Source"/"Save As" a copy of the page or similar and post it somewhere as long as it replicates the layout issue.

- Angus.

8) rkr Group: Guests
IP: 85.218.--.--
OK. Sent to you a link to the test page.
A Big Thank in advance for your answer.
Roger

9) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 203.109.--.--
Thanks for your email to a saved copy!

There are a couple of errors at the moment:

1) Obviously you still have top_fr.page.winW() sitting in the middle of your menu data.
2) In HeadPage.asp there's an uncommented } in a <script> block that is erroring.

I'd suggest trying Firefox http://www.mozilla.com with Firebug http://www.getfirebug.com -- just trust me on this, you will hopefully thank me later :). It makes debugging errors a cinch.

That said, the script should in theory copy all the 'page' object's properties in its subframes. It appears that elmPos is not transferring over sadly. If you have pop_events_commented.js, try manually copying and pasting the page.elmPos function into it just after where it copies the scFr.page element, and use in place of pop_events.js. That might fix it up for you?

- Angus.

10) rkr Group: Guests
IP: 85.218.--.--
Thank you for your answer.
I'll get a look to 'getfirebug'. Thanks.

Sorry but don't understand everything in your message.

A)
""1)  Obviously you still have top_fr.page.winW() sitting in the middle of your menu data.""
--> ?

B)
""If you have pop_events_commented.js, try manually copying and pasting the page.elmPos function into it just after where it copies the scFr.page element, and use in place of pop_events.js""
--> don't understand what to copy where
--> can you put in your answer the modified block

Big  Thanks in advance for your answer.
Roger

11) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 202.137.--.--
A) Ignore that for the moment :).

B)  Well, open pop_data.js, find the entire 'page.elmPos' function, and paste it into pop_events_commented.js somewhere after the first mention of the "page" variable. Rename pop_events_commented to pop_events.js and overwrite the existing pop_events.js.

Goodl uck - Angus.

12) rkr Group: Guests
IP: 85.218.--.--
Thanks for your answer.
I did even understand what you mean with A). -;)

Unfortunately  adding elmPos in pop_events doesn't work.
(GetFirebug says: getRef undefined)

elmPos is needed to position Menu in table cells.
If you've got a way to make elmPos work in this context, please tell me.
'Cascading Popup Menus' is a really a powerfull menu working with frames!
Making function elmPos work with frames would be really great.

+Best Greetings.
Roger

13) rkr Group: Guests
IP: 85.218.--.--
After some try - this message to communicate that it can work.
a link to pop_core.js had to be added too in the pages that loads in the frameset (named 'top_fr') -- where  Menu is positioned with elmPos.
It adds some Kb when those frames a beeing loaded - but it works ;-).
Many thanks again for your help.
Roger

14) rkr Group: Guests
IP: 85.218.--.--
This menu is simply great !!

15) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 203.109.--.--
Glad that you have got it to work!

- Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.