473,383 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

fancy menu

Hi Guys

I need a bit of help with a fancy menu...

http://www.sunnysideup.co.nz/j/menu

I have two questions

1. it does not seem to work on Safari on a mac - what should I do?

2. right now, it can only open one menu item at the same time.... if
you move your mouse quickly to the next menu item, it does not open
it. I wrote this purposely like this so that the "old" menu would not
stay half open while the new one opened. Basically, what I want to do
is to start a new instance of the function. I can change all
variables into arrays, but can I make the entire function set into an
"instance" instead, so that multiple instances can operate at the same
time?

Thank you

Nicolaas

Jul 27 '07 #1
8 1983
On Jul 27, 2:54 am, windandwaves <nfranc...@gmail.comwrote:
Hi Guys

I need a bit of help with a fancy menu...

http://www.sunnysideup.co.nz/j/menu

I have two questions

1. it does not seem to work on Safari on a mac - what should I do?
Debug it in Safari on a Mac. Oddly enough, it works in the Windows
Safari beta.
>
2. right now, it can only open one menu item at the same time.... if
you move your mouse quickly to the next menu item, it does not open
it. I wrote this purposely like this so that the "old" menu would not
You want to use clicks, not rollovers for this. What if the user
doesn't have a mouse? Also, you are hiding content without regard to
whether scripting is enabled. Turn scripting off and you will see
what I mean.
stay half open while the new one opened. Basically, what I want to do
If the "opener" function is called for one pane while another is
sizing, clear your timeout (should really be an interval), size the
interrupted pane to its maximum height and set the timeout for the new
pane.

Jul 27 '07 #2
On Jul 27, 7:34 pm, David Mark <dmark.cins...@gmail.comwrote:
On Jul 27, 2:54 am, windandwaves <nfranc...@gmail.comwrote:
Hi Guys
I need a bit of help with a fancy menu...
http://www.sunnysideup.co.nz/j/menu
I have two questions
1. it does not seem to work on Safari on a mac - what should I do?

Debug it in Safari on a Mac. Oddly enough, it works in the Windows
Safari beta.
yes, I noticed that too (about the PC beta version)! Question is -
how do you debug javascript on safari... no easy task! I found this:

http://blog.deconcept.com/2005/07/28...en-debug-menu/

Will have a go!
>

2. right now, it can only open one menu item at the same time.... if
you move your mouse quickly to the next menu item, it does not open
it. I wrote this purposely like this so that the "old" menu would not

You want to use clicks, not rollovers for this. What if the user
doesn't have a mouse? Also, you are hiding content without regard to
whether scripting is enabled. Turn scripting off and you will see
what I mean.

Two good points!
>
stay half open while the new one opened. Basically, what I want to do

If the "opener" function is called for one pane while another is
sizing, clear your timeout (should really be an interval)
what do you mean with that?
, size the
interrupted pane to its maximum height and set the timeout for the new
pane.
Great idea!

Thank you

Nicolaas

Jul 28 '07 #3
On Jul 27, 11:29 pm, windandwaves <nfranc...@gmail.comwrote:
[snip]
what do you mean with that?
I mean use setInterval, not setTimeout. It is an interval after all
and you won't have to keep setting the timeout.

Jul 28 '07 #4
On Jul 28, 4:38 pm, David Mark <dmark.cins...@gmail.comwrote:
On Jul 27, 11:29 pm, windandwaves <nfranc...@gmail.comwrote:
[snip]
what do you mean with that?

I mean use setInterval, not setTimeout. It is an interval after all
and you won't have to keep setting the timeout.
Here is the rework.... thanks for your help

http://www.sunnysideup.co.nz/j/menu/

Jul 29 '07 #5
On Jul 29, 7:00 am, windandwaves <nfranc...@gmail.comwrote:
[snip]
>
http://www.sunnysideup.co.nz/j/menu/
That's a lot better. But are those headings going to actual links? I
see some link to cnn.com, but I assume that was for testing. If they
are not going to link anywhere, you should not include href
attributes. In your onload event, you should add href attributes (eg
"#") to turn them into links.

Also, it would be smoother to hide all but the first one, rather than
hiding all of them and then showing the first. And realize that on a
page with images, you will likely get a flash of the contents while
the page is loading. The alternative is to hide the contents by
default and create the associated style block (or individual rule)
with script, but that will make your code more complex.

And the contents for header 1 say they are for header 2, which made it
look broken. I looked at the source and saw that it is just a typo.

Jul 29 '07 #6
On Jul 29, 7:00 am, windandwaves <nfranc...@gmail.comwrote:
On Jul 28, 4:38 pm, David Mark <dmark.cins...@gmail.comwrote:
On Jul 27, 11:29 pm, windandwaves <nfranc...@gmail.comwrote:
[snip]
what do you mean with that?
I mean use setInterval, not setTimeout. It is an interval after all
and you won't have to keep setting the timeout.

Here is the rework.... thanks for your help

http://www.sunnysideup.co.nz/j/menu/
I didn't notice the "please wait" alert when I first looked at it.
Hopefully that is just a placeholder for code that will handle the
"not done" situation more appropriately (as described earlier in the
thread.)

