SetTimeOut in Java Script

I write some script in window.onUnload Before...
i shoud check whether the window is actually closed or refreshed...
for that i should use setTimeOut to check after some time whether the user stays in the page or has closed the page...
if i detect that the user has closed the page then i will call the logout function
Can anybody tell me how will i use the SetTimeOut to detect this... the syntax or the way i can check whether the browser is closed or the page is refreshed....
thanks

The onbeforeunload event doesn't distinguish between a refresh, a navigation or a close.
What do you want to do after all? Invalidate the session if the user has finished using your application? Why not just let the session timeout and thus invalidate itself? In a normal webapplication you store the logged in user in the session and let your application intercept on that. If the session is invalidated, then the logged in user will also disappear.

Similar Messages

  • In which part of the page i can write java script

    Hi
    I'm new with ADF and web development
    I have a java script function that show a tooltip.
    This is the function:
    *function positionTip(evt) {*
    *     if (!tipFollowMouse) {*
    *          standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body*
    *          mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;*
    *          mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;*
    *     // tooltip width and height*
    *     var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;*
    *     var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;*
    *     // document area in view (subtract scrollbar width for ns)*
    *     var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;*
    *     var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;*
    *     // check mouse position against tip and window dimensions*
    *     // and position the tooltip*
    *     if ((mouseX+offX+tpWd)>winWd)*
    *          tipcss.left = mouseX-(tpWd+offX)+"px";*
    *     else tipcss.left = mouseX+offX+"px";*
    *     if ((mouseY+offY+tpHt)>winHt)*
    *          tipcss.top = winHt-(tpHt+offY)+"px";*
    *     else tipcss.top = mouseY+offY+"px";*
    *     if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);*
    My ADF page source code is
    *<?xml version = '1.0' encoding = 'windows-1252'?>*
    *<page xmlns="http://xmlns.oracle.com/uix/controller"*
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
    xmlns:myTemplate="selfservice">
    *<templates xmlns="http://xmlns.oracle.com/uix/ui">*
    *<templateImport source="mainTemplate.uit"/>*
    *</templates>*
    *<content>*
    *<dataScope xmlns="http://xmlns.oracle.com/uix/ui">*
    *<provider>*
    *<!-- Add DataProviders (<data> elements) here -->*
    *</provider>*
    *<contents>*
    *<document>*
    *<metaContainer>*
    *<!-- Set the page title -->*
    *<head title="General Manager"/>*
    *</metaContainer>*
    *<contents>*
    *<body>*
    *<contents>*
    *<form name="form0">*
    *<contents>*
    *<myTemplate:SelfService title="General Manager">*
    *<contents/>*
    *<tabs/>*
    *<pageButtons/>*
    *<globalButtons/>*
    *<pageHeader/>*
    *<start/>*
    *<end/>*
    *<about/>*
    *<copyright/>*
    *<privacy/>*
    *<corporateBranding/>*
    *<productBranding/>*
    *</myTemplate:SelfService>*
    *<formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>*
    *<table model="${bindings.HrsVEmpPhonesView1}" id="HrsVEmpPhonesView13" partialRenderMode="multiple" partialTargets="_uixState" showAll="yes" width="900">*
    *<contents>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'EmpNameAr')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.EmpNameAr}" columns="10" readOnly="true" onMouseOver="&quot;showTooltip(event,'This is a tooltip with a transparent shadow effect. Can you see the letters underneath the shadow?');return false&quot;"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'JobDescr')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.JobDescr}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'PhoneExt')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.PhoneExt}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'CntCellPhone')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.CntCellPhone}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'CntHomePhone')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.CntHomePhone}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'IaigcEmail')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model= "${uix.current.IaigcEmail}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *</contents>*
    *<tableSelection/>*
    *</table>*
    *</contents>*
    *</form>*
    *</contents>*
    *</body>*
    *</contents>*
    *</document>*
    *</contents>*
    *</dataScope>*
    *</content>*
    *<handlers>*
    *<!-- Add EventHandlers (<event> elements) here -->*
    *<event name="goto sort" source="HrsVEmpPhonesView13">*
    *<invoke method="handleTableUiEvent" javaType="oracle.cabo.adf.rt.AdfUtils">*
    *<parameters>*
    *<parameter javaType="oracle.adf.model.binding.DCIteratorBinding" value="${bindings.HrsVEmpPhonesView1Iterator}"/>*
    *<parameter javaType="oracle.cabo.servlet.expl.ControllerImplicitObject" value="${uix}"/>*
    *</parameters>*
    *</invoke>*
    *</event>*
    *<event name="select" source="HrsVEmpPhonesView13">*
    *<set target="${bindings.HrsVEmpPhonesView1Iterator}" property="currentRowIndexInRange" value="${ui:tableSelectedIndex(uix, 'HrsVEmpPhonesView13')}"/>*
    *</event>*
    *</handlers>*
    *</page>*
    I want to add this function to my page
    In which part exactly i can write this function
    thanks in advance

    To add to this, if you prefer you can separate your JavaScript from your JSF pages.
    Add a folder (I named mine 'js') to your application's ViewController project's public_html folder.
    Via JDeveloper, create a new JavaScript file inside your newly created folder and place your JavaScript functions inside it.
    You can then 'load' the .js file using the method Shantala described, with the addition of an added 'source' property to the af:reference tag.
    (This can also be a URI reference to a JavaScript file hosted on a web server)
    <f:facet name="metaContainer">
      <af:resource source="/js/myJsFile.js" type="javascript"/>
    </f:facet>The benefits of this 'split' are cleaner JSF page source and also code-highlighting and formatting within the .js file making finding and fixing bugs in your JavaScript much easier.
    It appears however, that when using <af:resource> to load scripts, once the page has been submitted even once, the JavaScript is no longer available to the page. Which isn't very useful.
    A solution is to use <trh:script>.
    Add xmlns:trh="http://myfaces.apache.org/trinidad/html" to your <jsp:root> tag and install the library.
    then in place of the above code use:
    <f:facet name="metaContainer">
      <trh:script id="script1" source="/js/myJsFile.js"/>
    </f:facet>Now after a page submit the JavaScript still functions.
    Edited by: Matthew Carrigy on 12/08/2009 10:39

  • How to call the java method in java script function in a portal application

    Hi Friends,
    I am developing one application where i need to fetch the data from KM content and displaying it on the screen in regular interval. I wrote one method in JSPdynpage for fetching data from KM content now I need to call that java method in java script function.
    java method(IComponentRequest request)
    //Coode for fetching the KM content
    function()
    <b>//Need to call the java method</b>
    setTimeout(function, 5000);//setting the time interval for this function
    <<htmlb display code>>
    If anybody can help me in calling the java method in java script function that will be very helpful for me.
    Thanks in advance,
    Sandeep Bonam

    Hi,
    Pls see if the following links could help.
    http://www.rgagnon.com/javadetails/java-0170.html
    http://www-128.ibm.com/developerworks/library/wa-resc/?dwzone=web
    Regards

  • Error message in java script using IE6

    I get the following error message on a web page java script with Internet Explorer 6 "C:\WINNT\Desktop\Error Report.htm."
    The java script works fine with IE 5, but not with IE6. Any ideas why or how to fix?
    Thank you,
    Alicia

    There are three scripts, here they are:
    1. Scripts.js
    NS4 = (document.layers);
    IE4 = (document.all);
    ver4 = (NS4 || IE4);
    IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1);
    isMac = (navigator.appVersion.indexOf("Mac") != -1);
    isMenu = (NS4 || (IE4 && !isMac) || (IE5 && isMac));
    function popUp(){return};
    function popDown(){return};
    if (!ver4) event = null;
    if (isMenu) {
    menuVersion = 3;
    menuWidth = 120;
    childOverlap = 5;
    childOffset = 0;
    perCentOver = null;
    secondsVisible = .2;
    fntCol = "#ffffff";
    fntSiz = "11";
    fntBold = false;
    fntItal = false;
    fntFam = "times new roman, times, serif";
    backCol = "#303886";
    overCol = "#91B3EE";
    overFnt = "#000000";
    borWid = 0;
    borCol = "#ffffff";
    borSty = "solid";
    itemPad = 5;
    imgSrc = "";
    imgSiz = 0;
    separator = 1;
    separatorCol = "#ffffff";
    isFrames = false; // <-- IMPORTANT for full window
    navFrLoc = "left"; // <-- display. see below
    keepHilite = true;
    clickStart = false;
    clickKill = false;
    function swapimg( imgid, newimg ) {
    imgid.src = newimg.src;
    if( document.images ) {
    about_on = new Image();
    about_on.src = "./images/about_on.jpg";
    about_off = new Image();
    about_off.src = "./images/about_off.jpg";
    practice_on = new Image();
    practice_on.src = "./images/practice_on.jpg";
    practice_off = new Image();
    practice_off.src = "./images/practice_off.jpg";
    lawyer_on = new Image();
    lawyer_on.src = "./images/lawyer_on.jpg";
    lawyer_off = new Image();
    lawyer_off.src = "./images/lawyer_off.jpg";
    career_on = new Image();
    career_on.src = "./images/career_on.jpg";
    career_off = new Image();
    career_off.src = "./images/career_off.jpg";
    resources_on = new Image();
    resources_on.src = "./images/resources_on.jpg";
    resources_off = new Image();
    resources_off.src = "./images/resources_off.jpg";
    contact_on = new Image();
    contact_on.src = "./images/contact_on.jpg";
    contact_off = new Image();
    contact_off.src = "./images/contact_off.jpg";
    2. hierArrays.js
    arMenu1 = new Array(
    130,
    199,247,
    "Overview","./about/overview.html",0,
    "Pro Bono Activities","./about/probono.html",0
    arMenu2 = new Array(
    190,
    199,287,
    "Commercial Finance","./practice/finance.html",0,
    "Corporate and Securities","./practice/corporate.html",0,
    "Insolvency","./practice/bankruptcy.html",0,
    "Land Use, Local Government and Environmental Law","./practice/land.html",0,
    "Litigation","./practice/litigation.html",0,
    "Real Estate","./practice/realestate.html",0,
    "Tax and Estate Planning","./practice/tax.html",0
    arMenu3 = new Array(
    120,
    199,327,
    "Partners","./lawyers/partners/index.html",0,
    "Associates","./lawyers/associates/index.html",0,
    "Of Counsel","./lawyers/counsel/index.html",0,
    "By Practice Area","./lawyers/practice.html",0,
    "Full Listing","./lawyers/full.html",0
    arMenu4 = new Array(
    135,
    199,447,
    "Contact Information","./contact/info.html",0,
    "Driving Directions","./contact/directions.html",0
    arMenu5 = new Array(
    180,
    199,365,
    "Summer Associate Program","./career/sumassoc.html",0
    3. hierMenus.js
    /*hierMenus.js
    * by Peter Belesis. v3.10.2 000720
    * Copyright (c) 2000 internet.com Corp. All Rights Reserved.
    * Originally published and documented at http://www.dhtmlab.com/
    * You may use this code on a public Web site only if this entire
    * copyright notice appears unchanged and you publicly display
    * on the Web page a link to http://www.dhtmlab.com/.
    * Contact [email protected] for all other uses.
    loader = (isFrames) ? (NS4) ? parent : parent.document.body : window;
    loader.onload = startIt;
    if(NS4){
         origWidth = loader.innerWidth;
         origHeight = loader.innerHeight;
         loader.onresize = reDo;
    isLoaded = false;
    NSresized = false;
    if (!window.menuVersion) {
         clickKill = keepHilite = clickStart = false;
    if (!window.imgHspace) imgHspace=0;
    isWin = (navigator.appVersion.indexOf("Win") != -1)
    mSecsVis = secondsVisible*1000;
    isRight = (window.navFrLoc && navFrLoc == "right");
    fullImgSize = (imgSiz+(imgHspace*2));
    if(!IE5) {
         imgSuf = (isRight) ? ">" : " ALIGN=RIGHT>";
         imgStr = "<IMG SRC='" + imgSrc + "' WIDTH=" + imgSiz + " HEIGHT=" + imgSiz +" VSPACE=2 HSPACE="+ imgHspace +" BORDER=0"+ imgSuf;
         if(IE4) imgStr = "<SPAN STYLE='height:100%;width:"+ (fullImgSize-(isRight?3:0)) +";float:"+ (isRight?"left":"right") +";overflow:hidden'>"+ imgStr +"</SPAN>";
    areCreated = false;
    menuLoc = null;
    function initVars() {
         if(areCreated) {
              for(i=1; i<topCount; i++) {
                   cur = eval("elMenu"+i);
                   clearTimeout(cur.hideTimer);
                   cur.hideTimer=null;
              clearTimeout(allTimer);
         topCount = 1;
         areCreated = false;
         beingCreated = false;
         isOverMenu = false;
         currentMenu = null;
         allTimer = null;
    initVars();
    function NSunloaded(){
         isLoaded = false;
    function NSloaded(e){
         if (e.target.name == mainFrName) {
              initVars();
              startIt();
    function IEunloaded() {
         initVars();
         isLoaded = false;
         setTimeout("keepTrack()",50)
    function keepTrack() {
         if (menuLoc.document.readyState == "complete") {
              initVars();
              startIt();
         else {
              setTimeout("keepTrack()",50);
    function startIt() {
         isLoaded = true;
         if (isFrames) {
              menuLoc = eval("parent.frames." + mainFrName);
              if (NS4) {
                   loader.captureEvents(Event.LOAD);
                   loader.onload = NSloaded;
                   menuLoc.onunload = NSunloaded;
              if (IE4) {
                   menuLoc.document.body.onunload = IEunloaded;
         else {
              menuLoc = window;
         menuLoc.nav = nav = window;
         if (clickKill) {
              if (NS4) menuLoc.document.captureEvents(Event.MOUSEDOWN);
              menuLoc.document.onmousedown = clicked;
         makeTop();
    function makeTop(){
         beingCreated = true;
         if(IE4) {
              topZ = 0;
              for (z=0;z<menuLoc.document.all.length;z++){
                   oldEl = menuLoc.document.all(z);
                   topZ = Math.max(oldEl.style.zIndex,topZ)
         while(eval("window.arMenu" + topCount)) {
              (NS4) ? makeMenuNS(false,topCount) : makeMenuIE(false,topCount);
              topCount++
         status = (topCount-1) + " Hierarchical Menu Trees Created"
         areCreated = true;
         beingCreated = false;
    // the following line was added by Rachel Gockley ([email protected]) on 27 July 2000
    status = "";
    function makeMenuNS(isChild,menuCount,parMenu,parItem) {
         tempArray = eval("arMenu" + menuCount);
         if (!isChild) {
              tempWidth = tempArray[0] ? tempArray[0] : menuWidth;
              menu = makeElement("elMenu" + menuCount,tempWidth,null,null);
         else {
              menu = makeElement("elMenu" + menuCount,null,parMenu,null);
         menu.array = tempArray;
         menu.setMenuTree = setMenuTree;
         menu.setMenuTree(isChild,parMenu);
         while (menu.itemCount < menu.maxItems) {
              menu.itemCount++;
              status = "Creating Hierarchical Menus: " + menuCount + " / " + menu.itemCount;
              prevItem = (menu.itemCount > 1) ? menu.item : null;
              itemName = "item" + menuCount + "_" + menu.itemCount;
              menu.item = makeElement(itemName,null,null,menu);
              menu.item.prevItem = prevItem;
              menu.item.setup = itemSetup;
              menu.item.setup(menu.itemCount,menu.array);
              if (menu.item.hasMore) {
                   makeMenuNS(true,menuCount + "_" + menu.itemCount,menu,menu.item);
                   menu = menu.parentMenu;
         menu.lastItem = menu.item;
         menu.setup(isChild,parMenu,parItem);
    function findTree(men){
         foundTree = false;
         for(i=11;i<men.array.length;i+=3){
              if(men.array) {
                   foundTree = true;
                   break;
         return foundTree;
    function setMenuTree(isChild,parMenu) {
         if (!isChild) {
              this.menuWidth = this.array[0] ? this.array[0] : menuWidth;
              this.menuLeft = this.array[1];
              this.menuTop = this.array[2];
              this.menuFontColor = this.array[3] ? this.array[3] : fntCol;
              this.menuFontOver = this.array[4] ? this.array[4] : overFnt;
              this.menuBGColor = this.array[5] ? this.array[5] : backCol;
              this.menuBGOver = this.array[6] ? this.array[6] : overCol;
              this.menuBorCol = this.array[7] ? this.array[7] : borCol;
              this.menuSeparatorCol = this.array[8] ? this.array[8] : separatorCol;
              this.treeParent = this;
              this.startChild = this;
              this.isTree = findTree(this);
         else {
              this.menuWidth = parMenu.menuWidth;
              this.menuLeft = parMenu.menuLeft;
              this.menuTop = parMenu.menuTop;
              this.menuFontColor = parMenu.menuFontColor;
              this.menuFontOver = parMenu.menuFontOver;
              this.menuBGColor = parMenu.menuBGColor;
              this.menuBGOver = parMenu.menuBGOver;
              this.menuBorCol = parMenu.menuBorCol;
              this.menuSeparatorCol = parMenu.menuSeparatorCol;
              this.treeParent = parMenu.treeParent;
              this.isTree = parMenu.isTree;
         this.maxItems = (isChild) ? this.array.length/3 : (this.array.length-9)/3;
         this.hasParent = isChild;
         this.setup = menuSetup;
         this.itemCount = 0;
    function makeMenuIE(isChild,menuCount,parMenu) {
         menu = makeElement("elMenu" + menuCount);
         menu.array = eval("arMenu" + menuCount);
         menu.setMenuTree = setMenuTree;
         menu.setMenuTree(isChild,parMenu);
         menu.itemStr = "";
         while (menu.itemCount < menu.maxItems) {
              menu.itemCount++;
              status = "Creating Hierarchical Menus: " + menuCount + " / " + menu.itemCount;
              itemName = "item" + menuCount + "_" + menu.itemCount;
              arrayPointer = (isChild) ? (menu.itemCount-1)*3 :((menu.itemCount-1)*3)+9;
              dispText = menu.array[arrayPointer];
              hasMore = menu.array[arrayPointer + 2];
              if(IE5) {
                   newSpan = menuLoc.document.createElement("SPAN");
                   with(newSpan) {
                        id = itemName;
                        with(style) {
                             width = (menu.menuWidth-(borWid*2));
                             fontSize = fntSiz + "pt";
                             fontWeight = (fntBold) ? "bold" : "normal";
                             fontStyle = (fntItal) ? "italic" : "normal";
                             fontFamily = fntFam;
                             padding = itemPad;
                             borderBottomWidth = separator + "px";
                             borderBottomStyle = "solid";
                        innerHTML = dispText;
                   newBreak = menuLoc.document.createElement("BR");
                   menu.appendChild(newSpan);
                   menu.appendChild(newBreak);
                   if(hasMore) {
    //3.10.2 added next 2 statements:
                        if (isRight) newSpan.style.paddingLeft = itemPad+fullImgSize;
                        else newSpan.style.paddingRight = itemPad+fullImgSize;
                        newImage = menuLoc.document.createElement("IMAGE");
                        with(newImage){
                             src = imgSrc;
                             with(style) {
                                  position = "absolute";
                                  width = imgSiz;
                                  height = imgSiz;
                                  left = (isRight) ? itemPad : (newSpan.style.pixelWidth - itemPad - imgSiz);
                                  top = newSpan.offsetTop + itemPad + (isMac ? 0 : 2);
                        newSpan.appendChild(newImage);
              else {
                   htmStr = (hasMore) ? imgStr + dispText : dispText;
                   menu.itemStr += "<SPAN ID=" + itemName + " STYLE=\"width:" + (menu.menuWidth-(borWid*2)) + "\">" + htmStr + "</SPAN><BR>";
              if (hasMore) {
                   makeMenuIE(true,menuCount + "_" + menu.itemCount,menu);
                   menu = menu.parentMenu;
         if(!IE5) menu.innerHTML = menu.itemStr;
         itemColl = menu.children.tags("SPAN");
         for (i=0; i<itemColl.length; i++) {
              it = itemColl(i);
              it.setup = itemSetup;
              it.setup(i+1,menu.array);
         menu.lastItem = itemColl(itemColl.length-1);
         menu.setup(isChild,parMenu);
    function makeElement(whichEl,whichWidth,whichParent,whichContainer) {
         if (NS4) {
              if (whichWidth) {
                   elWidth = whichWidth;
              else {
                   elWidth = (whichContainer) ? whichContainer.menuWidth : whichParent.menuWidth;
                   if (whichContainer) elWidth = elWidth-(borWid*2)-(itemPad*2);
              if (!whichContainer) whichContainer = menuLoc;
              eval(whichEl + "= new Layer(elWidth,whichContainer)");
         else {
              if (IE5) {
                   newDiv = menuLoc.document.createElement("DIV");
                   newDiv.style.position = "absolute";
                   newDiv.id = whichEl;
                   menuLoc.document.body.appendChild(newDiv);
              else {
                   elStr = "<DIV ID=" + whichEl + " STYLE='position:absolute'></DIV>";
                   menuLoc.document.body.insertAdjacentHTML("BeforeEnd",elStr);
              if (isFrames) eval(whichEl + "= menuLoc." + whichEl);
         return eval(whichEl);
    function itemSetup(whichItem,whichArray) {
         this.onmouseover = itemOver;
         this.onmouseout = itemOut;
         this.container = (NS4) ? this.parentLayer : this.parentElement;
         arrayPointer = (this.container.hasParent) ? (whichItem-1)*3 : ((whichItem-1)*3)+9;
         this.dispText = whichArray[arrayPointer];
         this.linkText = whichArray[arrayPointer + 1];
         this.hasMore = whichArray[arrayPointer + 2];
         if (IE4 && this.hasMore) {
              this.child = eval("elMenu" + this.id.substr(4));
              this.child.parentMenu = this.container;
              this.child.parentItem = this;
         if (this.linkText) {
              if (NS4) {
                   this.captureEvents(Event.MOUSEUP)
                   this.onmouseup = linkIt;
              else {
                   this.onclick = linkIt;
                   this.style.cursor = "hand";
         if (NS4) {
              htmStr = this.dispText;
              if (fntBold) htmStr = htmStr.bold();
              if (fntItal) htmStr = htmStr.italics();
              htmStr = "<FONT FACE='" + fntFam + "' POINT-SIZE=" + fntSiz + ">" + htmStr+ "</FONT>";
              this.htmStrOver = htmStr.fontcolor(this.container.menuFontOver);
              this.htmStr = htmStr.fontcolor(this.container.menuFontColor);
              if(this.hasMore) {
                   this.document.write(imgStr);
                   this.document.close();
              this.visibility = "inherit";
              this.bgColor = this.container.menuBGColor;
              if (whichItem == 1) {
                   this.top = borWid + itemPad;
              else {
                   this.top = this.prevItem.top + this.prevItem.clip.height + separator;
              this.left = borWid + itemPad;
              this.clip.top = this.clip.left = -itemPad;
              this.clip.right = this.container.menuWidth-(borWid*2)-itemPad;
              maxTxtWidth = this.container.menuWidth-(borWid*2)-(itemPad*2);
              if (this.container.isTree) maxTxtWidth-=(fullImgSize);
              this.txtLyrOff = new Layer(maxTxtWidth,this);
              if (isRight && this.container.isTree) this.txtLyrOff.left = fullImgSize;
              this.txtLyrOff.document.write(this.htmStr);
              this.txtLyrOff.document.close();
              this.txtLyrOff.visibility = "inherit";
              this.clip.bottom = this.txtLyrOff.document.height+itemPad;
              this.txtLyrOn = new Layer(maxTxtWidth,this);
              if (isRight && this.container.isTree) this.txtLyrOn.left = fullImgSize;
              this.txtLyrOn.document.write(this.htmStrOver);
              this.txtLyrOn.document.close();
              this.txtLyrOn.visibility = "hide";
              this.dummyLyr = new Layer(100,this);
              this.dummyLyr.left = this.dummyLyr.top = -itemPad;
              this.dummyLyr.clip.width = this.clip.width;
              this.dummyLyr.clip.height = this.clip.height;
              this.dummyLyr.visibility = "inherit";
         else {
              with (this.style) {
                   if(!IE5) {
                        fontSize = fntSiz + "pt";
                        fontWeight = (fntBold) ? "bold" : "normal";
                        fontStyle = (fntItal) ? "italic" : "normal";
                        fontFamily = fntFam;
                        padding = itemPad;
                        borderBottomWidth = separator + "px";
                        borderBottomStyle = "solid";
    //3.10.2 modified next statement to one following
    //               if (this.container.isTree && (IE5 || (!IE5 && !this.hasMore))) {
                   if (this.container.isTree && !this.hasMore) {
                        if (isRight) paddingLeft = itemPad+fullImgSize;
                        else paddingRight = itemPad+fullImgSize;
                   color = this.container.menuFontColor;
                   borderBottomColor = this.container.menuSeparatorCol;
                   backgroundColor = this.container.menuBGColor;
    function menuSetup(hasParent,openCont,openItem) {
         this.onmouseover = menuOver;
         this.onmouseout = menuOut;
         this.showIt = showIt;
         this.keepInWindow = keepInWindow;
         this.hideTree = hideTree
         this.hideParents = hideParents;
         this.hideChildren = hideChildren;
         this.hideTop = hideTop;
         this.hasChildVisible = false;
         this.isOn = false;
         this.hideTimer = null;
         this.childOverlap = (perCentOver != null) ? ((perCentOver/100) * this.menuWidth) : childOverlap;
         this.currentItem = null;
         this.hideSelf = hideSelf;
         if (hasParent) {
              this.hasParent = true;
              this.parentMenu = openCont;
              if (NS4) {
                   this.parentItem = openItem;
                   this.parentItem.child = this;
         else {
              this.hasParent = false;
         if (NS4) {
              this.bgColor = this.menuBorCol;
              this.fullHeight = this.lastItem.top + this.lastItem.clip.bottom + borWid;
              this.clip.right = this.menuWidth;
              this.clip.bottom = this.fullHeight;
         else {
              with (this.style) {
                   width = this.menuWidth;
                   borderWidth = borWid;
                   borderColor = this.menuBorCol;
                   borderStyle = borSty;
                   zIndex = topZ;
    //3.10.2 added next statement
                   overflow = "hidden";
              this.lastItem.style.border="";
              this.fullHeight = this.offsetHeight;
              if(isMac)this.style.pixelHeight = this.fullHeight;
              this.fullHeight = this.scrollHeight;
              this.showIt(false);
              this.onselectstart = cancelSelect;
              this.moveTo = moveTo;
              this.moveTo(0,0);
    function popUp(menuName,e){
         if (NS4 && NSresized) startIt();
         if (!isLoaded) return;
         linkEl = (NS4) ? e.target : event.srcElement;
         if (clickStart) linkEl.onclick = popMenu;
         if (!beingCreated && !areCreated) startIt();
         linkEl.menuName = menuName;
         if (!clickStart) popMenu(e);
    function popMenu(e){
         if (!isLoaded || !areCreated) return true;
         eType = (NS4) ? e.type : event.type;
         if (clickStart && eType != "click") return true;
         hideAll();
         linkEl = (NS4) ? e.target : event.srcElement;
         currentMenu = eval(linkEl.menuName);
         currentMenu.hasParent = false;
         currentMenu.treeParent.startChild = currentMenu;
         if (IE4) menuLocBod = menuLoc.document.body;
         if (!isFrames) {
              xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? e.pageX : (event.clientX + menuLocBod.scrollLeft);
              yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? e.pageY : (event.clientY + menuLocBod.scrollTop);
         else {
              switch (navFrLoc) {
                   case "left":
                        xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? menuLoc.pageXOffset : menuLocBod.scrollLeft;
                        yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? (e.pageY-pageYOffset)+menuLoc.pageYOffset : event.clientY + menuLocBod.scrollTop;
                        break;
                   case "top":
                        xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? (e.pageX-pageXOffset)+menuLoc.pageXOffset : event.clientX + menuLocBod.scrollLeft;
                        yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? menuLoc.pageYOffset : menuLocBod.scrollTop;
                        break;
                   case "bottom":
                        xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? (e.pageX-pageXOffset)+menuLoc.pageXOffset : event.clientX + menuLocBod.scrollLeft;
                        yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? menuLoc.pageYOffset+menuLoc.innerHeight : menuLocBod.scrollTop + menuLocBod.clientHeight;
                        break;
                   case "right":
                        xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? menuLoc.pageXOffset+menuLoc.innerWidth : menuLocBod.scrollLeft+menuLocBod.clientWidth;
                        yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? (e.pageY-pageYOffset)+menuLoc.pageYOffset : event.clientY + menuLocBod.scrollTop;
                        break;
         currentMenu.moveTo(xPos,yPos);
         currentMenu.keepInWindow()
         currentMenu.isOn = true;
         currentMenu.showIt(true);
         return false;
    function menuOver(e) {
         this.isOn = true;
         isOverMenu = true;
         currentMenu = this;
         if (this.hideTimer) clearTimeout(this.hideTimer);
    function menuOut() {
         if (IE4) {
              theEvent = menuLoc.event;
              if (theEvent.srcElement.contains(theEvent.toElement)) return;
         this.isOn = false;
         isOverMenu = false;
         menuLoc.status = "";
         if (!clickKill) allTimer = setTimeout("currentMenu.hideTree()",10);
    function itemOver(){
         if (keepHilite) {
              if (this.container.currentItem && this.container.currentItem != this) {
                   if (NS4) {
                        this.container.currentItem.bgColor = this.container.menuBGColor;
                        this.container.currentItem.txtLyrOff.visibility = "inherit";
                        this.container.currentItem.txtLyrOn.visibility = "hide";
                   else {
                        with (this.container.currentItem.style) {
                             backgroundColor = this.container.menuBGColor;
                             color = this.container.menuFontColor;
         if (IE4) {
              theEvent = menuLoc.event;
              if (theEvent.srcElement.tagName == "IMG") return;
              this.style.backgroundColor = this.container.menuBGOver;
              this.style.color = this.container.menuFontOver;
         else {
              this.bgColor = this.container.menuBGOver;
              this.txtLyrOff.visibility = "hide";
              this.txtLyrOn.visibility = "inherit";
         menuLoc.status = this.linkText;
         this.container.currentItem = this;
         if (this.container.hasChildVisible) {
              this.container.hideChildren(this);
         if (this.hasMore) {
              horOffset = (isRight) ? (this.container.childOverlap - this.container.menuWidth) : (this.container.menuWidth - this.container.childOverlap);
              if (NS4) {
                   this.childX = this.container.left + horOffset;
                   this.childY = (this.pageY+this.clip.top) + childOffset;
              else {
                   this.childX = this.container.style.pixelLeft + horOffset;
                   this.childY = this.offsetTop + this.container.style.pixelTop + childOffset + borWid;
              this.child.moveTo(this.childX,this.childY);
              this.child.keepInWindow();
              this.container.hasChildVisible = true;
              this.container.visibleChild = this.child;
              this.child.showIt(true);
    function itemOut() {
         if (IE4) {
              theEvent = menuLoc.event;
              if (theEvent.srcElement.contains(theEvent.toElement)
         || (theEvent.fromElement.tagName=="IMG" && theEvent.toElement.contains(theEvent.fromElement)))
              return;
              if (!keepHilite) {
                   this.style.backgroundColor = this.container.menuBGColor;
                   this.style.color = this.container.menuFontColor;
         else {
              if (!keepHilite) {
                   this.bgColor = this.container.menuBGColor;
                   this.txtLyrOff.visibility = "inherit";
                   this.txtLyrOn.visibility = "hide";
              if (!isOverMenu && !clickKill) {
                   allTimer = setTimeout("currentMenu.hideTree()",10);
    function moveTo(xPos,yPos) {
         this.style.pixelLeft = xPos;
         this.style.pixelTop = yPos;
    function showIt(on) {
         if (NS4) {
              this.visibility = (on) ? "show" : "hide";
              if (keepHilite && this.currentItem) {
                   this.currentItem.bgColor = this.menuBGColor;
                   this.currentItem.txtLyrOff.visibility = "inherit";
                   this.currentItem.txtLyrOn.visibility = "hide";
         else {
              this.style.visibility = (on) ? "visible" : "hidden";
              if (keepHilite && this.currentItem) {
                   with (this.currentItem.style) {
                        backgroundColor = this.menuBGColor;
                        color = this.menuFontColor;
         this.currentItem = null;
    function keepInWindow() {
         scrBars = 20;
         botScrBar = (isFrames && navFrLoc=="bottom") ? (borWid*2) : scrBars;
         rtScrBar = (isFrames && navFrLoc=="right") ? (borWid*2) : scrBars;
         if (NS4) {
              winRight = (menuLoc.pageXOffset + menuLoc.innerWidth) - rtScrBar;
              rightPos = this.left + this.menuWidth;
              if (rightPos > winRight) {
                   if (this.hasParent) {
                        parentLeft = this.parentMenu.left;
                        newLeft = ((parentLeft-this.menuWidth) + this.childOverlap);
                        this.left = newLeft;
                   else {
                        dif = rightPos - winRight;
                        this.left -= dif;
              winBot = (menuLoc.pageYOffset + menuLoc.innerHeight) - botScrBar ;
              botPos = this.top + this.fullHeight;
              if (botPos > winBot) {
                   dif = botPos - winBot;
                   this.top -= dif;
              winLeft = menuLoc.pageXOffset;
              leftPos = this.left;
              if (leftPos < winLeft) {
                   if (this.hasParent) {
                        parentLeft = this.parentMenu.left;
                        newLeft = ((parentLeft+this.menuWidth) - this.childOverlap);
                        this.left = newLeft;
                   else {
                        this.left = 5;
         else {
              winRight = (menuLoc.document.body.scrollLeft + menuLoc.document.body.clientWidth) - rtScrBar;
              rightPos = this.style.pixelLeft + this.menuWidth;
              if (rightPos > winRight) {
                   if (this.hasParent) {
                        parentLeft = this.parentMenu.style.pixelLeft;
                        newLeft = ((parentLeft - this.menuWidth) + this.childOverlap);
                        this.style.pixelLeft = newLeft;
                   else {
                        dif = rightPos - winRight;
                        this.style.pixelLeft -= dif;
              winBot = (menuLoc.document.body.scrollTop + menuLoc.document.body.clientHeight) - botScrBar;
              botPos = this.style.pixelTop + this.fullHeight;
              if (botPos > winBot) {
                   dif = botPos - winBot;
                   this.style.pixelTop -= dif;
              winLeft = menuLoc.document.body.scrollLeft;
              leftPos = this.style.pixelLeft;
              if (leftPos < winLeft) {
                   if (this.hasParent) {
                        parentLeft = this.parentMenu.style.pixelLeft;
                        newLeft = ((parentLeft+this.menuWidth) - this.childOverlap);
                        this.style.pixelLeft = newLeft;
                   else {
                        this.style.pixelLeft = 5;
    function linkIt() {
         if (this.linkText.indexOf("javascript:")!=-1) eval(this.linkText)
         else menuLoc.location.href = this.linkText;
    function popDown(menuName){
         if (!isLoaded || !areCreated) return;
         whichEl = eval(menuName);
         whichEl.isOn = false;
         if (!clickKill) whichEl.hideTop();
    function hideAll() {
         for(i=1; i<topCount; i++) {
              temp = eval("elMenu" + i + ".startChild");
              temp.isOn = false;
              if (temp.hasChildVisible) temp.hideChildren();
              temp.showIt(false);
    function hideTree() {
         allTimer = null;
         if (isOverMenu) return;
         if (this.hasChildVisible) {
              this.hideChildren();
         this.hideParents();
    function hideTop() {
         whichTop = this;
         (clickKill) ? whichTop.hideSelf() : (this.hideTimer = setTimeout("if(whichTop.hideSelf)whichTop.hideSelf()",mSecsVis));
    function hideSelf() {
         this.hideTimer = null;
         if (!this.isOn && !isOverMenu) {
              this.showIt(false);
    function hideParents() {
         tempMenu = this;
         while (tempMenu.hasParent) {
              tempMenu.showIt(false);
              tempMenu.parentMenu.isOn = false;
              tempMenu = tempMenu.parentMenu;
         tempMenu.hideTop();
    function hideChildren(item) {
         tempMenu = this.visibleChild;
         while (tempMenu.hasChildVisible) {
              tempMenu.visibleChild.showIt(false);
              tempMenu.hasChildVisible = false;
              tempMenu = tempMenu.visibleChild;
         if (!this.isOn || !item.hasMore || this.visibleChild != this.child) {
              this.visibleChild.showIt(false);
              this.hasChildVisible = false;
    function cancelSelect(){return false}
    function reDo(){
         if (loader.innerWidth==origWidth && loader.innerHeight==origHeight) return;
         initVars();
         NSresized=true;
         menuLoc.location.reload();
    function clicked() {
         if (!isOverMenu && currentMenu!=null && !currentMenu.isOn) {
              whichEl = currentMenu;
              whichEl.hideTree();
    window.onerror = handleErr;
    function handleErr(){
         arAccessErrors = ["permission","access"];
         mess = arguments[0].toLowerCase();
         found = false;
         for (i=0;i<arAccessErrors.length;i++) {
              errStr = arAccessErrors[i];
              if (mess.indexOf(errStr)!=-1) found = true;
         return found;
    //end

  • Java script problem

    Hai all,
    i had a problem regarding java script,i had a time shedule page in which there is a start time and end time for each day,means monday,tuesday......
    the problem is when i select monday it shows '0000' in start up but when i de select means change to 'no it will not rest the value to '0000',how can i do this my code is PROBLEM WHEN ONCE SELECTED YES AFTER FIRDAY I WANT TO CHANGE THE TIME OR RESET THE TIME OF SUNDAY TO 'NO' THEN THE DEFAULT VALUE ie "0000" WILL NOT ENTER THE DATA BASE BUT THE ENTERED VALUE HOW WILL I CORRECT IT OR I HAD TO USE AJAX FOR REPOPULATE THE TEXT BOX WITH "0000".and how can i popup a calender insted of this.
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html:html lang="true">
    <head>
    <%String path=request.getContextPath();
    String basepath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;%>
    <title>BLUE LAW</title>
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
    <script type="text/javascript">
    function display(val, id1,id2)
         if(val=="Y")
         document.getElementById(id1).style.display="block";
         document.getElementById(id1).style.visibility="visible";
         document.getElementById(id2).style.display="block";
         document.getElementById(id2).style.visibility="visible";
         else
         document.getElementById(id1).style.display="none";
         document.getElementById(id1).style.visibility="hidden";
         document.getElementById(id2).style.display="none";
         document.getElementById(id2).style.visibility="hidden";
         function newWindow(url) {
         popupWindow = window.open(url,'popUpWindow','height=300,width=250,left=50,top=50,resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,directories=no,status=yes');
         var timeout = 500;
    var closetimer          = 0;
    var ddmenuitem = 0;
    // open hidden layer
    function mopen(id)
         // cancel close timer
         mcancelclosetime();
         // close old layer
         if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
         // get new layer and show it
         ddmenuitem = document.getElementById(id);
         ddmenuitem.style.visibility = 'visible';
    // close showed layer
    function mclose()
         if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
    // go close timer
    function mclosetime()
         closetimer = window.setTimeout(mclose, timeout);
    // cancel close timer
    function mcancelclosetime()
         if(closetimer)
              window.clearTimeout(closetimer);
              closetimer = null;
    // close layer when click-out
    document.onclick = mclose;
    </script>
         <style type="text/css">
    <!--
    body {
         background-color: #e1f2f8;
    .style1 {     font-family: Verdana, Arial, Helvetica, sans-serif;
         font-size: 12px;
    .style5 {color: #EEF0EC}
    -->
    </style>
    <link href="<%=basepath%>/style/style.css" rel="stylesheet" type="text/css">
         <link rel="stylesheet" type="text/css" href="<%=basepath%>/css/default.css">
    </head>
    <body topmargin="0">
    <html:errors/>
    <html:form method="get" action="addblue.do" onsubmit="return validateTYUY(this);">
    <input type="hidden" name="action" value="Add"/>
    <table width="891" border="1" align="center" cellpadding="4" cellspacing="0" >
    <tr >
    <th colspan="4" ><b><strong>Enter TIME Details</strong></b></th>
    </tr>
    <tr >
    <td width="421" class="Label" align="right"> Number</td>
    <td width="448" ><html:text styleClass="Textfield" property="ABCnumber" size="2" maxlength="2" ></html:text><br></td>
    </tr>
    <tr>
    <td> <table>
    <tr >
    <td class="Label" ></td>
    <td width="62" ></td>
    <td class="Label" ></td>
    <td width="68" ></td>
    </tr>
    <tr >
    <td class="Label" width="152"> Restrict on Sundays</td>
    <td style="background-color: rgb(255, 255, 255);"><html:select property="sundayrest" styleClass="Textfield" onchange="display(this.value, 'sunday','sunday1')" >
    <html:option value="">select</html:option>
    <html:option value="Y">YES</html:option>
    <html:option value="N">NO</html:option> </html:select></td>
    <td class="Label" ></td>
    <td ></td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="sunday" >
    <td width="140" class="Label" style="background-color: rgb(255, 255, 255);"> Sundays Start Time 1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="sundaystart1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td width="133" class="Label" style="background-color: rgb(255, 255, 255);">Sundays Start Time 1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="sundayend1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="sunday1" >
    <td width="140" class="Label" style="background-color: rgb(255, 255, 255);">Sundays Start Time 2</td>
    <td style="background-color: rgb(255, 255, 255);"> <html:text styleClass="Textfield" property="sundaystart2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td class="Label" style="background-color: rgb(255, 255, 255);">Sundays End Time 2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="sundayend2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    </table></td>
    <td> <table>
    <tr >
    <td width="160" class="Label" >Restrict on Mondays</td>
    <td width="59" style="background-color: rgb(255, 255, 255);"><html:select property="mondayrest" styleClass="Textfield" onchange="display(this.value, 'monday','monday1')">
    <html:option value="">select</html:option>
    <html:option value="Y">YES</html:option> <html:option value="N">NO</html:option>
    </html:select></td>
    <td class="Label" ></td>
    <td width="70" ></td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="monday">
    <td class="Label" style="background-color: rgb(255, 255, 255);">Monday End Time 1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="mondayend1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td width="148" class="Label" style="background-color: rgb(255, 255, 255);">Monday Start Time 1</td>
    <td style="background-color: rgb(255, 255, 255);"> <html:text styleClass="Textfield" property="mondaystart1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    <tr id="monday1" style="visibility: hidden;display:none;" >
    <td class="Label" style="background-color: rgb(255, 255, 255);">Monday End Time 2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="mondayend2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td class="Label" style="background-color: rgb(255, 255, 255);">Monday Start Time 2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="mondaystart2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td> <table>
    <tr>
    <td class="Label" width="152">Restrict on Tuesdays</td>
    <td width="62" style="background-color: rgb(255, 255, 255);"><html:select property="tuesdayrest" styleClass="Textfield" onchange="display(this.value, 'tue','tue1')">
    <html:option value="">select</html:option>
    <html:option value="Y">YES</html:option> <html:option value="N">NO</html:option>
    </html:select></td>
    <td class="Label" ></td>
    <td width="70" ></td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="tue">
    <td width="138" class="Label" style="background-color: rgb(255, 255, 255);">Tuesday Start Time1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="tuesdaystart1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td width="131" class="Label" style="background-color: rgb(255, 255, 255);">Tuesday End Time1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="tuesdayend1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="tue1">
    <td width="138" class="Label" style="background-color: rgb(255, 255, 255);">Tuesday Start Time 2</td>
    <td style="background-color: rgb(255, 255, 255);"> <html:text styleClass="Textfield" property="tuesdaystart2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td class="Label" style="background-color: rgb(255, 255, 255);">Tuesday End Time2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="tuesdayend2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    </table></td>
    <td> <table>
    <tr>
    <td width="160" class="Label" >Restrict On Wednesdays</td>
    <td width="58" style="background-color: rgb(255, 255, 255);"><html:select property="wednesdayrest" styleClass="Textfield" onchange="display(this.value, 'wed','wed1')">
    <html:option value="">select</html:option>
    <html:option value="Y">YES</html:option> <html:option value="N">NO</html:option>
    </html:select></td>
    <td class="Label" ></td>
    <td width="68" ></td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="wed">
    <td class="Label" style="background-color: rgb(255, 255, 255);">Wednesday End Time1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="wednesdayend1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td width="149" class="Label" style="background-color: rgb(255, 255, 255);"> Wednesday Start Time1</td>
    <td style="background-color: rgb(255, 255, 255);"> <html:text styleClass="Textfield" property="wednesdaystart1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="wed1">
    <td class="Label" style="background-color: rgb(255, 255, 255);">Wednesday End Time2:</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="wednesdayend2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td class="Label" style="background-color: rgb(255, 255, 255);">Wednesday Start Time2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="wednesdaystart2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><table>
    <tr >
    <td class="Label" width="150">Restrict On Thursdays</td>
    <td width="61" style="background-color: rgb(255, 255, 255);"><html:select property="thursdayrest" styleClass="Textfield" onchange="display(this.value, 'thu','thu1')">
    <html:option value="">select</html:option>
    <html:option value="Y">YES</html:option> <html:option value="N">NO</html:option>
    </html:select></td>
    <td ></td>
    <td ></td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="thu" >
    <td width="140" class="Label" style="background-color: rgb(255, 255, 255);">Thursday Start Time1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="thursdaystart1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td width="132" class="Label" style="background-color: rgb(255, 255, 255);">Thursday End Time1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="thursdayend1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="thu1">
    <td width="140" class="Label" style="background-color: rgb(255, 255, 255);">Thursday Start Time2</td>
    <td style="background-color: rgb(255, 255, 255);"> <html:text styleClass="Textfield" property="thursdaystart2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td class="Label" style="background-color: rgb(255, 255, 255);">Thursday End Time2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="thursdayend2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    </table></td>
    <td> <table>
    <tr >
    <td class="Label" width="170">Restrict On Fridays</td>
    <td width="57" style="background-color: rgb(255, 255, 255);"><html:select property="fridayrest" styleClass="Textfield" onchange="display(this.value, 'fri','fri1')">
    <html:option value="">select</html:option>
    <html:option value="Y">YES</html:option>
    <html:option value="N">NO</html:option> </html:select></td>
    <td width="150" class="Label" > </td>
    <td width="66" ></td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="fri">
    <td class="Label" style="background-color: rgb(255, 255, 255);">Friday End Time1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="fridayend1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td class="Label" style="background-color: rgb(255, 255, 255);">Friday Start Time1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="fridaystart1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="fri1" >
    <td width="153" class="Label" style="background-color: rgb(255, 255, 255);">Friday End Time2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="fridayend2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td width="150" class="Label" style="background-color: rgb(255, 255, 255);">Friday Start Time2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="fridaystart2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td> <table>
    <tr >
    <td width="162" class="Label" > Restrict On Saturdays</td>
    <td width="61" style="background-color: rgb(255, 255, 255);"><html:select property="saturdayrest" styleClass="Textfield" onchange="display(this.value, 'sat','sat1')">
    <html:option value="">select</html:option>
    <html:option value="Y">YES</html:option> <html:option value="N">NO</html:option>
    </html:select></td>
    <td width="132" class="Label" ></td>
    <td width="66" ></td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="sat">
    <td width="140" class="Label" style="background-color: rgb(255, 255, 255);"> Saturday Start Time 1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="saturdaystart1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td width="132" class="Label" style="background-color: rgb(255, 255, 255);">Saturday End Time1</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="saturdayend1" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    <tr style="visibility: hidden;display:none;" id="sat1">
    <td width="140" class="Label" style="background-color: rgb(255, 255, 255);"> Saturday Start Time2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="saturdaystart2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    <td width="132" class="Label" style="background-color: rgb(255, 255, 255);">Saturday End Time2</td>
    <td style="background-color: rgb(255, 255, 255);"><html:text styleClass="Textfield" property="saturdayend2" value="0000" size="5" maxlength="4"></html:text>(HHMM)</td>
    </tr>
    </table></td><td> </td>
    </tr>
    <tr>
    <td height="27" colspan="4" align="center"><html:submit value="Save"></html:submit>
    <html:reset value="Cancel" onclick="window.close();"></html:reset></td>
    </tr>
    </table>
    <html:javascript formName="ert"/>
    </html:form>
    </body>
    </html:html>

    [some javascript forum...|http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s]

  • Java script will not work after creating new page

    I am using dreamweaver cs3 and have a java script to rotate a banner in a template.  This script has worked fine in the past when I created pages in Dreamwever.  Now the  script works fine only when I test it in a template but when I try to upload to my ISP the script will no longer work.  At first I thought it was the ISP made changes but the person who sits next to me running the same version of Dreamweaver can create a page and the java works.  The java is placed in a template, tested by viewing in a brower and it works, however once I try to create a new page using the template the scriipt will not work.  To get around this I have the person sitting next to me save my template and then I can create pages.  Also if I save the template with my pc and it updates the pages created by the template the java will no longer work.
    This is very frustrating as I cannot create or modify my template on this pc.  What would prevent this from working?

    OK - now we are on to something ..... the script on the template only contains:
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]);
      setTimeout('randomImages()', delay);
    However when I create a new page from the template with this javascript in it the code changes to:
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]imgs[i]);
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]);
      setTimeout('randomImages()', delay);

  • How to load a java script in oracle database

    Is it possible to load d java script in Oracle database. while the object type is
    java resource ..

    RENUJP wrote:
    I meant to load a javascript to oracle database not to oracle appliocation.
    like loadjava....
    I can load a javascript to oracle database.. but i can't call it...Please re-read the comments above, especially the part about this not being a javascript nor oracle forum. Exactly what part about this information don't you understand?

  • Adobe Dreamweaver CS5.5 - Windows 7 - Java Script Problem

    I am having trouble with Anchor.htm.
    When I try to insert an anchor in the text (Insert > Named Anchor> I get this error message:
    "While executing insertObject in Anchor.htm a Java Script error occurred."
    I recently downloaded both the 32- and 64-bit Java Script applications when I received a message that the existing version of Java Script was out-of-date. Anchor.htm worked before I installed the update.
    The files I downloaded and installed are:
    jre-7u9-windows-i586.exe
    jre-7u9-windows-x64.exe
    Please can anyone help me with this problem?

    From Dreamweaver FAQ
    http://forums.adobe.com/thread/429114
    "If Dreamweaver is acting erratically, or if you see a message saying "the following JavaScript error(s) occurred",  it's usually a sign of a corrupt cache file. The first thing to try should always be to delete the file cache. If that doesn't work, delete your personal Configuration folder. Full instructions are in Deleting a corrupted cache file.
    http://forums.adobe.com/thread/494811"
    Nancy O.

  • Can we use Java Script in SAP BusinessObjects Web Intelligence 4.1?

    Can we use Java Script or any other Script in BI 4.1 Web Intelligence? If possible please do let me know the method/process

    Hi Kranthi,
    You have option to read a cell content as html. else you will have to go for SDK. I think you will get better suggestions, if you can explain your requirement in a little detailed manner.
    refer below links for more details about SDK.
    http://bukhantsov.org/2013/04/how-to-create-a-webi-document-using-java-report-engine-sdk/
    Regards,
    Nikhil Joy

  • In a Conversion file, Using Java Script - IF statement with Greater,Less definitions

    Hail to All Gurus,
    Well, I've been trying to make a conversion file by using if statement of Java script with < , > definitions. unfortunately i got "Evolution error" over and over again.
    Actually i want to convert all dates before 2009 as 2008.12. And the dates which is greater than 2009 will be converted as they are (e.g. 2009.01 or 2010.02 etc.).
    Code is:
    js:if(%external%.toString().substring(0,4)<"200900"){"2008.12"}else{%external%.toString().substring(0,4) + "." + %external%.toString().substring(4,6)}
    SAP EPM version 10.0 SP15 Patch 2
    Build 8586
    Thanks for your help in advance

    Sadi,
    You can write if Statement in transformation not conversion.
    Look at this docs,
    How to Import Master Data and Hierarchies into SAP BusinessObjects BPC 7.5 from SAP NetWeaver BW
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c02d0b47-3e54-2d10-0eb7-d722b633b72e?QuickLink=index&…
    Thanks

  • OBIEE variables in custom java script

    Hello all
    Can I use OBIEE variables like presentation and session variables in my custom java script code that I am writing in text view on a dashboard page. Is it possible to do that. please me soon if somebody knows the solution to do that.
    Thanks in Advance

    Hi john
    Thanks for reply, I am able to generate javascript using text view on a dashboard page.
    But I want to access OBIEE variables in javascript. How I can do that in narrative view. Can u explain me or give me any link.
    Thanks

  • I'm note a firefox geek, but ever since my friend told me to install NoScript I can not access my msn and hotmail page. It tells me that Java Script is required, what ever that is. What do I do next. Do I uninstall the No Script. Thanks Ed

    I'm note a firefox geek, but ever since my friend told me to install NoScript I can not access my msn and hotmail page. It tells me that Java Script is required, what ever that is. What do I do next. Do I uninstall the No Script. Thanks Ed edit
    Details

    You are on Windows 2000, you do not have a "Firefox" button, and should consider yourself to be fortunate in that you still have menus and don't have to do anything to get the menus back instead of the "Firefox" button. (The same applies to Windows XP users).
    Use the "File" menu to get to Import. You are not on Windows 7 or Vista, and don't have to put up with the nonsense added for Aero.
    If you want the "Firefox" button you can get it with View -> toolbars -> (uncheck) Menu Bar. The menu bar and the "Firefox" button were supposed to be mutually exclusive (which is impossible in some cases without being incompatible).
    Once you are using the "Firefox" button ...
    Use the "Alt" key to view the menu bar (temporarily) containing File, Edit, View, History, Bookmarks, Tools, and Help. On Windows 7 and Vista, the menu bar was hidden by default in Firefox 4 and above. These menu items are more or less available under the "Firefox" button which has the most used of the built-in Firefox menu items available in a different format.
    To get back to having menus again. "Firefox" button -> Options (second column) -> (check) Menu Bar
    You can make '''Firefox 7.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface

  • Dreamweaver 8: Java script in Design Mode

    Mac OS 10.4.11 Dreamweaver 8
    I have a web page with a java script that displays a random picture from a list of images each time you reload the page.
    http://www.irises.org
    It renders fine when viewed in a browser, but the image does not display when viewed in Dreamweaver Design mode. The random image does not display and lacking the image other things are out of place.
    The script that sets up the image array:
    <!-- Begin
    // Set up the image files to be used.
    var theImages = new Array() // do not change this
    // To add more image files, continue with the
    // pattern below, adding to the array.
    theImages[0] = 'images/home-rotate-1.jpg'
    theImages[1] = 'images/home-rotate-2.jpg'
    theImages[2] = 'images/home-rotate-3.jpg'
    theImages[3] = 'images/home-rotate-4.jpg'
    theImages[4] = 'images/home-rotate-5.jpg'
    theImages[5] = 'images/home-rotate-6.jpg'
    theImages[6] = 'images/home-rotate-7.jpg'
    theImages[7] = 'images/home-rotate-8.jpg'
    theImages[8] = 'images/home-rotate-9.jpg'
    theImages[9] = 'images/home-rotate-10.jpg'
    theImages[10] = 'images/home-rotate-11.jpg'
    theImages[11] = 'images/home-rotate-12.jpg'
    theImages[12] = 'images/home-rotate-13.jpg'
    theImages[13] = 'images/home-rotate-14.jpg'
    theImages[14] = 'images/home-rotate-15.jpg'
    theImages[15] = 'images/home-rotate-16.jpg'
    theImages[16] = 'images/home-rotate-17.jpg'
    // do not edit anything below this line
    var j = 0
    var p = theImages.length;
    var preBuffer = new Array()
    for (i = 0; i < p; i++){
       preBuffer[i] = new Image()
       preBuffer[i].src = theImages[i]
    var whichImage = Math.round(Math.random()*(p-1));
    function showImage(){
    document.write('<img src="'+theImages[whichImage]+'">');
    //  End -->
    The code (further down the page after the all the list elements) that generates the image:
               <SCRIPT LANGUAGE="JavaScript">
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!-- Begin
    showImage();
    //  End -->
    </script>
    Is there a way to get it to display correctly in the Design mode?
    Thanks
    <br />
    </script>

    Is there a way to get it to display correctly in the Design mode?
    I don't think so, at least not with this script.  What you need is for an image to be displayed on the page by default, and for the javascript to only change the src attribute's value.  Something like this -
    At the point where you want the image have -
    <img src="the_path_to_some_default_image.jpg" id="rotation" />
    and in the javascript, change this -
    document.write('<img src="'+theImages[whichImage]+'">');
    to this -
    document.getElementById('rotation').src='theImages[whichImage]';
    See if that works....

  • Expanding text java script

    I got a java script from a coworker that allows me to click
    on a button and display expanded text. The problem is, when its
    clicked, the page jumps back to the top of the page. Any ideas?
    Here is a sample of the code:
    <a href="#"
    onclick="document.getElementById('what_is').style.display=(document.getElementById('what_ is').style.display=='block')?'none':'block';"><img
    src="Images/More.jpg" border="0" align="left" />
    Thanks!!!!
    PS- please be gentle, I have never used java script before.
    :)

    nst_21710 wrote:
    > I got a java script from a coworker that allows me to
    click on a button and
    > display expanded text. The problem is, when its clicked,
    the page jumps back to
    > the top of the page. Any ideas?
    >
    > Here is a sample of the code:
    > <a href="#"
    >
    onclick="document.getElementById('what_is').style.display=(document.getElementBy
    >
    Id('what_is').style.display=='block')?'none':'block';"><img
    > src="Images/More.jpg" border="0" align="left" />
    >
    > Thanks!!!!
    >
    > PS- please be gentle, I have never used java script
    before. :)
    >
    replace:
    <a href="#"
    with:
    <a href="javascript:;"
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

  • Why does the Java script work on my RSS feed work for Internet explorer but not for Firefox?

    I have finished building the website for my Girlfriend and the only thing left is the RSS feed. It works just fine in IE 8 but in Fire Fox 9 when the widget is clicked a bookmark box pops up and asks if I want to save it as a bookmark. I am not a Java script programer so I am hoping for some help here!! Here is the script:
    <li id="rss"><a href="http://www.susangabrielle.com/1/feed" title="RSS" alt="rss"><img src="/files/theme/rss.png"></a></li>
    The sight is http://www.susangabrielle.com

    Presumably you fixed it, the RSS seems to work for me
    * e.g. http://www.susangabrielle.com/1/post/2012/01/post-title-click-and-type-to-edit.html <br/> although I get a message about missing plugins

Maybe you are looking for

  • ITunes asks me to set it up when I open it

    More and more frequently, iTunes asks me to set up the program when I try to open it, even though it has been running on my computer for months. It usually asks me if I want to add all MP3 files etc and generally set up the program. I then have to go

  • .ttf font will install but displays improperly

    Howdy. II just downloaded a .ttf which installed all well and good. The problem is I need this font for use in Photoshop, but it displays improperly. The font itself is correct, but looks as though it's bold and over-saturated. I did some quick troub

  • Visible/invisible subform based on choices from 2 dropdowns

    Does anyone have an example of a form with subforms being visible/invisible based on the answers of 2 dropdowns. thanks for sharing

  • Help problem importing image

    i have imported an image using actionscript using urlrequest heres ,my problem i have set its x and y bu the image is to big, i want to resize it, i have tried the height and widt but it doesnt work what other can i use? tnx!

  • Standard program that update bsis

    Hi Experts, How would i know which standard program update bsis table. i had hard time linking zuonr in bsis table. Thanks and regards, Aashta