Button Scope

Hi,
I'm having a slight problem with a dynamically generated
button in flash. The problem is that the movie clips that contains
the button is nested within several other movie clips. I am
assuming this is why when i run the flash document, the movie clip
plays and all the buttons are generated as usual, but none of them
seem to be active (cant click them or get the rollover code to
run). Is this a scope issue? Do i need a line of code that
activates the buttons through the nested movie clips?
Thanks for any help in advance
Damien

Yea i tried running some trace statements but the onRollover,
onRollout and all other mouse triggered events are not fired. I
decided to create a brand new movie clip outside of the main
template, finish building that component and then insert it in the
main template and work out scope issues later. Hopefully it will
come together alright.
Thanks again for ya help Ned
Will no doubt be in touche soon with another problem haha
Damien

Similar Messages

  • Button no longer works when inside a Movie Clip?

    Again I turn to the almighty Adobe forums for help...
    So basically, I've had this problem for over a day now, and I've posted on Experts-Exchange.com... to no avail really.
    So here we go:
    I have a button in a Flash project I've made. It's used to jump to another place on the root timeline, labelled "Why". It used to work perfectly.
    I have now placed the button inside a movie clip (it has to be in an animated sequence), but now it no longer works. It appears to work fine, the rollover state works and all. But when clicked it does nothing.
    The code I use to work the buttons goes on the main timeline, the code for this button is:
    mc_anim_backdrops_menu.btn_subsection1.onRelease = function() {
    gotoAndStop("Why");
    _global.swfloaded = "";
    Why does it no longer work? and what can I do to fix it?
    The question is posted here over at Experts Exchange - http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Act ionScript/Q_24888850.html
    what we've tried there is tracing the problem. The code seems to be pointing to the right place, but none of the actual function works.. as you'll be able to see if you open up the attached file (and change it's extension from .txt to .fla to get it working)
    So would someone be able to open it up, have a look and tell me what's wrong? Because I'm stumped. And frustrated.

    My guess is that you have a scope problem. By putting the button inside a movieclip you have made the buttons scope the same as that clip.
    So if you add a trace inside the release event handler, what do you get?
    trace("My current scope is: "+this);
    I'm guessing it is "_level0.mc_anim_backdrops_menu," right?
    So since you are using the global function of gotoAndPlay() it is looking for that label in the current timeline and not finding it.
    You should probably use the MovieClip method and specifiy which timeline it should look in.
    _root.gotoAndPlay("Why");
    _level0.gotoAndPlay("Why")
    _parent.gotoAndPlay("Why");
    both would probably work. I would never use the first two, other than to make sure that there wasn't something else going on...

  • VoiceMail button no longer works

    I have an iPhone 4 and the voicemail button worked up until August 27 when all of a sudden it no longer dialed my voicemail when i tapped it. Another problem is I don't get notified of new voicemails, This is a major problem when Im expecting work calls, which I discovered a few days ago that I had 10 new voicemails. I can dial voicemail by pushing and holding 1 down.
    Before I go further my carrier is Red Pocket which is an MVNO of AT&T. I did call them and they reset my voicemail several times but to no avail!
    I have spent many hours researching this issue to no avail as well.
    Things Ive tried:
    *Rebooting phone
    *trying a button combination to force the phone to dial my voicemail number:
             *5005*86*xxx-xxx-xxxx#  (both with and without * after 86, x's are my voicemail number, tried with and without 1- Im in the US)
                    When I do this number combination and hit call, the screen either flashes or pops up a message saying "Error performing request, unknown error"
    *Resetting all settings on phone
    *And as I said called Red Pocket whos customer service s*cks....but its whats i got....
    I think from what I can gather this has something to do with Visual voicemail which i dont believe I have as red pocket doesnt have it as an option, AND unlocked iPhones. Im not sure if my phone is unlocked as I bought it used and Im not sure how to check if it is....
    I do see that others have this problem as evidenced by google search results...
    set voicemail number in iPhone 4S
    iphone 5 change/add voicemail number?
    http://www.howardforums.com/showthread.php/1704400-need-help-with-voicemail-setu p
    Some other things I've read about were swapping the SIM card out with another and then putting the correct SIM back in. I haven't tried this as i don't have a spare SIM AND people said that this only temporarily worked!
    So does anyone have any ideas?

    My guess is that you have a scope problem. By putting the button inside a movieclip you have made the buttons scope the same as that clip.
    So if you add a trace inside the release event handler, what do you get?
    trace("My current scope is: "+this);
    I'm guessing it is "_level0.mc_anim_backdrops_menu," right?
    So since you are using the global function of gotoAndPlay() it is looking for that label in the current timeline and not finding it.
    You should probably use the MovieClip method and specifiy which timeline it should look in.
    _root.gotoAndPlay("Why");
    _level0.gotoAndPlay("Why")
    _parent.gotoAndPlay("Why");
    both would probably work. I would never use the first two, other than to make sure that there wasn't something else going on...

  • Spamming has made app reviews pointless and report button no longer works

    The app reviews have become useless to me because of all of the spamming.  And to make matters worse, the report button no longer works so the spamming posts can't be reported.  Who do we contact to report spam?

    My guess is that you have a scope problem. By putting the button inside a movieclip you have made the buttons scope the same as that clip.
    So if you add a trace inside the release event handler, what do you get?
    trace("My current scope is: "+this);
    I'm guessing it is "_level0.mc_anim_backdrops_menu," right?
    So since you are using the global function of gotoAndPlay() it is looking for that label in the current timeline and not finding it.
    You should probably use the MovieClip method and specifiy which timeline it should look in.
    _root.gotoAndPlay("Why");
    _level0.gotoAndPlay("Why")
    _parent.gotoAndPlay("Why");
    both would probably work. I would never use the first two, other than to make sure that there wasn't something else going on...

  • Encore no longer behaving when building a menu.  Help!

    I have creative suite 5 for iMac.  Premiere works fine but when I want to build a menu in Encore and try to put Text into it, it announces a “General Error“ or "sorry an abnormal condition has been detected” and the screen goes “mad”.  I’d be grateful for any help!

    My guess is that you have a scope problem. By putting the button inside a movieclip you have made the buttons scope the same as that clip.
    So if you add a trace inside the release event handler, what do you get?
    trace("My current scope is: "+this);
    I'm guessing it is "_level0.mc_anim_backdrops_menu," right?
    So since you are using the global function of gotoAndPlay() it is looking for that label in the current timeline and not finding it.
    You should probably use the MovieClip method and specifiy which timeline it should look in.
    _root.gotoAndPlay("Why");
    _level0.gotoAndPlay("Why")
    _parent.gotoAndPlay("Why");
    both would probably work. I would never use the first two, other than to make sure that there wasn't something else going on...

  • Why does my MacBook Pro keep crashing?

    MacBook Pro 5,3 (mid-2009)
    Snow Leopard 10.6.8
    3.06 GHz Intel Core 2 Duo
    8 GB 1067 MHz DDR3 RAM
    Bluetooth Off
    WiFi on (50% of the time)
    After sluggish performance (and now crashes) I've investigated w/Disk Utility app.  I've been finding "Disk Needs Repair" more and more frequently lately.  Was every month or so, then every week and now my Mac sometimes crashes multiple times in a day (whether it be a white screen or that black box that overlays the screen with the message to restart the machine).  Often my MBP will not read the installation disc when inserted, but when I do get it to read, the Disk Repair is always successful (says Disk Utility). 
    I've:
    -Repaired the disk from the installation DVD
    -Repaired permissions from the installation DVD and just from the startup disk
    -Reset PRAM/NVRAM
    -Reset SMC control
    ...multiple times.  Crashed keep coming back, sometimes immediately.
    I used Yasu (cache cleaning software) for the first time a few days ago.  Seemed to remedy all crashing issues...until yesterday.  It crashed again with an external HDD attached (not that the ext HDD was at fault, I'm just trying to provide as much info as I remember).  Not only is this very frustrating, inconvenient, etc. -- it's the machine I use for my job (performing as a DJ for over 15 years) and I just dread a crash mid-performance (was very weary tonight), since it crashed during sound check last week.
    More info (for what it's worth):
    -This HDD is less than a year old (Seagate Momentus XT 750GB 7200RPM)
    -The RAM is upgraded, not factory installed (has been installed for over a year)
    -Battery was replaced (supposedly OEM) about a year ago (under warranty for another 2 years)
    I've copied/pasted the crash reports to notepad in hopes someone will be able to diagnose this issue with them.
    Mediafire Link
    Also,
    -I opened Activity Monitor app last night, but found nothing odd.
    -I opened Console app last night and saw many crash logs and they just continued to roll on out.  Let me know if that info will help and I'll be happy to copy/past or save screen shots.
    I've reformatted my machine long ago for a separate issue.  I'd really like to find someone to decipher these crash reports to know if reformatting again is necessary.  I'd rather not do it as a guess, but I understand my options could be limited.
    Your time and efforts are appreciated.  I love this machine when it behaves.  I'd like to see it stick around a bit longer.

       OK, so - I used Memtest in verbose 64-bit single user mode to find my installed RAM OK installed individually, but bad installed as a pair.  Interesting that was the case, but they will be mailed in to get them repaired/replaced.  I installed my factory RAM and Memtest verified them OK after 4 runs.  All has been fine, up until 10 minutes ago.
       After playing a movie with an external monitor plugged in, I unplugged the external monitor and the charger, closed the lid and packed up my MBP to return home.  I opened the lid only to find my home screen appear for a split second before the screen turned white.  Had to power down, holding the power button for a very extended period of time. 
       At first, my MBP would not turn on right away.  After a few tries, I heard something, but no fans and nothing on the screen (alost sounded like just the HDD was running).  Hit the power button again to shut it off.  And again to turn it on.  The power-up chime played...and played again....and again - it just kept looping by itself, with a slight distortion noise at the tail end of the chime.  Powered down and up, this time seeing the kernel panic window.  Did this 4 more times (incl SMC reset and NVRAM reset).  The 5th time I saw the kernel panic window, I held Shift + Command + Option + Power button (SCOP, used for PMU reset) until it powered down.  My MBP finally got to the login screen. 
    I immediately went to Disk Utility to Verify Disk.  "This disk needs to be repaired" it said, again.  Before I left for the evening, I actually checked w/DU and it reported the disc as OK.  Something is going on and I don't know what.  I'll attach the Error Report below:
    Interval Since Last Panic Report:  205882 sec Panics Since Last Report:          1 Anonymous UUID:                    646422C5-A1BC-4028-B5AA-7872407305D7  Wed Dec 25 01:01:51 2013 panic(cpu 1 caller 0x58c0ec97): NVRM[0/2:0:0]: Read Error 0x00000000: CFG 0xffffffff 0xffffffff 0xffffffff, BAR0 0xe4000000 0x59ab1000 0x00000000, D0, P-1/-1 Backtrace (CPU 1), Frame : Return Address (4 potential args on stack) 0x5832b798 : 0x21b837 (0x5dd7fc 0x5832b7cc 0x223ce1 0x0)  0x5832b7e8 : 0x58c0ec97 (0x58e2422c 0x58e94840 0x58e32f88 0x0)  0x5832b888 : 0x58d295db (0x7c40804 0x80a4004 0x0 0x2209aa)  0x5832b8d8 : 0x58d28561 (0x80a4004 0x0 0x0 0x0)  0x5832b938 : 0x58bc7129 (0x80a4004 0x58e80da0 0x0 0x0)  0x5832b988 : 0x58c1182c (0x0 0x5832b9ac 0x0 0x0)  0x5832b9f8 : 0x58c13762 (0x58e80da0 0x0 0x59ab1000 0x6aab1000)  0x5832bbb8 : 0x58bab8ae (0x0 0x85f8f8 0xffffffff 0x6aab1000)  0x5832bc08 : 0x58bac38b (0x7cf2c00 0x734e780 0x0 0x542bf2)  0x5832bc58 : 0x58bac4c5 (0x7cf2c00 0x7ce2f80 0x5832bc88 0x53b23e)  0x5832bc88 : 0x587359c8 (0x7cf2c00 0x5873d510 0x8c5bc20 0x72cfd70)  0x5832bd08 : 0x58734332 (0x7cf2c00 0x5 0x5 0x2141a2)  0x5832bd38 : 0x53e5df (0x7cf2c00 0x827d000 0x827d000 0x0)  0x5832bd88 : 0x56f222 (0x7cf2c00 0x827d000 0x827d000 0x0)  0x5832bde8 : 0x286c9e (0x7cf2c00 0x827d000 0x0 0x0)  0x5832be58 : 0x21dbe5 (0x7ee1a68 0x7ef2484 0x7ee1a6c 0x7ee1aa4)  0x5832be98 : 0x210a86 (0x7ee1a00 0x5832bedc 0x8239ae4 0x5832bed0)  0x5832bef8 : 0x216f84 (0x7ee1a00 0x0 0x0 0x0)  0x5832bf78 : 0x295c57 (0x856cd48 0x0 0x0 0x0)  0x5832bfc8 : 0x2a256d (0x856cd44 0x0 0x2a17ab 0x7a9c7a8)        Kernel Extensions in backtrace (with dependencies):          com.apple.NVDAResman(6.3.6)@0x58ba8000->0x58e95fff             dependency: com.apple.iokit.IOPCIFamily(2.6.5)@0x510aa000             dependency: com.apple.iokit.IONDRVSupport(2.2.1)@0x586db000             dependency: com.apple.iokit.IOGraphicsFamily(2.2.1)@0x58723000          com.apple.iokit.IOGraphicsFamily(2.2.1)@0x58723000->0x58744fff             dependency: com.apple.iokit.IOPCIFamily(2.6.5)@0x510aa000  BSD process name corresponding to current thread: WindowServer  Mac OS version: 10K549  Kernel version: Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 System model name: MacBookPro5,3 (Mac-F22587C8)  System uptime in nanoseconds: 13005236254 unloaded kexts: (none) loaded kexts: com.paceap.kext.pacesupport.snowleopard     5.7.2 - last loaded 11131746995 com.quark.driver.Tether     1.1.0d1 com.serato.usb.kext     2.3.0 com.logmein.driver.LogMeInSoundDriver     1.0.0 com.rim.driver.BlackBerryUSBDriverInt     0.0.74 com.apple.filesystems.autofs     2.1.0 com.apple.driver.AppleTyMCEDriver     1.0.2d2 com.apple.driver.AGPM     100.12.31 com.apple.driver.InternalModemSupport     2.6.2 com.apple.driver.AudioAUUC     1.57 com.apple.driver.AppleIntelYonahProfile     14 com.apple.driver.AppleMikeyHIDDriver     1.2.0 com.apple.driver.AppleIntelPenrynProfile     17 com.apple.Dont_Steal_Mac_OS_X     7.0.0 com.apple.driver.AppleUpstreamUserClient     3.5.7 com.apple.driver.AppleMikeyDriver     2.0.5f14 com.apple.driver.AppleHDA     2.0.5f14 com.apple.driver.AppleIntelNehalemProfile     11 com.apple.driver.AudioIPCDriver     1.1.6 com.apple.driver.AppleMCCSControl     1.0.20 com.apple.nvenet     2.0.17 com.apple.driver.AirPortBrcm43xx     423.91.27 com.apple.driver.SMCMotionSensor     3.0.1d2 com.apple.driver.AppleIntelMeromProfile     19 com.apple.driver.AppleGraphicsControl     2.10.6 com.apple.GeForce     6.3.6 com.apple.driver.AirPortBrcm43224     428.42.4 com.apple.driver.ACPI_SMC_PlatformPlugin     4.7.0a1 com.apple.driver.AppleLPC     1.5.1 com.apple.driver.AppleBacklight     170.0.46 com.apple.kext.AppleSMCLMU     1.5.2d10 com.apple.driver.AppleUSBTCButtons     201.6 com.apple.driver.AppleUSBTCKeyEventDriver     201.6 com.apple.driver.AppleUSBTCKeyboard     201.6 com.apple.driver.AppleIRController     303.8 com.apple.driver.AppleUSBCardReader     2.6.1 com.apple.iokit.SCSITaskUserClient     2.6.8 com.apple.iokit.IOAHCIBlockStorage     1.6.4 com.apple.driver.AppleFWOHCI     4.7.3 com.apple.driver.AppleUSBHub     4.2.4 com.apple.driver.AppleAHCIPort     2.1.7 com.apple.BootCache     31.1 com.apple.AppleFSCompression.AppleFSCompressionTypeZlib     1.0.0d1 com.apple.driver.AppleUSBEHCI     4.2.4 com.apple.driver.AppleUSBOHCI     4.2.0 com.apple.driver.AppleEFINVRAM     1.4.0 com.apple.driver.AppleRTC     1.3.1 com.apple.driver.AppleHPET     1.5 com.apple.driver.AppleSmartBatteryManager     160.0.0 com.apple.driver.AppleACPIButtons     1.3.6 com.apple.driver.AppleSMBIOS     1.7 com.apple.driver.AppleACPIEC     1.3.6 com.apple.driver.AppleAPIC     1.4 com.apple.driver.AppleIntelCPUPowerManagementClient     142.6.0 com.apple.security.sandbox     1 com.apple.security.quarantine     0 com.apple.nke.applicationfirewall     2.1.14 com.apple.driver.AppleIntelCPUPowerManagement     142.6.0 com.apple.driver.AppleProfileReadCounterAction     17 com.apple.driver.AppleProfileTimestampAction     10 com.apple.driver.AppleProfileThreadInfoAction     14 com.apple.driver.AppleProfileRegisterStateAction     10 com.apple.driver.AppleProfileKEventAction     10 com.apple.driver.AppleProfileCallstackAction     20 com.apple.iokit.IOSurface     74.2 com.apple.iokit.IOBluetoothSerialManager     2.4.5f3 com.apple.iokit.IOSerialFamily     10.0.3 com.apple.driver.AppleHDAHardwareConfigDriver     2.0.5f14 com.apple.driver.DspFuncLib     2.0.5f14 com.apple.iokit.IOAudioFamily     1.8.3fc2 com.apple.kext.OSvKernDSPLib     1.3 com.apple.driver.AppleSMBusController     1.0.10d0 com.apple.driver.AppleHDAController     2.0.5f14 com.apple.iokit.IOHDAFamily     2.0.5f14 com.apple.iokit.IOFireWireIP     2.0.3 com.apple.iokit.AppleProfileFamily     41 com.apple.driver.NVSMU     2.2.7 com.apple.iokit.IO80211Family     320.1 com.apple.iokit.IONetworkingFamily     1.10 com.apple.driver.IOPlatformPluginFamily     4.7.0a1 com.apple.driver.AppleSMBusPCI     1.0.10d0 com.apple.driver.AppleBacklightExpert     1.0.1 com.apple.driver.AppleSMC     3.1.0d5 com.apple.nvidia.nv50hal     6.3.6 com.apple.NVDAResman     6.3.6 com.apple.iokit.IONDRVSupport     2.2.1 com.apple.iokit.IOGraphicsFamily     2.2.1 com.apple.driver.BroadcomUSBBluetoothHCIController     2.4.5f3 com.apple.driver.AppleUSBBluetoothHCIController     2.4.5f3 com.apple.iokit.IOBluetoothFamily     2.4.5f3 com.apple.driver.AppleUSBMultitouch     207.7 com.apple.iokit.IOUSBHIDDriver     4.2.0 com.apple.driver.AppleUSBMergeNub     4.2.4 com.apple.iokit.IOSCSIMultimediaCommandsDevice     2.6.8 com.apple.iokit.IOBDStorageFamily     1.6 com.apple.iokit.IODVDStorageFamily     1.6 com.apple.iokit.IOCDStorageFamily     1.6.1 com.apple.driver.XsanFilter     402.1 com.apple.iokit.IOAHCISerialATAPI     1.2.6 com.apple.iokit.IOFireWireFamily     4.2.6 com.apple.iokit.IOUSBUserClient     4.2.4 com.apple.iokit.IOAHCIFamily     2.0.6 com.apple.driver.AppleFileSystemDriver     2.0 com.apple.driver.AppleEFIRuntime     1.4.0 com.apple.iokit.IOHIDFamily     1.6.6 com.apple.iokit.IOSMBusFamily     1.1 com.apple.security.TMSafetyNet     6 com.apple.kext.AppleMatch     1.0.0d1 com.apple.iokit.IOUSBMassStorageClass     2.6.7 com.apple.driver.AppleUSBComposite     3.9.0 com.apple.iokit.IOSCSIBlockCommandsDevice     2.6.8 com.apple.iokit.IOSCSIArchitectureModelFamily     2.6.8 com.apple.iokit.IOUSBFamily     4.2.4 com.apple.driver.DiskImages     289 com.apple.iokit.IOStorageFamily     1.6.3 com.apple.driver.AppleACPIPlatform     1.3.6 com.apple.iokit.IOPCIFamily     2.6.5 com.apple.iokit.IOACPIFamily     1.3.0

  • New document, query drill, scope of analysis, buttons disabled

    Hi,
    i have many reports, as part of develepment, we are  planning to  use drill down in some reports, but,when i edit the report in infoview, it is possible to create new document but not in rich client, and it is not posible no edit query in rich client, the button is greyed out, also the  drill button, and even the create new document  is grayed out.
    I read another post that says, is not posible to use scope of analysis if the universe  is from BI,so i tought it could be the reason that scope of analysis was greyed out, but did another test with universe e-fashion and it´s exactly the same problem, the buttons -create new query edit query, drill, scope of analysis,  are disabled.
    I have all the rights in infoview and cmc i have tha administrator account, Could be the problem ..........that we have a temporary license?
    Thanks for your help hope to solve it quickly

    Hi,
    Copy the report from Public folders to your favourites and tryfor drill down or creating a new document. May be your admin team can restrict in QA or PROD generally.
    Cheers,
    Suresh babu Aluri.

  • Problem with Commit button When Backing bean is in Request Scope...

    HI Everybody,
    I have a Backing Bean in request scope having over 1000 lines of code, And in my JSPX page I have a table binding with a view object and At run time when user select the row in table and click the edit button so user will be able to edit that selected row in the same table at run time.. but the problem is : when the user enters some data in the Editable inputTexts and then clicks save(Commit), then the save button doesn't work..but when i delete any selected row and then press save then it is working fine..
    And to test it in Session scope i made another sample page where every thing is working very fine..
    Now i want to know What is the difference between Session scope and request scope bean...
    And is there any solution to Save editable input text in Request scope?.
    Also want to know that is it safe to set the scope of my main bean class to session scope without effecting the current running functionality? which is having over 1000 lines of code and lot of component has been placed...
    Please help me to resolve this problem...
    Thanks in Advance to all of you
    Fizzz..

    Hi Frank...
    In my code i used almost same logic as Andrejus Baranovskis has explained in his Editable Table example...
    You can refer that example to see what problem I'm facing...
    http://andrejusb.blogspot.com/2007/04/create-edit-and-delete-operations-in.html
    The Bean Scope in this Example is Session scope...Save button is working fine...
    But as i Change the bean scope to Request scope then Save button is not working for Edit but it is working for Delete Action very well..
    I want that save button should work also for Edit action in Request Scope..
    Please Make me understand that why it is happened like that..
    and help me to find the solution..
    and Also if you have a better document to Explain the life cycle of Application in Different Bean Scope...So please provide me that Doc to me...
    It would be a great help for me to understand the concept of session...
    Thanks Frank
    Fizzz...

  • Merge Dimension & Scope of Analysis buttons inactive

    Hi experts,
    We are currently on Business Objects XI 3.0. I am trying to merge common dimensions from 2 Universes, or to perform Drill-down on hierarchies. However, I don't know why the buttons <Merge Dimensions> and <Show/Hide Scope of Analysis Pane> are inactive, ie. grey in colour.
    Is there something I need to set before I can use these 2 functions?
    I've already ticked 'Auto-merge dimensions' (under Document Properties), but this flag is always unticked when I create a new document.
    I've also set 'Start drill on existing report' (under Tools > Options).
    Would appreciate any suggestion on getting these 2 functions working. Thanks in advance.
    Linda
    Edited by: Linda on Mar 9, 2009 11:01 AM

    Hi Linda,
    Have you tried Unchecking the option u201CUse Query Drillu201D (Document Properties) i.e. 3rd option under Document Options in WEBI?
    I am not comfortable with SAP BW OLAP Universes because I never worked on it.
    If you canu2019t combine the queries or u201CAdd a combined Queryu201D button is disabled then follow the steps:
    1. Import the universe on which you are building the report.
    2. Goto Universe Parameters-> SQL tab-> Check the option u201Callow the use of Union, Intersect and minus operatorsu201D
    3. Save and Export the Universe
    4. You can combine the Queries now.
    I Hope  this Helpsu2026..
    Thanksu2026
    Pratik

  • SCOPE OF ANALYSIS button Inactive

    Hi,
    I am trying to use SCOPE OF ANALYSIS in my webi report but the Scope of analysis button is graded out.
    I have tried unchecking the "USE QUERY DRILL" under document properties as it was said in one of the threads, But no luck.
    Could any one please hellp me through this, How to make SCOPE OF ANALYSIS BUTTON active??
    Thank You!

    If what Oscar suggests does not work, it may be a permissions issue.
    You need to be granted permission to drill at the WebIntelligence Application settings via the CMC

  • 2012 R2 RBA: Remove / Delete buttons greyed out Administrative users account (sec role/scope) clean up

    I am seeing something odd with one of my RBA settings.  Keep in mind I am seeing this as a 'Full Administrator'.
    I created a new test Security scope, Security Role, created a test Active Directory group and then entered that AD group as a new account name under Security>Administrative users.  I added the new Security Role under the Security Roles tab of the
    Account name (Administrative users) properties and also added the security scope that I created under the Security Scopes tab.  I was able to see all the settings I had created/exported in the RBA viewer and everything with the role worked as desired.
    I am now looking to clean that up but I don't seem to be able to.  I am starting under Administrative Users>Account name and trying to unlink the Security Roles and Security Scopes that listed in those tabs.  However, remove and deletes on this
    stuff are all greyed out.  If I add another role to the Security Role tab I can then remove that, but I cannot remove this 1 particular one.  The result is that I cannot remove the custom Security Scope, Security Role and ultimately the Administrative
    user.
    Does anyone have any idea why I can't remove the security roles and scopes from the Account Name?

    I am now looking to clean that up but I don't seem to be able to.  I am starting under Administrative Users>Account name and trying to unlink the Security Roles and Security Scopes that listed in those
    tabs.  However, remove and deletes on this stuff are all greyed out.  If I add another role to the Security Role tab I can then remove that, but I cannot remove this 1 particular one.  The result is that I cannot remove the custom Security Scope,
    Security Role and ultimately the Administrative user.
    Does anyone have any idea why I can't remove the security roles and scopes from the Account Name?
    I'm able to "delete" one admin user or group (account name) from Administrative users node (\Administration\Overview\Security\Accounts). I tried with custom security role/scope etc....even the same user was part of \Administration\Overview\Security\Accounts.
    It seems something wrong with your FULL admin account ? Do you've any other FULL Admin account? If so, can you try with that account?
    Anoop C Nair (My Blog www.AnoopCNair.com)
    - Twitter @anoopmannur -
    FaceBook Forum For SCCM

  • Form Returns Null Values or Empty Values For Variables After Clicking OK Button

    I'm trying to create a new user based on a template user. Right now I just want to get the variables right, I just want to be able to select a template user, fill in the information that will be different, and click Create User. 
    I'm not sure why this isn't working. I think the problem is in the code for the OK button or Enter keypress but I'm not sure what's wrong with the code I've entered. Any advice would be helpful. I'm sure it's something simple but I'm fairly new to powershell
    and syntax has been rather tricky for me. Sorry if it's a rookie mistake and thanks for any advice.
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    Write-Host "Creating The Form For Selecting Templates"
    $TemplateForm = New-Object System.Windows.Forms.Form
    $TemplateForm.Text = "Select a Template"
    $TemplateForm.Size = New-Object System.Drawing.Size(640,700)
    $TemplateForm.StartPosition = "CenterScreen"
    Write-Host "Enabling Keystroke Response on Form"
    $TemplateForm.KeyPreview = $True
    Write-Host "Defining Keystroke Response for Enter Key"
    $TemplateForm.Add_KeyDown({if ($_.KeyCode -eq "Enter")
    {$SelectedTemplate=$TemplateListBox.SelectedItem;$newuserfirstname=$FnameTextBox.Text;$newuserlastname=$LnameTextBox.Text;$newusertitle=$TitleTextBox.Text;$newuserhiringmanager=$MgrNameTextBox.Text;$newuserphonenumber=$PhoneNumberTextBox.Text;$newuserdepartment=$DeptTextBox.Text;$TemplateForm.Close()}})
    Write-Host "Defining Keystroke Response for Esc Key"
    $TemplateForm.Add_KeyDown({if ($_.KeyCode -eq "Escape")
    {$TemplateForm.Close()}})
    Write-Host "Placing OK Button On Form"
    $OKButton = New-Object System.Windows.Forms.Button
    $OKButton.Location = New-Object System.Drawing.Size(75,550)
    $OKButton.Size = New-Object System.Drawing.Size(75,23)
    $OKButton.Text = "Create User"
    $OKButton.Add_Click({$SelectedTemplate=$TemplateListBox.SelectedItem;$newuserfirstname=$FnameTextBox.Text;$newuserlastname=$LnameTextBox.Text;$newusertitle=$TitleTextBox.Text;$newuserhiringmanager=$MgrNameTextBox.Text;$newuserphonenumber=$PhoneNumberTextBox.Text;$newuserdepartment=$DeptTextBox.Text;$TemplateForm.Close()})
    $TemplateForm.Controls.Add($OKButton)
    Write-Host "Placing Cancel Button On Form"
    $CancelButton = New-Object System.Windows.Forms.Button
    $CancelButton.Location = New-Object System.Drawing.Size(150,550)
    $CancelButton.Size = New-Object System.Drawing.Size(75,23)
    $CancelButton.Text = "Cancel"
    $CancelButton.Add_Click({$TemplateForm.Close()})
    $TemplateForm.Controls.Add($CancelButton)
    Write-Host "Placing Label On Template List Box"
    $TemplateListLabel = New-Object System.Windows.Forms.Label
    $TemplateListLabel.Location = New-Object System.Drawing.Size(10,20)
    $TemplateListLabel.Size = New-Object System.Drawing.Size(280,20)
    $TemplateListLabel.Text = "Please fill out the following new user information:"
    $TemplateForm.Controls.Add($TemplateListLabel)
    Write-Host "Creating Template List Box for Form"
    $TemplateListBox = New-Object System.Windows.Forms.ListBox
    $TemplateListBox.Location = New-Object System.Drawing.Size(10,40)
    $TemplateListBox.Size = New-Object System.Drawing.Size(260,20)
    $TemplateListBox.Height = 520
    Write-Host "Placing Label On First Name Box for Form"
    $FnameTextLabel = New-Object System.Windows.Forms.Label
    $FnameTextLabel.Location = New-Object System.Drawing.Size(300,20)
    $FnameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $FnameTextLabel.Text = "First Name:"
    $TemplateForm.Controls.Add($FnameTextLabel)
    Write-Host "Creating First Name Box for Form"
    $FnameTextBox = New-Object System.Windows.Forms.TextBox
    $FnameTextBox.Location = New-Object System.Drawing.Size(300,40)
    $FnameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($FnameTextBox)
    Write-Host "Placing Label On Last Name Box for Form"
    $LnameTextLabel = New-Object System.Windows.Forms.Label
    $LnameTextLabel.Location = New-Object System.Drawing.Size(400,20)
    $LnameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $LnameTextLabel.Text = "Last Name:"
    $TemplateForm.Controls.Add($LnameTextLabel)
    Write-Host "Creating Last Name Box for Form"
    $LnameTextBox = New-Object System.Windows.Forms.TextBox
    $LnameTextBox.Location = New-Object System.Drawing.Size(400,40)
    $LnameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($LnameTextBox)
    Write-Host "Placing Label On Department Box for Form"
    $DeptTextLabel = New-Object System.Windows.Forms.Label
    $DeptTextLabel.Location = New-Object System.Drawing.Size(500,20)
    $DeptTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $DeptTextLabel.Text = "Department:"
    $TemplateForm.Controls.Add($DeptTextLabel)
    Write-Host "Creating Department Box for Form"
    $DeptTextBox = New-Object System.Windows.Forms.TextBox
    $DeptTextBox.Location = New-Object System.Drawing.Size(500,40)
    $DeptTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($DeptTextBox)
    Write-Host "Placing Label On Title Box for Form"
    $TitleTextLabel = New-Object System.Windows.Forms.Label
    $TitleTextLabel.Location = New-Object System.Drawing.Size(300,70)
    $TitleTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $TitleTextLabel.Text = "Title:"
    $TemplateForm.Controls.Add($TitleTextLabel)
    Write-Host "Creating Title Box for Form"
    $TitleTextBox = New-Object System.Windows.Forms.TextBox
    $TitleTextBox.Location = New-Object System.Drawing.Size(300,90)
    $TitleTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($TitleTextBox)
    Write-Host "Placing Label On Manager Name Box for Form"
    $MgrNameTextLabel = New-Object System.Windows.Forms.Label
    $MgrNameTextLabel.Location = New-Object System.Drawing.Size(400,70)
    $MgrNameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $MgrNameTextLabel.Text = "Manager's Name:"
    $TemplateForm.Controls.Add($MgrNameTextLabel)
    Write-Host "Creating Manager's Name Box for Form"
    $MgrNameTextBox = New-Object System.Windows.Forms.TextBox
    $MgrNameTextBox.Location = New-Object System.Drawing.Size(400,90)
    $MgrNameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($MgrNameTextBox)
    Write-Host "Placing Label On Manager Name Box for Form"
    $PhoneNumberTextLabel = New-Object System.Windows.Forms.Label
    $PhoneNumberTextLabel.Location = New-Object System.Drawing.Size(500,70)
    $PhoneNumberTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $PhoneNumberTextLabel.Text = "Phone Number:"
    $TemplateForm.Controls.Add($PhoneNumberTextLabel)
    Write-Host "Creating Phone Number Box for Form"
    $PhoneNumberTextBox = New-Object System.Windows.Forms.TextBox
    $PhoneNumberTextBox.Location = New-Object System.Drawing.Size(500,90)
    $PhoneNumberTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($PhoneNumberTextBox)
    Write-Host "Creating Fake List of Templates"
    $TemplateGroupList = "Test"
    $TemplateForm.Controls.Add($TemplateListBox)
    Write-Host "Ensuring List Box appears in front of other windows"
    $TemplateForm.Topmost = $True
    $TemplateForm.Add_Shown({$TemplateForm.Activate()})
    [void] $TemplateForm.ShowDialog()
    $SelectedTemplate
    $newuserfirstname
    $newuserlastname
    $newusertitle
    $newuserhiringmanager
    $newuserphonenumber
    $newuserdepartment
    Pause

    If you plan on performing all of the work under the Click event, then you won't need to worry about assigning a Script scope to the variables, but if you are planning on using those variables outside of the Event, then David's answer is the way to go.
    Another option is to use a hash table as it also works around the issue with variable scope in a UI Event.
    #Define at beginning of script
    $hashtable = @{}
    $OKButton.Add_Click({$hashtable.SelectedTemplate=$Something})
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • How to externally trigger the execution of TestStand with a start and abort button through a digital interface?

    Hello,
    I'm Currently evaluating TestStand as an alternative for an in-house developed Test Sequencer.
    To start our own Test Sequencer we use a small box, connected to a DIO board. The box has a start button and an abort button. The box also has a pass, a fail and a running led.
    The interface with this box is made via some digital lines of a PCI-DIO-96.
    In our own Test Sequencer we have groups named Init, Run, Abort, Exit.
    The Init group is executed at startup (only once). It is used to initialize all the HW and SW. -> I guess this is the Pre UUT Loop callback in TestStand.
    The Exit group is only executed once at the end of the day when the application is terminated. It is used to free all the used hardware and cleanup all the resources. This probably is the Post UUT Loop Callback in TS.
    When a product needs to be tested, the operator presses the "start" button which triggers our own Test Sequencer and the run and abort group are being executed (first the run group, afterwards the abort group).
    When the product is being tested the "running led" of the little box lights up to indicate to the operator that the application is running. (only when the run and abort group are running)
    The Run group has all the functional tests in it. (MainSequence)
    The abort group is used to put everything back in it's original state after the test on this single product is done. (Post UUT)
    When executing the tests and something goes wrong (operator gets stuck in a clamper, ...) the operator can still press the abort button and then the execution immediately jumps from the currently executing step in the run group to the first step of the abort group. So, when something goes wrong, immediately the abort group is called.
    At the end of the run and abort group, if no errors occured, the "pass led" lights up. If one or more steps went wrong the "fail" led lights up.
    This setup can also be used to test multiple product in parallel. At that time all the different parallel testers have such a small box which contains a "start" and "abort" button and a pass, fail and running led. (it is possible that they are all connected to the same PCI-DIO-96 board. )
    My question:
    Is it possible to do something similar like this in Teststand? If yes, is there an example available that shows me how to do this in TestStand? (externally trigger the execution of TestStand)
    Typically, in the Init group (Pre UUT Loop) the digital interface box gets initialised.
    In the Close group (Post UUT Loop) the digital interface box is taken out of scope.
    Note: The PCI-DIO-96 board to which the digital interface box is connected will also be used in the rest of the developed application (MainSequence, ...)
    What's really important for me is that I can create a process model that all the application developers in our organisation can use. I really don't want any of the application developers (limited software experience) to mess around in all the features of TestStand.
    For them it's important that they just add the function DigitalInterfaceBoxInit () in the Pre UUT Loop Callback and the DigitalInterfaceBoxClose () in the Post UUT Loop Callback, and then everything works!
    It is important that the appliation developers do not have to create any global variables, other functions, synchronisations, parallel sequences, ... in TestStand. All this needs to be done with a simple call to the DigitalInterfaceBoxInit function.
    Thanks in advance for all the help!
    Best Regards,
    Dennis Vanotterdijk
    [email protected]

    Dennis-
    Your application sounds very well suited to TestStand's abilities. I am also quite impressed with your knowledge of how TestStand's architecture is arranged when you are still just considering whether or not to use it.
    I think that TestStand would work really well for you in this application. Like you mentioned it will provide you with a form of standardization for your application developers to work from. It also provides the flexibility for you to add your custom routines in many different places. TestStand also makes parallel and batch testing much easier in TS 2.0 so that you could develop one test for your product and execute different instances of it in parallel to test multiple products at once.
    As for your specific question about how to c
    ontrol TestStand using a DIO board. I think this is very feasible and should not be too difficult. Since TestStand provides you the ability to create a custom operator interface your operator interface could monitor the status of your DIO board and launch/abort executions based on the read values. Usually the executions are launched/aborted when a button on the GUI is pressed however, I do not see any thing different about basing the action on a DI signal vs a mouse click. I am sure your application is more involved than this high level description but from the sounds of it I think it is very possible to do with TestStand.
    Based on my experience of building test systems with TestStand and your description of the application, I would feel very confident in using TestStand to achieve all the goals you mentioned. If you have further detailed questions on how one of your features might be implemented, feel free to contact one of our Application Engineers or email us at www.ni.com/ask
    and we would be glad to help you.
    Best regards,
    Richard McDonell
    National Instruments

  • Clicking twice on a Form submit button

    I have problem that I need either help on solving or ideas on a different solution please.
    I have some code in a request scope backing bean that sets a Boolean in a session cope bean to true. This indicates that the form has been submitted within this session.
    So if a user tries to submit the same form in the same session, the form backing bean will check the session bean property, see that it is set to true and the method which handles the Form�s commandButton in the backing bean returns null, with a message saying that the form can not be resubmitted.
    Also within the session bean I set a property that indicates if a credit card payment was made or not, and when the form backing bean sends its message on a form resubmit, it also informs the user if a credit card transaction had actually occurred or not.
    This works fine when you fully submit the form and return to the form page and try to resubmit it. But (there always is a but) when originally submitting the form, if a user clicks the submit button once, and then once again in quick succession (not a double click though) the session form property that gets set to true when the credit card payment is made does not get resolved correctly. It gets resolved as false (this is how it is initialized), even though it was set to true as a result of the first click.
    Only in the case of the clicking twice scenario I get an exception in the log file, which I can�t trace back. The request is directed through a filter �OrderAccessControlFilter� which seems to mask where the exception originally occurred.
    Sorry for the long explanation, I would appreciate any help.
    Below is the exception:
    10-Feb-2005 10:55:16 com.sun.faces.lifecycle.InvokeApplicationPhase execute
    SEVERE: Index: 0, Size: 0
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at java.util.ArrayList.RangeCheck(ArrayList.java:507)
         at java.util.ArrayList.remove(ArrayList.java:392)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:271)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at com.syndero.lingo.order.OrderAccessControlFilter.doFilter(OrderAccessControlFilter.java:199)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    10-Feb-2005 10:55:16 com.syndero.lingo.order.OrderAccessControlFilter doFilter
    SEVERE: Error in OrderAccessControlFilter:
    javax.servlet.ServletException: Index: 0, Size: 0
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at com.syndero.lingo.order.OrderAccessControlFilter.doFilter(OrderAccessControlFilter.java:199)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)

    Hi,
    I am also facing the same problem. I have 2 buttons on my page, enable and disable. When I click enable and then disable in quick succession, the application crashes.
    Also, I put in some System out statemets in the button handlers and found out that a new thread is spawned for every request made. Each if this thread tries to service all the actions performed on the page.
    For eg : if i click on Enable and the Disable in my application, the flow is like:
    1. Thread 1 goes into the enable handler
    2. A new Thread 2 goes into the enable handler
    3. Thread 1 returns from enable action
    4. Thread 1 goes into the disable handler
    5. Thread 2 returns from enable handler
    6. Thread 1 returns from disable handler.
    7. Application crashes.
    Can anyone please explain this flow?
    Thanks,
    Mahajan.

  • Javascript embedded in button pl/sql event handler not being executed

    Javascript calls not working from pl/sql button event handler. What am I missing? Are specific settings needed to execute javascript from pl/sql proceedures?
    Example: Want to toggle target='_blank' off and on in a button pl/sql event handler to open url call in new window & then reset when processing submit is done & the app returns to the form.
    portal form button's pl/sql submit handler:
    begin
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    end ;
    Putting the following in the button's javascript on_click event handler works great:
    this.form.target='_blank'
    to force opening new window with a call in the button's submit pl/sql code via:
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    but then the target='_blank' is left on when the submit is done & we return to the form.
    putting the above javascript as a function (called fcn_newpage) elsewhere (e.g., after form opens) & calling in the submit pl/sql with
    htp.p('fcn_newpage') ;
    also doesn't work.
    Metalink thought this was an application issue instead of a bug, so thought I'd see if anyone knows what's going wrong here. (Portal 9.0.4.1)

    thanks for your discussion of my post.
    Please clarify:
    "htp.p('fcn_newwindow') sends a string":
    What would you suggest the proper syntax for a function fcn_newwindow() call from a pl/sql javascript block that differs from
    htp.p('<script language="Javascript">') ;
    htp.p('fcn_newwindow');
    htp.p('</script>');
    or more simply
    htp.p('fcn_newwindow') ;
    More generally, what I'm trying to figure out is under what conditions javascript is executed, if ever, in the pl/sql of a button (either the submit or custom event handler, depending on the button).
    I've seen lots of posts asking how to do a simple htp.p('alert("THIS IS TROUBLE")') ; in a pl/sql event handler for a button on a form, but no description of how this can be done successfully.
    In addition to alerts, in my case, I'd like to call a javascript fcn from a pl/sql event handle that would pass a URL (e.g., http://www.oracle.com) where the javascript fcn executed
    window.open(URL). The API call to set_target(URL) in pl/sql has no ability to open in a new window, so calling that is inadequate to my needs and I must resort to javascript.
    Its clear in the PL/SQL of a button, you can effect form components since p_session..set_target & p_session.get_target set or get the contents of form components.
    So to see if javascript ever works, I tried to focus on something simple that only had to set what amounts to an enviromental variable when we returned to the form after a post. I chose to try to change the html value of TARGET from javascript in the PL/SQL button because it doesn't need to be implemented until we finish the post and return to the form.
    So I focused on a hack, setting this.form.TARGET='_blank' in the on_click event handler that forced every subsequent URL call or refresh of the form to be a new window. I then wanted to turn off opening new windows once I'd opened the URL call in a new window by setting TARGET='' in the portal form. I can achieve what I want by coding this.form.TARGET='' in the javascript (on_focus, on_change, or on_mousedown, ...) of every form component that might refresh the form. However, that is a ridiculous hack when a simple htp.p('<script>') ; htp.p('this.form.target=""') ; htp.p('</script>') ; at the end of the button's pl/sql event handle should do the same thing reliably if javascript ever works in the pl/sql event handler.
    If we didn't have access to form components through p_session calls, I'd assume it was a scope issue (what is available from the pl/sql event handler). But unless my syntax is just off, when, if ever, can javascript be used in a portal form's pl/sql event handler for a button?
    if I code a javascript funtion in the forms' pl/sql before displaying form:
    htp.p('<script language="JavaScript">') ;
    htp.p('function fcn_new_window(URL)') ;
    htp.p('window.open(URL)' ) ;
    htp.p('</script>') ;
    the function can be called from a button's on_click javascript event handler:
    fcn_new_window('http://www.oracle.com')
    but from the same button's pl/sql submit event handler this call doesn't work: htp.p('fcn_new_window("http://www.oracle.com")')
    So my questions remain: Is there other syntax I need, or does javascript ever work properly from the pl/sql of a form button's event handler? If it doesn't work, isn't this a bug that should be fixed by Oracle?
    I can probably figure out hacks to make things work the way I need, but executing javascript from pl/sql event handlers seems to be the expected way to affect portal html pages (forms, reports, ...) and it seems not to work as expected. I don't feel I should have to implement hacks for something as simple as calling a javascript function from pl/sql when almost every example I've found in metalink or the forums or Oracle Press's "portal bible" suggests using javascript from pl/sql via the utility htp.p() to effect web page components in portal.
    My TAR on the subject, while still open, returned the result basically: "We can reproduce your situation. Everything looks okay to us, but we can't explain how to use javascript where you want or point you to any documentation that would solve your problem or expain why it should not work the way you want it to. We don't feel its a technical issue. Why don't you post the problem on the portal applications forum."
    I'm hoping I'm just missing something fundamental and everything will work if I implement it a little differently. So if anyone sees my error, please let me know.
    by the way, not sure this is germain, but in reference to your comment:
    "redirections in pl/sql procedures give a peculiar result. in a pl/sql procedure, usually, portals give the last redirection statement and ignore anything else coming after it."
    if I try to raise an alert:
    htp.p('alert("you screwed up")');
    return;
    in a pl/sql event handler, it still doesn't raise the alert, even though its the last thing implemented in the event handler. But if I set the value of a text box using p_session..set_value_as_string() at the same spot, it correctly sets the text box value when I return to the form.

Maybe you are looking for