Calling Javascript

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
Hingo
Beginner
Beginner
Posts: 7
Joined: Wed Jul 17, 2002 6:03 pm

Calling Javascript

Post by Hingo »

Hi,

I know there are a couple of posts on this forum related to this subject, however, I am still unable to get this to work.

Please can somebody tell me which section to use and the syntax of the call.

Many Thanks

Regards

Andy
Hingo
Beginner
Beginner
Posts: 7
Joined: Wed Jul 17, 2002 6:03 pm

Further info...

Post by Hingo »

Below is the source of a page that calls the Javascript in bold and works fine. If I use the same following syntax in my menu structure:

,"Find","javascript:Twa_uwin_function(\"Search\")",,,0

Then I get the error "No function for upper window mode 'search' defined!

However, when hovering over both links the same syntax is diaplayed in the prompt bar.

Any ideas what I am doing wrong?

Andy

<HTML><HEAD><TITLE>TWA - Form for class MASTERDATA</TITLE>
<LINK REL=STYLESHEET TYPE='text/css' HREF='/html/dev_style.css'>
<SCRIPT LANGUAGE=JavaScript1.1 SRC='/js/twalib.js'></SCRIPT>
<SCRIPT LANGUAGE=JavaScript1.1 SRC='/js/custom.js'></SCRIPT>
<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var Twa_html_lang = 'C'
var Twa_val_db_elid = 'ELID'
var Twa_val_db_class_name = 'CLASS_NAME'
var Twa_val_db_comment_dms = 'COMMENT_DMS'
var Twa_v_reload_element_for_display = 1
var Twa_val_msg_no_element_in_display = 'No element in display!'
// -->
</SCRIPT>
</HEAD>
<BODY class='upper'>
<body bgcolor=white>

<SCRIPT language=JavaScript>
</SCRIPT>

<SCRIPT language=JavaScript src="/js/upper_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/js/mmenu.js" type=text/javascript></SCRIPT>

</body>


<TR>
<TD class='topics'>
<A class='topics' HREF=javascript:Twa_uwin_function("SEARCH")>
<IMG SRC="/image/show.gif" HSPACE=10 BORDER=0 ALT="Search Part Database" HEIGHT=34 WIDTH=34>Search Part Database</A>
</TD>
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

You can add your own status line: here's a sample

Code: Select all

,"Find","javascript:Twa_uwin_function(\"Search\")",,"Status Line",0 
This actually sounds like a problem with your function, are you sure it works properly.

Cheers
Andy
Hingo
Beginner
Beginner
Posts: 7
Joined: Wed Jul 17, 2002 6:03 pm

Works ok..

Post by Hingo »

Well..if I insert the code in the header frame as standard HTML (same as menu) then it calls the script correctly, so I am not sure why it fails in the menu.

Incedently, is there a page that describes all of the parameters and thier locations?

Many thanks for your assistance.

Kind Regards

Andy
Hingo
Beginner
Beginner
Posts: 7
Joined: Wed Jul 17, 2002 6:03 pm

Further investigation......

Post by Hingo »

I have inserted a menu in my body frame and am able to call the Javascript correctly from here, but when I attempt to call from the sub-menu which opens in the body frame then I still get the error.

Is there a target parameter? If so, do you think that this solve my problem?
Post Reply