PDA

View Full Version : Error: `tabdropdown' is undefined



MalcolmWalker
04-16-2007, 11:45 PM
1) Script Title: Drop Down Tab Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm

3) Describe problem: In FrontPage 2003 when previewing my file containing the Drop Down Tab menu an error message appears:

A Runtime Error has occurred.
Do you wish to debug?
Line: 84
Error: `tabdropdown' is undefined

The line referred to reads:
tabdropdown.initializetabmenu("shademenu")

I assume that I have to make a change to the script somewhere to correct the error. But as to where and how I do not know. Perhaps someone would assist me - I will be most grateful for guidance.

Or is it a FrontPage issue?

Malcolm Walker

jscheuer1
04-17-2007, 05:26 AM
Most likely a FrontPage Issue. You should never preview scripts in the editor, use a browser. Also, FP has a habit of mangling scripts even when they are properly inserted into a page. Read this boilerplate:


Well, you might be able to configure FP so as to allow you to insert code like this without it mangling it so much. Read the manual or Google for help on that. Another alternative, and what I recommend in all cases like this, is to get your page looking like you want using FP but without any scripts. Save a copy of that somewhere to work on later if the need arises. Next open the page in notepad or simple text and add the scripts in according to the installation instructions, including any customization you've added. Never load this version of the page into FP ever again. To preview it locally, use the browser. To upload it, use FTP (preferred) or your host's online uploading tool.

Here is trick I ran across* that should stop FP from changing scripts but, since I do not use FP, I haven't tested it:

In a text editor open the page whose code you wish to preserve.

At the beginning of the section of code you wish to prevent FrontPage from modifying, add the following line of code:


<!--webbot bot="HTMLMarkup" startspan -->

At the end of the code section, add the following line of code:


<!--webbot bot="HTMLMarkup" endspan -->

Save the changes to the file. The next time the file is opened in FrontPage, FrontPage will not attempt to alter the code between the two HTMLMarkup tags. You still need to put the script into the page with a text editor.

*Posted in these forums by usace-lrc and perhaps others.

MalcolmWalker
04-17-2007, 06:16 AM
John - many thanks for your prompt response and for reminding me not to use Preview in FrontPage. The script displays in IE 7 but doesn't `dropdown'. In Firefox it displays and works AOK.

I'll check my work against the boilerplate you have helpfully included.

Edit: Nanny IE7 was blocking the dynamics!

Malcolm

codeexploiter
04-17-2007, 06:23 AM
It is better if you avoid FrontPage completely for your web page editing purpose. The programmers used to drag & drop things that are not cross-browser compatible.

It is very difficult to find a perfect WYSIWYG web editor unlike many of them claim. The preview feature of most of the editors are not as they supposed mostly different browsers will display the content differently if you simply trust the preview feature of any WYSIWYG web editor.

You can use a WYSIWYG editor as they save lot of time by providing intellisense in most of the tags. But it is better if you preview your page manually using your browsers at least two (IE and Firefox).