Chris Seymour
|
| Posted: 04/08/2002, 11:44 AM |
|
Does anyone know if it is possible to have a menu in CodeCharge like this "javascript:BookMarkMe();" instead of a page reference?
Thanks.
|
|
|
 |
Chris Seymour
|
| Posted: 04/08/2002, 12:57 PM |
|
This is what I found as a work-around (using ASP and templates). Created a menu field then left the page blank. Entered javascript:myfunc() in the default value. In header.asp modified the line field7 = .asp?javascript:myfunc() to read field7 = javascript:myfunc() and it worked.
Downside is if you have to re-gen the you would need to re-edit.
Thanks.
|
|
|
 |
George L.
|
| Posted: 04/09/2002, 9:23 PM |
|
Hey why don't you try this? I may serve your needs.
============================================================
Script: Bookmark This Page Script
Functions:
In IE browsers, the script automatically opens the dialog
to add your bookmark to the visitor's favorites. In other
browsers, the message in the txt variable is shown.
Update 07-03-01: see tech note at end to use an image
instead of text for the link.
Browsers: IE 4.0 and later (degrades gracefully in others)
Author: etLux
============================================================
Put the following script in the body of your page. Set the
font with tags around the script as shown.
<font color="#000000" size="2" face="Arial">
<script>
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header
// message to show in non-IE browsers
var txt = "Bookmark Us!"
// url you wish to have bookmarked
var url = "http://www.codelifter.com";
// caption to appear with bookmark
var who = "CodeLifter.com Software and Scripts"
// do not edit below this line
// ===========================
var ver = navigator.appName
var num = parseInt(navigator.appVersion)
if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
document.write('<A HREF="javascript:window.external.AddFavorite(url,who);" ');
document.write('onMouseOver=" window.status=')
document.write("txt; return true ")
document.write('"onMouseOut=" window.status=')
document.write("' '; return true ")
document.write('">'+ txt + '</a>')
}else{
txt += " (Ctrl+D)"
document.write(txt)
}
</script>
</font>
============================================================
Addendum: Using an Image instead of Text for the Link.
You can use an image instead of the text for this link by
using the following in the txt variable:
var txt = "<img src='some.gif' width='100' height='30' border='0'>"
Use an image name (and full http:// path if needed) as shown
above. Take special care to use single quotes where shown!
============================================================
I can't take credit for it. Gotta give props. http://www.codelifter.com/main/javascript/bookmarkthispage1.html
Great website for getting JavaScript Samples.
|
|
|
 |
|