Java script popup functionality not working on af:commandLink

Hi,
i am having a strange problem with java script
i have defined the following commandlink in an af:table
<af:commandLink
text="lockUser"
disabled="#{!bindings.lockUser.enabled}"
id="cl1"
partialTriggers="cl1"
action="#{searchBean.lockUser}">
<af:clientListener method="onlock1" type="click"/>
</af:commandLink>
I have defined the following java script function.
<f:facet name="metaContainer">
<af:resource type="javascript" >
function onlock1(){
if(confirm("Do you want to cancel")){return true;}
else {
return false;}
</af:resource>
</f:facet>
when i click on the link, the dialog box appears asking if i want to cancel: when i press yes still the link action is activated. Kindly suggest where i am going wrong.
the behaviour i need is to if cliked on yes then the link action does not activate and nothing happens. if i press any other button the link functionality should be activated and it should perform the locking functionality

<!-- TWO STEPS TO INSTALL LINE WRAPPER:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function showLines(max, text) {
max--;
text = "" + text;
var temp = "";
var chcount = 0;
for (var i = 0; i < text.length; i++) // for each character ...
var ch = text.substring(i, i+1); // first character
var ch2 = text.substring(i+1, i+2); // next character
if (ch == '\n') // if character is a hard return
temp += ch;
chcount = 1;
else
if (chcount == max) // line has max chacters on this line
temp += '\n' + ch; // go to next line
chcount = 1; // reset chcount
else // Not a newline or max characters ...
temp += ch;
chcount++; // so add 1 to chcount
return (temp); // sends value of temp back
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<>
<form name=form1>
<textarea name=text1 rows=15 cols=50>This is just an example of a long textbox entry that just went on and on and on and on</textarea><br>
<input type=button value="Wrap Lines to 50 Spaces"
onClick="this.form.text1.value = showLines(50, this.form.text1.value)">
<br><br>
<textarea name=text2 rows=15 cols=50 wrap=virtual>This is another example, but this time the textarea box has the "wrap=virtual" attribute, which makes each line wrap in the box rather than scrolling out the right side. The script also correctly deals with this type of box. Like before, notice that hitting <enter> after each line, like this:
This is on another line
And so is this one.....
Still wraps correctly. Neat!</textarea><br>
<input type=button value="Wrap Lines to 50 Spaces"
onClick="this.form.text2.value = showLines(50, this.form.text2.value)">
</form>
</center>
Edited by: user7236892 on May 6, 2011 11:45 PM

Similar Messages

  • Web Analysis functions not working in Workspace

    I am looking for a list of Web Analysis functions that are available in the Java client that will not work in the Workspace DHTML client (Version 9.3.1.0). Any guidance would be appreciated.

    There are 4 types of differences:
    - font differences, Workspace (DHTML) uses the WA Server fonts whereas WA Studio client machine fonts.
    - Service Buttons are very restricted using Workspace
    - Display: Tab selection, Splitter panels, Slider selection do not render in Workspace
    - Cannot restrict WA Tools menu in Workspace at all, where you can in the Studio.
    For exact details check out the Hyperion Web Analysis Studio User’s Guide from the Doc Library:
    http://download.oracle.com/docs/cd/E10530_01/doc/nav/portal_4.htm
    Cheers
    Iain

  • Java 7 Update 11 Not Working with Firefox

    For me, the problems described in the thread "Java 7 Update 10 Not Working with Firefox? " Java 7 Update 10 Not Working with Firefox?
    are continuing with Java 7 Update 11.
    Windows 7 64 bit
    Firefox 18
    The problem is that "Java(TM) Platform" is missing from the plug-in list.
    I've uninstalled Java 7 Update 11 and reinstalled Java Update 9 which correctly installs the plugin and restores Java functionality which was broken immediately upon installing both Java 10 & 11.

    981243 wrote:
    So why not using Ju11 ? You can workaround the issue. It would sucks but still be safer than using Ju9.
    Also ask Mozilla forums if Firefox has options where to search for plugins.
    Or try 64-bit Firefox.As I explained in both threads ...
    Java 7 Update 10 Not Working with Firefox?
    Java 7 Update 11 Not Working with Firefox
    ... neither jre7u10 nor jre7u11 are working ... and they are BOTH broken with the same problem ... "Java(TM) Platform" pliugin is missing from the plug-in list. It cannot be enabled, because it simply is NOT there. A suggestion was made the jre7u12 will be the "fix" for this issue ... so I installed the Update 12 Preview and it sis ALSO broken, no "Java(TM) Platform" in the plug-in list.
    The ONLY Java version that actually works for me is jre7u9.
    As far as installing Firefox 64bit ... I see no future in installing a browser that has been discontinued.
    http://www.computerworld.com/s/article/9233976/Mozilla_suspends_work_on_64_bit_Firefox_for_Windows
    Even though Mozilla relented due to backlash, I continued development will be a somewhat low priority.
    http://www.computerworld.com/s/article/9234997/Mozilla_compromises_on_x64_Firefox_after_user_backlash

  • Not able to sign into Blackberry Protect. Backup and Restore function not working. "Your device isn't associated with a Blackberry ID"

    Not able to sign into Blackberry Protect.  Backup and Restore function not working. Message is: "Your device isn't associated with a Blackberry ID."  My Blackberry Messenger and Blackberry World is working fine so I am sure its not an ID issue on the phone.  I can sign into Link, Blackberry.com and Protect.  I see my device in Protect but cannot send messages or view it on a map.  Times out with cannot reach device message.  BB Protect on Device has a swirling circle beside the on/of switch.  Cannot turn off.  
    I have deleted Link and re-installed.
    I have reset phone to default(factory) and signed in. 
    OS level is 10.2.1.3062
    BB Link is 1.2.3.56
    Solved!
    Go to Solution.

    I managed to figure this out myself. I had to delete the device from the Blackberry Protect website.  protect.blackberry.com.  I wiped my device again and signed in with my Blackberry ID.  I dont know if the step of wiping was necessary as I did not try my backup with the current configuration on the device following the delete.  Restore is in progress for me!

  • Exceptions in popup blocking not work good

    why sub-domains in exceptions in popup blocking not work? if i add a particular subdomain it works, but when i add an star in subdomain to do for all not work:
    *.mihanblog.com
    *.blogfa.com
    //// Please add image upload on post feature to Firefox's support ////
    //// Also add a suggestion forum to Firefox's support (like Chrome's forums) ////
    Thanks

    Do not add a * because Firefox doesn't support wildcard that way.<br />
    Just specify the domain to apply the exception to a domains and all sub domains.
    *Bug 336207 - Add wildcards to cookie exceptions list to permit subdomains if all cookies are blocked

  • Copy/paste function not working in Firefox 22. Always good in previous versions

    Copy/paste function not working in Firefox 22. Always good in previous versions editions

    Well I've uninstalled FF22, thanks for the suggestion.
    Chrome works perfectly with ZA and C&P.

  • I'm running OS X Yosemite, Version 10.10 My Adobe Illustrator CS6 is not opening. I have install the legacy Java SE 6 runtime, not working

    I'm running OS X Yosemite, Version 10.10 My Adobe Illustrator CS6 is not opening. I have install the legacy Java SE 6 runtime, not working
    Also when I click on More Info... button I  I get support.apple.com  website page, which is blank.  When I click on the OK button, same result.
    I need help with this,  is anyone  out there experiencing the same phenomena?

    How about this one
    Apple Java for Mac | MacUpdate
    or
    Java for OS X 2014-001

  • Why is the scroll function not working after accessing the voice feature in settings?

    Why is the scroll function not working after accessing the voice feature in settings?

    For some prerecorded audio files the Transpose slider will not work reliably. I found no clear pattern, when it does and when not.
    If all fails, create a loop from the audio file. Select the region in the track and use the command "File: Add region to Loop library".
    Set the current key and tempo, name the loop, and save the loop.
    Now add it from the loop browser to a new track and delete your old track. The search field in the Loop browser will help you to find the loop quickly.
    You will be able to transpose the sample as described above, like a regular loop.
    For example - a audio file turned into a loop and transposed:

  • Enabling Global Script Protection is not working while adding "&"

    Hi All,
    To prevent crosssite scripting attacks I ticked the the check box "Enable Global Script Protection" in CF admin. But it is not working , I mean not able to prevent the scripting attacks.
    Steps I followed
    1] I executed the below URL.
         https://xyz.abc.com/index.cfm?cardholder_number=&<script>alert(1)</script>
    2] In the fornt end I got a javascript alert message as injected in the URL.
    But this alert message should not come as I have enabled script protection in CF admin. Right????
    Now I removed "&" (https://xyz.abc.com/index.cfm?cardholder_number=<script>alert(1)</script>) from the above URL  then I was not getting the javascript alert message. Does this mean that script protection will not work if we are adding "&" to the URL????.
    I searched the neo-security.xml and its looks like below.
    <var name='CrossSiteScriptPatterns'><struct type='coldfusion.server.ConfigMap'><var name='&lt;\s*(object|embed|script|applet|meta)'><string>&lt;InvalidTag</string></var></st ruct></var>
    Can any one help me out to fix this.

    Abdul L Koyappayil wrote:
    But still one doubt remains why alert message is coming only when there is "&" in the URL??
    This happens with "&" because it is a special Javascript symbol whose purpose is to delimit - that is, separate - the key-value value pairs in the URL's query-string. For example, in the URL www.myDomain.com/index.cfm?a=1&b=2, the "&" delimits the query-string into the 2 key-value pairs
    a=1
    b=2
    Let us then consider the case where the URL is www.myDomain.com/index.cfm?cardholder_number=&<script>alert(1)</script>. The & will delimit the query-string into
    cardholder_number=
    <script>alert(1)</script>
    The presence of '&' implies there are 2 variables. However, there is only one '=' sign, which means there is just one key-value pair. In addition, cardholder_number is a legal name for a URL variable, whereas <script>alert(1)</script> is not. The browser therefore sends the following query-string to your application
    cardholder_number=EMPTY_STRING&<script>alert(1)</script>
    However, Coldfusion's scriptprotect feature will intervene and neutralize this to
    cardholder_number=EMPTY_STRING&<invalidtag>alert(1)</script>
    which is harmless. These will enter into Coldfusion as the URL variables
    cardholder_number=EMPTY_STRING
    EMPTY_STRING=EMPTY_STRING
    The special nature of '&' as delimiter is what prompts the browser to run the script. In fact, by default, browsers will run any Javascript that you place in the query-string. Run this, for example
    http://www.myDomain.com/index.cfm?<script>alert(1)</script>
    But what reason will I say if they are asking me why javascript alert is coming then.
    As you have just seen, the <script> tag cannot come in. The alert occurs at the browser - that is, at the client - but Coldfusion runs at the server. Communication between client and server is by means of the URL variables that the client sends to the server. For the attack to be effective, it has to be sent in the form
    sneakyVar=<script>alert(1)</script>
    That is not the case here.

  • MDX -Children count function Not working in Case statement

    Hi,
    I am trying to create set when you slice with the Hierarchy member is leaf level , I want a output only that Leaf level .
    and When I slice with  the parent level , it has to give all the members below that parent level.
    But the problem here is when I select child member or leaf member , The first condition in the Case is not working
    WITH SET
    TESTSET AS
    CASE
    WHEN
     [Dimension].[Hierarchy].currentmember.children.count<0
    THEN
     [Dimension].[Hierarchy].currentmember
    ELSE
     DESCENDANTS([Dimension].[Hierarchy].Currentmember,,AFTER)
    END
    SELECT
    WBSSET ON 1,
    {} on 0
    FROM
     (SELECT {[Dimension].[Hierarchy].&[10]} ON COLUMNS FROM [CubeName])
    Thanks,
    Santosh

    Hi Santosh,
    I don't think Children count function not working in case statement, I have tested it on my local environment, here s the sample query for you reference.
    with member
    testset as
    case
    when
    [Geography].[Geography].currentmember.children.count<10
    then "X"
    else "OK"
    end
    select testset on 0,
    {[Geography].[Geography].[Country].members} on 1
    from
    [Adventure Works]
    In your scenario, the issue might be caused by the query isself, you can try to use IsLeaf Funcion to achieve your requirement. Please refer to the links below.
    http://msdn.microsoft.com/en-us/library/ms144932.aspx
    http://www.databasejournal.com/features/mssql/article.php/3633696/MDX-Operators-The-IsLeaf-Operator--Conditional-Logic-within--Calculations.htm
    http://www.mdxpert.com/Functions/MDXFunction.aspx?f=22
    Regards,
    Charlie Liao
    TechNet Community Support

  • Palm Desktop 6.2.2. and Lookup function not working in Windows 7

    Palm Desktop's lookup function not working in Windows 7 64bit. Please help.
    Post relates to: Centro (Verizon)
    This question was solved.
    View Solution.

    I was able to solve this by unchecking compatibility mode and setting the application to run as administrative.

  • How to detect whether browser's java script  disabled or not from server

    How to detect whether browser's java script disabled or not from server side

    I would use a hidden parameter created by a javascript. if this is null, javascript is disabled...

  • Send & Recieve functionality not working with  WebDav after installing Acrobat XI

    Send & Recieve functionality not working with  WebDav after installing Acrobat XI for PDF.  Acrobat XI is complete installations(Trial Version).

    Hi Kiro ,
    Did you try opening that file in any other browser ?If not ,please try doing that once and see if that  works for you.
    Try Repairing Acrobat once and see if  that helps.
    Launch Acrobat>Navigate to Help>Repair Acrobat Installation.
    Regards
    Sukrit Dhingra

  • Keyboard + mouse functions not working

    After updating InDesign CC 6-days ago started to have issue with all keyboard + mouse functions not working ex. shift key does not constrain proportions when scaling. A restart fixed the issue thr first time. Today I have installed latest update and shut down and restarted several times does not fix issue. On a MacBook pro running OS X Mavericks 10.9.2.

    Disconnected extrenal devices ie keyboard and Wacom Bamboo tablet and restarted computer seemed to correct the issue.

  • In my ipad zoom function not working..some day before it worked,but when i double pinch with my three fingers it zooms negligible, wat to do?plzz help me..

    In my ipad zoom function not working..some day before it worked,but when i double pinch with my three fingers it zooms negligible, wat to do?plzz help me..

    It works when I reset my all settings...
    Settings>general>reset>reset all settings
    It never delete ur all contacts and any others,but ur wallpaper and wifi connection will change..it can be as before...

Maybe you are looking for

  • How do I make a JTable's header sorting actually change the actual table?

    How do I make a JTable's header sorting actually change the actual table? Currently, I'm using table.setAutoCreateRowSorter(true);to allow the user to sort the table. However, I want to be able to load something based on the selected row's index. The

  • How to create new line in actionscript 3

    I have this simple script that is suppose to take a comma seperate values from xml and make it into something similar to a unordered list if only i could get a "\n" to work. Here is my script.    var dont_forget:Array = myXML..dont_forget[n].split(",

  • Runtime Error in VL01N after upgrade from 4.6c to ECC 6.0

    hi,     We are doing a upgrade project from 4.6c to ECC 6.0 and when we are running the VL01n tcode and as soon as we hit enter in easy access screen its throwing a runtime error as " The key of internal table "XLIPS" contains components of type  'X'

  • How to Debug routine in Infopackge

    Hi All,   I have an ABAP routine in the Infopackage. How can I debug the code. Thanks. Regards, bw_newbie

  • Problem with Serializable JDO objects containing Hashtables

    Hi, I have a simple JDO object which contains a Hashtable and I would like to declare as Serializable. It seems though, that whenever I serialize this object, I get a NullPointerException. I've written a bare-bones test case and reproduced the except