OnClick javascript.

L.S.
I implemented a master-detail relationship in my app using the following lines of code in the onClick Javascript property of a hyperlink in a table:
window.open(�/Fitwise/faces/OnderneminDetails.jsp?idBedrijf=#{currentRow.value[�bedrijf.idBedrijf�]}�, �_blank�, �height=432, resizable=yes, scrollbars=yes, toolbar=yes, width=576�); return false;
This works fine. In the details page I get the idBedrijf from the parameter and set it as the value of a private property idBedrijf with its own getter and setter methods.
Now I would like to open another window when the user clicks an ImageHyperlink in the detailspage. For this to work properly I have to transfer the idBedrijf to that page. I used the following lines of code in the onClick Javascript property of the ImageHyperlink:
window.open(�/Fitwise/faces/ODLesrooster.jsp?idBedrijf=#{getIdBedrijf()]}�, �_blank�, �height=600, resizable=yes, scrollbars=yes, toolbar=yes, width=800�); return false;
This does not work. I suppose it is the getIdBedrijf() bit of code that is wrong, what do I have to replace it with to get the onClick thing working.
Thanks,
Annet.

Thanks for your reply yossarian,
I replaced the Image Hyperlink with a Hyperlink and got the code working. However I cannot figure out why it does not work when I use an Image Hyperlink. I replaced the code with the simple window.close(); return false; bit of code,of which I am sure it works fine with a Hyperlink, but when I run the project, clicking on the Image Hyperlink does not have any effect at all. I did use an Image Hyperlink with an action event on another occassion, but, since I would like to open a new window, I would rather use the onClick javascript option to implement this behaviour.
Any ideas what the problem is?
Thanks,
Annet.

Similar Messages

  • Nav onclick=\"JavaScript:GoNav with Filter in the target

    Hi together,
    I defined two requests. In the first request I call the secong with the following command:
    @[html]"<font class=Nav onclick=\"JavaScript:GoNav(event, '/shared/Entwicklung/Validierung/KNE/KNEB', '- KNE Gesamt Person', 'Person Kurzbezeichnung','"@"'); \"> "@" </font>" ;;@
    The second Reqest is prompted by 'Person Kurzbezeichnung'.
    BUT! the filter isn't populated :-(
    What I did wrong?
    Regards,
    Stefan

    a blank to much in the ' "@" ' and it will not work :-)
    I found it.
    Regards,
    Stefan

  • CommandLink onclick JavaScript

    How to add onclick JavaScript to commandLink ?
    Why commandButton has onclick method, but commandLink hasn't ?

    When you use <h:commandLink>, the JSF implementation must write the "onclick" event handler so that the form it belongs to is submitted with enough info to tell which link was clicked. If you could add your own code for "onclick", it could potentially disable the main functionality of the <h:commandLink>. Use <h:outputLink> instead if you want to override the "onclick" behavior.

  • Onclick javascript throws addtional characters

    HI,
    I tried below
    In column properties>>data format>>custom text format
    [html] {span class=\"Nav\" onClick=\"javascript:PortalPageNav(event,'/shared/report/DASHBOARD','page 1','Param PL','"Pl Line"','@')\">@ {SPAN>
    </span>
    when i try to export report in excel i can find addtional special characters-@ ';">
    my result comes like this
    @ ';">name1
    @ ';">name2
    can i know what is wrong in above code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    but when I click the add button on a particular item all 3 of the
    items are added to my shopping list. Can anyone tell me why? and if so how > > can I resolve this problem?I don't think that clicking the button is what is causing your problem. The following line of code is the problem:
    <td><a href="#"><img src="images/add.gif" width="47" height="19"
    border="0" name="addButton<%=product.getItemId()%>" id="<%=product.getItemId()%>"
    onMouseOver="MM_swapImage('addButton<%=product.getItemId()%>','','images/add_hover.gif',1)"
    onMouseOut="MM_swapImgRestore()"
    onclick="<%/*addNewItem(product.getItemId());*/ list.addItem(new Integer (product.getItemId()));%>
    window.parent.location.reload(false);"></a></td> When you are trying to create the onClick, you are invoking list.addItem. You are doing this for each item. By the way, I don't think the resulting onClick will actually do anything. It will evaluate to the item id and nothing will happen. You need to trigger a request to the server here (e.g. by submitting a form and including the correct item id).

  • Navigation Bar OnClick JavaScript Problem

    I tried to create a Navigation Bar to pop up a online help documentation. The sample application can be seen at
    http://apex.oracle.com/pls/otn/f?p=27294:1
    When I debugged the application, I found that the link of Help Navigation Bar points to "http://apex.oracle.com/pls/otn/f?p=27294:#:432121301146634::NO:::"
    not as what I defined on OnClick JavaScript for the navigation bar. The Help Window won't pop up.
    Please help. Thanks.

    Have a look at the following post:
    how to create a popup help page in html db

  • HTML DB OnClick Javascript

    Hi everybody,
    At the end of my link, I add "TARGET=BLANK" to open a new window and
    With OnClick Javascript, I have window.blur() window.print()
    Is it possible to combine those window ?
    Thank you. Bye.

    Thanks Vikas,
    I will explain to you. I work with version 1.6. I have a navigation bar entry name "Print Version". When I click on this entry: I want a new window appears and get the focus on this new page. Also, I want to get the printer options popup. On my link, I put a TARGET=BLANK at the end to open a new window. Also on "OnClick Javascript'', I wrote window.blur() window.print(). Window.blur() to get off the focus on the current page and give it to the new window. After this, with window.print(), I want the printer options to popup. My question is: Is it possible to combine many window.xxxxxx.
    Thank you. Bye.

  • OnClick JavaScript error

    I have made several changes to my nav bar through Fireworks
    and exported, which I have done a million times, but this time when
    I inser Fireworkd HTML image it gives me the following message:
    While executing onClick in Fireworks HTML.htm, the following
    JavaScript error occurred:
    At line 438 of File C:\Program Files\Macromedia\Dreamweaver
    MX 2004\Configuration\Shared\MM\Scripts\InsertFireworksHTML.js":
    TypeError: menuFn.match(searchPatt)has no properties.
    I should tell you we have two sites we are putting this in.
    One to test pages and one that is live.
    Any help would be great!
    BigD

    Don't use FW menus.
    You can try this simple fix -
    Quit DW.
    Find this folder -
    C:\Documents and Settings\<username>\Application
    Data\Macromedia\Dreamweaver
    8\Configuration\WinFileCache-*.dat
    (these folders are normally hidden - you may have to use
    Explorer > Tools >
    Folder Options to unhide them)
    or on Mac -
    Library/Application Support/Macromedia/Dreamweaver
    8/Configuration/MacFileCache-*.dat
    and delete it.
    Restart DW. Works better?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "BigD05" <[email protected]> wrote in
    message
    news:es6jpt$551$[email protected]..
    >I have made several changes to my nav bar through
    Fireworks and exported,
    >which
    > I have done a million times, but this time when I inser
    Fireworkd HTML
    > image it
    > gives me the following message:
    >
    > While executing onClick in Fireworks HTML.htm, the
    following JavaScript
    > error
    > occurred:
    > At line 438 of File C:\Program
    Files\Macromedia\Dreamweaver MX
    >
    2004\Configuration\Shared\MM\Scripts\InsertFireworksHTML.js":
    TypeError:
    > menuFn.match(searchPatt)has no properties.
    >
    > I should tell you we have two sites we are putting this
    in. One to test
    > pages
    > and one that is live.
    >
    > Any help would be great!
    >
    > BigD
    >
    >

  • OnClick Javascript Error in DW CS4

    Hi. I can't do roll overs. Whenever I try to select the first image, this alertbox appears with this message, "While Executing onClick in Rollover.htm, the following Javascript Error Occurred: In file "Rollover": exception thrown in native function.
    What does this mean and how do I fix it?

    It usually means that your site cache has become corrupted.
    Troubleshooting JavaScript errors in Dreamweaver
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19105#dat
    Try #4 first.

  • WebHelp OnClick Javascript problem

    Hello there,
    I wanted to insert an email feedback link into my webhelp file.
    So in my Master Page I added the following link in the header of the page:
    <a href = "Send feedback" onClick="parent.location='mailto:[email protected]?Subject=blah blah'"> </a>
    It works fine. THe link is displayed on all pages and when I click on it an email is generated. Problem is after I click on the link in webhelp, the page in the right of the frame i.e. the topic I'm viewing is refreshed and it says "Internet Explorer cannot display the webpage".
    Any ideas how I can fix this?
    Thanks

    Thanks,
    It doesn't work at all with that hehe
    It's a bit annoying basically I've found some javascript that should in theory allow me to let a user submit feedback and it will send the title of the page they are viewing. This is how its meant to work:
    <head>
    <script type="text/javascript">
    function getFileName() {
    //this gets the full url
    var url = document.location.href;
    //this removes the anchor at the end, if there is one
    url = url.substring(0, (url.indexOf("#") == -1) ? url.length : url.indexOf("#"));
    //this removes the query after the file name, if there is one
    url = url.substring(0, (url.indexOf("?") == -1) ? url.length : url.indexOf("?"));
    //this removes everything before the last slash in the path
    url = url.substring(url.lastIndexOf("/") + 1, url.length);
    //return
    return url;
    function EmailLink()
    topictitle=getFileName();
    document.write(topictitle);
    window.location = "mailto:[email protected] "+" ?subject= Re: Web Analytics help - "+ topictitle;"sometitle"
    </script>
    </head>
    <FORM>
    <a href = "E-mail" onClick="EmailLink()">Email </a>
    </FORM>
    So it works fine from within a web browser...but for some reason - it won't work from within webhelp when it's embedded into my master page

  • Onclick javascript confirm for commandlinks

    Pre JSF 1.2, there was no onclick for commandLinks. Below is some javascript I wrote to dynamically pre-pend a confirm javascript call before the onclick submit event is called. I use this so that my delete links in my application pop up confirm dialogs before actually doing the submit. (I am unable to upgrade to JSF 1.2) I hope this helps someone else experiencing the same problem.
    Comments and suggestions are always welcome!
    You need to wrap your commandLink components with some kind of tag:
    Example: <span name="deleteButton" confirm="#{itemTitle}"><commandLink... /></span>
    Also, you need to add pageConfirmLoader as a function to be executed on window load.
    var ConfirmLoader = {
         init : function(tag, tagName) {
              this.tag = tag;
              this.tagName = tagName;
         load : function() {
             if(this.tag != null && this.tagName != null) {
                   var spans = document.getElementsByTagName(this.tag);
                   var spansLength = spans.length;
                   var confirmHelper = {
                        functs: [ ],
                        descs: [ ],
                        confirmDelete: function(event) {
                             var loc = event.target.parentNode.parentNode.id;
                             var confirmText = "Are you sure you want to delete this item?";
                             if(this.descs[loc] != null) {
                                  confirmText = "Are you sure you want to delete '" + this.descs[loc] + "' ?"
                             if(confirm(confirmText) ) {
                                  eval(this.functs[loc](event));
                   for (i = 0; i < spansLength; i++) {
                        if (spans.getAttribute('name') == this.tagName) {
                             confirmHelper.functs[spans[i].id] = spans[i].childNodes[0].onclick;
                             confirmHelper.descs[spans[i].id] = spans[i].getAttribute('confirm');
                             spans[i].childNodes[0].onclick = function(event){ confirmHelper.confirmDelete(event); };
    function pageConfirmLoader() {
         ConfirmLoader.load();
    ConfirmLoader.init('span', 'deleteButton');

    I have one missed attribute: the wrapping span tag also needs some kind of id assigned to it, so the javascript ConfirmLoader can insert the values into the correct locations.
    <span name="deleteButton" confirm="#{itemTitle}" id="#{iter.nextId}" ><commandLink... /></span>

  • Onclick javascript, catching mouse clicks

    Hello Forum,
    I have a page, let's say "page 1" with an interactive report and a column link.
    After a onclick event a page submit will be fired and i will be redirect to a new page, let's say "page 2".
    When i click now a second time at the column link on "page 1" (not a ondblclick event), before the page branches to "page 2", i will get an error.
    This is because there is a unique constraint violation with the building of collections on "page 2".
    As work around, i have the following idea but no solution for this idea.
    If someone clicks more than once, i want to catch every mouse-click on this column link as "void(0)" means "do nothing".
    In summary:
    the first mouse-click should be ok, the second, third, etc should do nothing.
    I guess ondblclick event is not a the right way to handle this issue.
    Because when someone clicks and he will wait for two seconds and then he clicks again before the page is branching,
    then we don't have a dbclick event, but the error is still coming.
    Does anybody have an idea to realize this task.
    Regards Stefan

    You should be using the nice existing apex properties
    See this http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldr_pg_edit_att.htm#HTMDB25159

  • Apex generating javascript to disable button onClick

    I have navigational buttons in a region to go, for example, to the "Next" page.
    APEX is including:
    onClick="javascript:this.disabled=true;"
    as part of the "Next" buttons attributes.
    So that after the user clicks the "Next" button and goes to the next page,
    if they click the browsers Back button, the "Next" button is indeed disabled.
    The Next button is disabled in FireFox but remains enabled in IE. Thus causing
    confusion for the user using FireFox.
    So I'd like to have APEX not generate this javascript at all.
    Is there a way to turn that off? Some switch on the page/region/button that I'm
    not seeing?
    Or is this just the old browser back button problem?
    Thanks in advance.

    I have processes that make calls to packages on the back-end so I don't know if importing it into the Oracle Apex hosted environment will work.
    This may or may not help but these are the page by page steps I took in creating these buttons.
    1- Click the "Create" button icon in the "Buttons" area in the "Page Rendering" column.
    2- "Select a region for the button:" (Gave it an existing region to reside in).
    3- Choose: "Create a button in a region position"
    4- Give it a Name and a Label. Click "HTML Button". Leave the default "Submit Page and Redirect to URL".
    5- Choose a Region Position, Sequence, Alignment (under "Button Attributes" is where I assigned it a style but NOT for this button).
    6- Choose a page to branch to.
    7- Click "Create button". (no display condition chosen if you clicked the Next button).
    8- Run Page
    9- View the Source
    There it is:
    <input type="BUTTON" value="Test" onClick="javascript:this.disabled=true; doSubmit('TEST');" >
    and it also creates the Branch that redirects to the page I specified based on the buttons name (I think it uses name, still a little new to this).
    so i dunno. 8-( Just wondered if that sequence of events seems normal.

  • Javascript onClick help

    I have two radio buttons with corresponding text boxes for input, when one is chosen I am disabling the text box for the other, is there a way to "gray out" the disabled text box using background-color or something? Any help is greatly appreciated, nothing I've tried has worked. Right now my onClick looks like this:
    onClick=javascript:document.UserReg." + TEXT_ACCOUNT_NBR + ".disabled=true

    Pavel,
    The NULLing part isn't working. I have the submit as you suggested and when the checkbox is clicked the fields populate at expected, however, when I uncheck the checkbox the fields are not clearing.
    Here's what I have:
    document.getElementById('P1_BILL_COMPANY').value = "";
    document.getElementById('P1_BILL_ATTENTION').value = "";
    document.getElementById('P1_BILL_ADDRESS').value = "";
    document.getElementById('P1_BILL_CITY').value = "";
    document.getElementById('P1_BILL_STATE').value = "";
    document.getElementById('P1_BILL_ZIP').value = "";
    document.getElementById('P1_BILL_PHONE').value = "";
    I have also tried NULL, null, and two single quotes ''.
    What am I doing wrong with this part?
    Thanks,
    Joe

  • Hyperlinks cannot be configured to use "onclick" for javascript - causes failure in some browsers

    When you tell Muse a hyperlink points to a javascript function it uses a direct href to invoke it rather than using the "onclick" attribute. Although there are philosophical debates about which is better, they should both do the same thing. i.e.
    <a href="#" onclick="javascript:window.open('http://www.google.com','','scrollbars=yes,width=720,height=700')">onclick</a>
    <a href="javascript:window.open('http://www.google.com','','scrollbars=yes,width=720,height=700')">href</a>
    - should do the same thing, and open a separate window to display the content.
    Trouble is, for some of the most popular browsers, they don't. In Chrome, they both do the same thing, but In IE8, and Firefox 24.x they don't. The href version opens a popup OK, but the original window goes blank. It probably varies between browsers and versions (and the correct behaviour is that it should work), but the bottom line is that the onclick method works all the time.
    IT would be ideal if you could choose if the hyperlink uses onclick or href to call the javascript, perhaps in the same submenu that lets you select opening in a new window.

    Boot into Recovery by holding down the key combination command-R at the startup chime. Release the keys when you see a gray screen with a spinning dial.
    Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with networks that require any kind of authentication other than a WPA or WPA2 Personal password.
    From the Recovery screen, select Get Help Online. A clean copy of Safari will launch. No plugins, such as Flash, will be available. Test. After testing, reboot as usual and post the results.

  • Checkbox and javascript onClick

    I have defined an sql region with the following query:
    SELECT HTMLDB_ITEM.CHECKBOX(1,serviceid) " ",
    servicedescription
    FROM service
    where coid = :P1_COID
    ORDER BY 2
    Although I read a few threads and Howtos about Javascript I didn't achieve my goal to redirect (submit) the page to itself everytime the checkbox is changed. I tried to manage this by setting
    onClick="javascript:doSubmit('Submitted');"
    in the element attribute of the serviceid column but with no success.
    Besides this I would like to analyze which checkbox (service) is checked. According to the selected services different regions should be shown/hidden on the page. May be someone could point me to the right direction.
    Thanks Tobias

    I solved it by myself...
    Tobias

Maybe you are looking for

  • How can I get Adobe Media Gallery for Bridge CS3

    I want to create an online photo gallery for 3rd party client proofing. I am using a reference book byScott Kelby (the editor of 'Photshop User' magazine) and he refers to Adobe Media Gallery: ( Bridge CS3 / Windows / Workspace / Adobe Media Gallery)

  • ¿What's the best iPhone 6 model to use in USA, Mexico and New Zealand? I am guessing the Model A1524

    I'm a traveler who uses the phone in different countries with a local SIM card (with an unlocked iPhone).  I mainly need to use the phone in USA, Mexico and New Zealand.  Occasionally in Europe but mostly on those 3 countries.   I can see the iPhone

  • Help M4868 21" Apple Studio Display software needed

    Hi all. I know this post is a little out of category but I need to find out where I can get a Manual and any software required to use an M4868 21" Apple Studio Display with my G5 Powermac. Can anyone help me on this one please... Cheers. Derek.

  • Major Safari bug re: private browsing

    Hi everyone, I'm encountering a major bug in Safari's private browsing mode. Basically, after you exit Safari, even if you close all previous tabs and use Settings to clear the cache, after you return again to Safari's private browsing mode it briefl

  • FAGL_FC_TRANS for Fixed Assets

    SAP experts, We are doing FC Valuation and translation for a  foreign subsidiaries to report US GAAP . ( FAGL_FC_VAL for FC valuation followed by FAGL_FC_TRANS for Translating the group currency with spot/avg  raye for BS and PL respectively). Confiu