Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:31
Calling Javascript
Poster: Hingo
Dated: Wednesday July 17 2002 - 20:44:41 BST
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
Further info...
Poster: Hingo
Dated: Thursday July 18 2002 - 9:12:43 BST
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>
Poster: Andy
Dated: Thursday July 18 2002 - 9:20:24 BST
You can add your own status line: here's a sample
Code:
,"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
Works ok..
Poster: Hingo
Dated: Thursday July 18 2002 - 11:02:35 BST
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
Further investigation......
Poster: Hingo
Dated: Saturday July 20 2002 - 10:13:54 BST
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?