home *** CD-ROM | disk | FTP | other *** search
/ .net - The Best of 1999/2000 / netCD Special01.iso / pc / Software / Dreamweaver / dreamw.exe / data1.cab / App_Files / Configuration / Objects / Common / Applet.js < prev    next >
Encoding:
JavaScript  |  1999-12-09  |  752 b   |  19 lines

  1. // Copyright 1999 Macromedia, Inc. All rights reserved.
  2.  
  3. function objectTag() {  // Return the html tag that should be inserted
  4.   var breakpoint, classname, newpath, retStr, path;
  5.   var bDialogState = dw.getShowDialogsOnInsert(); // Was dialog shown?
  6.   
  7.   path = dw.doURLEncoding(browseForFileURL());
  8.  
  9.   if ((path == '')  && bDialogState) {  return ''; }
  10.  
  11.   breakpoint = path.lastIndexOf("/");
  12.   if (breakpoint > 0) {
  13.     newpath = path.substring(0,breakpoint);
  14.     classname = path.substring(breakpoint + 1,path.length);
  15.     retStr = '<applet code="' + classname + '" codebase = "' + newpath + '" width="32" height="32"></applet>';
  16.   } else retStr = '<applet code="' + path + '" width="32" height="32"></applet>';
  17.   return retStr;
  18. }
  19.