- Create Account

Supernotes and frames

Forums > "Miscellaneous" Scripts > Supernotes and frames
Author
Message

1) zantac Group: Members
Posts: 3 Joined: 28 Jul 2006 Location: Sweden IP: 82.182.--.--
I configured Supernotes and implemented it on a site. It wasn't until I was almost finished I discovered a problem when using it on a page with frames.

When I have a link that is located too far to the right in the page, the popup shows partly outside the frame. What I would want to do it to make Supernotes pop up to the LEFT of the mouse pointer at a give picture. Is this possible? If not, do you have any other suggestions of making a solution to this problem?

The problem can be demonstrated at the following link:

http://hem.passagen.se/anhe0098/musiksektionen

Press INFO and then press "Styrelsen". When moving the pointer over the pictures to the right you can see my problem.

I'll be grateful for answers, and yes, I'll make sure to make a donation if it's going to be used :)..

Andreas  Hedlund

2) zantac Group: Members
Posts: 3 Joined: 28 Jul 2006 Location: Sweden IP: 82.182.--.--
One more thing: In the HTML document containing the supernote script, there's a section I don't understand:

// Available config options are:
//allowNesting: true/false // Whether to allow triggers within triggers.
//cssProp: 'visibility' // CSS  property used to show/hide notes and values.
//cssVis: 'inherit'
//cssHid:  'hidden'
//IESelectBoxFix: true/false // Enables the IFRAME select-box-covering fix.
//showDelay: 0 // Millisecond delays.
//hideDelay: 500
//animInSpeed: 0.1 // Animation speeds, from 0.0 to 1.0; 1.0 disables.
//animOutSpeed: .1


How do I input these? Just removing the // doesn't help.

3) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 192.188.--.--
Aha, I knew there was a feature I forgot to implement before uploading ;).

Yes,  this is a pretty simple omission on my part. Luckily it's easily fixed. You are using "mouseoffset" type notes in your page, so open up supernote_commented.js and scroll down until you find the "Handlers" section where "SuperNote.prototype.pTypes.mouseoffset" is defined.

You'll see it sets the left/top position of the notes there. All you need to do is put in a check there for the browser window size. I recommend you download my "Modular Layer API" script and copy the "page" object out of that. You can get the right window border by calling "page.scrollX() + page.winW()" and then compare mouseX to that result -- if it is too close, set the note to a smaller left position. Repeat for the mouseY/top line and you're sorted!

Good luck - Angus.

4) zantac Group: Members
Posts: 3 Joined: 28 Jul 2006 Location: Sweden IP: 82.182.--.--
Hello again,

I'm sorry, I'm not familiar with Javascript programming at all. I found the sections you talked about but I can't understand what you mean with the comparition. Couldn't you paste it into a supernote_commented.js and send it to my e-mail or something? Then it's just to replace the supernote.js with your supernote_commented.js, isn't it? My e-mail is mixolydisk_cp_skala@hotmail.com.

Also, regarding my second post, how to use the animspeed-parameter inside the HTML-document, I still haven't figured out how to manage this. Could you give an example?

Sorry for all the trouble.

Regards,
Andreas

5) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 192.188.--.--
Sorry, I forgot your other question!

To use a config option, pass it as the second parameter to SuperNote like so:

var supernote = new SuperNote('supernote', { animInSpeed: 0.2, animOutSpeed: 0.3 } );

Have  name:value pairs separated by commas inside curly braces, shoudl be easy!

As for the browser window restriction -- might have to wait until I release an updated version of the script...

Good luck - Angus.

6) Jonathan Group: Guests
IP: 65.98.--.--
I am not sure if the issue I am having is related to this... I implemented supernotes and it works perfectly in all browsers but IE where the note window appears much farther up on the page, off the viewable section. The effect is that it does not appear to work unless you scroll up.

Is this the same issue or unrelated? I am using an inline frame at the top of my page.

7) Jonathan Group: Guests
IP: 65.98.--.--
Update:

It is not due to frames... at least I don't think so... the popups work fine so long as they are in the top portion of the page. It is only when you scroll down on the page the error occurs. It seems to place the window relative to the top of the page rather than relative to where you are on the page.

Sorry if that is confusing. Example: Page is ten paragraphs long... notes in the first two, near the top of the page work fine. Notes in the ninth and tenth paragraphs, which you have to scroll down to see, still appear in the top two. Since they are not visible you have to scroll up to see that they even appeared. horizontally they seem to be properly placed however.

8) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 144.131.--.--
I've just confirmed this in the example script with MSIE6 in non-strict documents. To fix this for now, ensure that you have a DOCTYPE at the top of your page like in the example (which works fine in MSIE). I'll patch this in the next release.

Thanks - 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.