473,769 Members | 5,449 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2000
On Jul 27, 2:54 am, windandwaves <nfranc...@gmai l.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...@gmai l.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...@gmai l.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...@gmai l.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...@gmai l.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...@gmai l.comwrote:
On Jul 28, 4:38 pm, David Mark <dmark.cins...@ gmail.comwrote:
On Jul 27, 11:29 pm, windandwaves <nfranc...@gmai l.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...@litote s.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
5160
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 where FFFs are the fancy first char FFFFF fdafdfdsf fd afd fda fd fadf ds FFF fdfd fasd fd fads fdasf dsaf FFFFFFFFF fdafdfdsfdf fdsa fdsf adsf df a fdsaf df adsf df ad fdas fdsf
2
3895
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 http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it is a server problem but was told it is not possible, therefore assuming it is a client script problem? the script works last time...
1
1193
by: Jacky Luk | last post by:
How can I put fancy seperators between menu items in VC++.NET? Thanks Jack
0
1658
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 base it to support my fancy UI. But it will spend me a lot of time to modify TUI because I'm not familiar with "ATL" or MFC. After surfing MSDN online, I found Visual C# in VS2005 may be a good choice to design a fancy UI because it can create a...
1
6956
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 something. If you generate the code obviously it'll look screwy since it doesn't have the CSS but the problem is i can't get the menu to collapse or expand. Do I need an onClick statement or something?Here it is. Help! <html> <head>...
6
2857
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 Popup fancy window like thickbox and Upload Page as well at behind the fancy screen untill unless the file uploading complete. here is the url Link where i install Uber Uploader latest version script. If some one guide me that how can i do that...
0
9590
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.