Jul 29 '07 #7
David Mark wrote:
On Jul 29, 12:28 pm, Richard Cornford wrote:
>David Mark wrote:
<snip>
>>I mean use setInterval, not setTimeout. It is an interval
after all and you won't have to keep setting the timeout.

That is not necessarily the right advice, or good advice. The
main problem with - setInterval - and - setTimeout - is that
neither will interrupt running javascript code (because javascript
is single threaded
<snip>
Yes. You want to set realistic intervals of course.
But is a realistic interval on a 266 MHz PDA processor the same as a
realistic interval on a 2.6 GHz desktop PC processor? Almost certainly
not.

<snip>
>execution of that code, but that is better than the chaos
that - setInterval - can introduce.

I've never seen or heard of the chaotic situation you describe
(locking up the browser.)
Hang around here for a couple of years and you will.
Is it your position that setInterval should
never be used?
No, my position is always that people should understand what they are
doing when they are making design/implementation decisions.
That would seem an extreme position.
It would be.
And correct me if I wrong, but to be safe for older browsers,
don't you have to use string arguments with setTimeout.
That is a bit of a leap. Where browser do not support function reference
arguments to - setTimeout - they also do not support function reference
arguments to - setInterval -, so it would have no baring on anything
previously discussed.

However, a compatibility trick (invented on this very group) exists, and
follows from the observation that when - setTimeout/setInterval - only
accept string arguments they type-convert whatever argument they get
into a string (the normal javascript-style thing to do) and so you can
reliably use function references in environments that only support
string arguments by providing the function object with a - toString -
method that outputs a string of code that will effectively call the
function in question by less-direct means. (Bearing in mind that the -
toString - method will be called along with the call to
setInterval/setTimeout, not at the point when the timeout/interval
expires).
That alone would put me off it as I use setInterval to call
object methods (from inside the objects.)
That seems to assume that the limitations of - setTimeout - in terms of
its handling of arguments would differ from the limitations of -
setInterval -. They don't.

Richard.

Jul 30 '07 #8
On Jul 29, 8:05 pm, "Richard Cornford" <Rich...@litotes.demon.co.uk>
wrote:
David Mark wrote:
On Jul 29, 12:28 pm, Richard Cornford wrote:
David Mark wrote:
<snip>
>I mean use setInterval, not setTimeout. It is an interval
after all and you won't have to keep setting the timeout.
That is not necessarily the right advice, or good advice. The
main problem with - setInterval - and - setTimeout - is that
neither will interrupt running javascript code (because javascript
is single threaded
<snip>
Yes. You want to set realistic intervals of course.

But is a realistic interval on a 266 MHz PDA processor the same as a
realistic interval on a 2.6 GHz desktop PC processor? Almost certainly
not.

<snip>
execution of that code, but that is better than the chaos
that - setInterval - can introduce.
I've never seen or heard of the chaotic situation you describe
(locking up the browser.)

Hang around here for a couple of years and you will.
Is it your position that setInterval should
never be used?

No, my position is always that people should understand what they are
doing when they are making design/implementation decisions.
That would seem an extreme position.

It would be.
And correct me if I wrong, but to be safe for older browsers,
don't you have to use string arguments with setTimeout.

That is a bit of a leap. Where browser do not support function reference
arguments to - setTimeout - they also do not support function reference
arguments to - setInterval -, so it would have no baring on anything
previously discussed.
I thought there were older browsers that supported function arguments
with setInteval, but not setTimeout. Perhaps I was mistaken.
>
However, a compatibility trick (invented on this very group) exists, and
follows from the observation that when - setTimeout/setInterval - only
accept string arguments they type-convert whatever argument they get
into a string (the normal javascript-style thing to do) and so you can
reliably use function references in environments that only support
string arguments by providing the function object with a - toString -
method that outputs a string of code that will effectively call the
function in question by less-direct means. (Bearing in mind that the -
toString - method will be called along with the call to
setInterval/setTimeout, not at the point when the timeout/interval
expires).
That alone would put me off it as I use setInterval to call
object methods (from inside the objects.)

That seems to assume that the limitations of - setTimeout - in terms of
Yes it does. That was why I asked about the respective argument
requirements of older browsers.

Jul 30 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mel | last post by:
i want to have a block, like some articles i see, with the first char (very Fancy and huge) and have the rest of the block kind of wrap around this char (to the right of). something like below...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
1
by: Jacky Luk | last post by:
How can I put fancy seperators between menu items in VC++.NET? Thanks Jack
0
by: comboytw | last post by:
Hi all, I'm developing a VOIP application in wince 5.0 which supports rich features like video conferencing, media player, FM radio, etc. I found there is a VOIP template called "TUI" and I may...
1
by: priscbean | last post by:
I'm a total newbie. I really need help with this script. Its a drop down menu formatted with a CSS. It's not a formatting issue but i can't get the JS to run. I think I'm having issues calling it or...
6
by: neovantage | last post by:
Hey all, i have installed Uber uploader on my server. and it is working perfectly. It shows progress bar after submitting form. I want that when i upload an image or a file it shows the progress in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.