Hyperlinks (target="_blank") and buttons on same page problem.

Another interesting problem.
I have a hyperlink that is set to open in a new window (target='_blank') and execute the 'hyperlink1_action' on the server.
The framework executes the javascript function 'hyperlink_submit' (in the formElements.js library) when a hyperlink is clicked. This function sets the 'target' property on the form and also creates a hidden field that identifies the hyperlink that was clicked.
This works fine and a new window open up with the required data.
However, now if I click a BUTTON on the ORIGINAL page, a NEW WINDOW pops up and the WRONG DATA is displayed due to the form target setting and hidden field that were created by the 'hyperlink_submit' function called prevously - ie. the changes to the form made by the 'hyperlink_submit' function are NOT rolledback/overwritten when the button is clicked. How annoying!!!
Am I doing something completely wrong or what?
Anyway, I feel better now. Have a nice day!
Message was edited by:
thepigs2
OK. In the absence of any replies, I've come up with this superhack that I put at the end of the page which fixes the form...
<f:verbatim>
<script>
var f = document.getElementById('form1');
f.oldsubmit = f.submit;
f.submit=function() { setTimeout(function(){resetForm(f);},250);return f.oldsubmit(); }
function resetForm(f)
f.target='';
for( var i=f.childNodes.length-1; i >=0; i-- ){
var n = f.childNodes;
if (n && n.name)
if (n.name.indexOf('_submittedField')>-1)
f.removeChild(n);
</script>
</f:verbatim>

Guillaume,
The built-in tabular form feature only supports one tabular form on each page. You'll have to put the two forms on separate pages. Or use simple reports as the detail reports with edit links to an edit form page.
Regards,
Marc

Similar Messages

  • Everytime I try to pay with my cc on paypal, I enter all of my infor and after I press the "review and confirm" button the same page reopens but has erased only my cc #, exp date and security cvv number. What could be wrong?

    b.stats.paypal.com : server does not support RFC 5746, see CVE-2009-3555
    This appears on my error page everytime I try to use my credit card through paypal. I enter all of my info (billing, etc..) and after hitting the "review and confirm" button the same page reappears and has erased my cc number and leaving my name and billing info. What can I do to finish my transaction?

    The message about CVE-2009-3555 is meant for webmasters to make them aware that they need to fix their servers.<br />
    Firefox 3.6 versions can detect such a misconfiguration and displays a warning in the "Tools > Error Console".<br />
    * http://wiki.mozilla.org/Security:Renegotiation
    You may have a problem with the PayPal cookies.
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    See also:
    * http://kb.mozillazine.org/Cookies#Removing_cookies
    * [[Cookies]]
    * [[Enabling and disabling cookies]]

  • Creation of new button on same page after insert command

    Hello All,
    I have an application running on apex.oracle.com where my workspace name is shruti_work,username is [email protected] and password is buwigi. The application name inside this is "app2"
    I am trying to achieve one functionality there but unable to get it so felt like seeking an help from experts here. I have two forms there one page1 form which is simplly made on an html region with go button which is navigating the page 1 items value to page 2 but simply passing their address witout updting the database table.
    In Page 2 i created page on a table or view, which made some extra buttons which i dont want like applychanges ,delete button, cancel button. I created a create button even which is updating my database with insert sql command. What i am seeing is after my create button is pressed i got navigated to same page 2 which i want to but the applychange button, cancel and delete button got appeared. I dont get the idea why it is so. i have checked the buttons even i didnt found anything there.
    All i want is when i press create button in page 2, my database get update and at the same page (2) a new button get appears which i have to use for other things. Approaching to this solution i created a button with giving databse action update and condition to this button "value of item in expression 1 is not null" and in expression 1 i passed p2_id...... but my new button is not getting created.
    Any help on this?

    Hi Jeff,
    I dont want applychanges button and delete button in my page 2. But when i created form on a table or view this but got created and i cannot delete it even. When i am navigating my page from page 1 to page 2 and filling the fields in page 2 and clicking create button, at that time i want after updating my table and running my plsql process which i have created which you can see in page processing, my button at same page get generate which i will use to navigate to other form. This button which i want to generate after clicking my create button will be meaningful only if my record get inserted in table. so that is why i want it at that time.
    I dont want any report so i am not creating form on a table or view

  • How to print Header and footer in same page

    Hi All,
    I am using Oracle Report 10g. How can I add header and footer on same page as my body? Right now when a generate a pdf file, it is printing individual pages instead of 1 one page. Please help me.
    Regards

    HI
    First of all,
    Unless otherwise you selected some option like page break after/before - both body and header/footer will print on same page in report, so in pdf as well.
    If you have difference on report and PDF that you should look into your setup.
    If you want more help, please be particular on your issue
    james. wrote:
    Hi All,
    I am using Oracle Report 10g. How can I add header and footer on same page as my body? Right now when a generate a pdf file, it is printing individual pages instead of 1 one page. Please help me.
    Regards

  • TARGET="_blank" in button URL?

    I have a printing servlet I want to call from a button. This works fine, but I need the link to open in new browser window, where the pdf can be shown. I have tried this for button URL:
    http:&#47;&#47;wmsi001494/rapportServlet/rapport?skemaId=&P71_SKEMA_ID. TARGET="_blank"
    But this does not work. Does anybody know how to get it working?
    Regards Pete

    I tried popupURL, popUp2, and window.open javascripts to open a window using a button. They work fine with HTML pages but fail when I try to open a PDF file.
    The URL I'm using to open the PDF references a function I created following the HOW TOs (e.g. download_my_file?p_file=#ID#). The only alteration I made to the HOW TO download function was to open the file instead of downloading (Content-Disposition: inline instead of attachment).
    Has anyone else had this problem or found a way to open a PDF file that is stored in the database into a new window using a button instead of a link? I should also mention that if I use a link (e.g. href="...download_my_file?p=file#ID#') it works, it just doesn't work if I have to use Javascript to open the file in a window.
    I really need to use a button instead of a link, but can't figure out how to make it work!
    Forgot to mention, the error message reads:
    "There was an error opening this document. This file cannot be found." It's an Adobe Acrobat error, but it opens fine when opened with a standard link.
    Thanks,
    ~Dan

  • How to refresh and redirect into same page after deleting a file

    Hi John,
    One more help I need. I implemented the brows and download file functionality in my application successfully. And I am interested to implement delete also like download. If user will click on download three options will come open, save, cancel in case of download. But like download I want to put delete link which will delete the corresponding file.
    I written the procedure in same fashion as download and compiled in my schema.
    The code is here:
    CREATE OR REPLACE PROCEDURE download_my_file_temp_delete (p_file IN NUMBER)
    AS
    BEGIN
    DELETE FROM file_subjects_temp
    WHERE ID = p_file;
    END download_my_file_temp_delete;
    And in
    Home>Application Builder>Application ID>my_page > Report Attributes>Column Attributes
    There I am entering
    Link text : Delete
    Target : URL
    URL : #OWNER#.download_my_file_temp_delete?p_file=#Delete#
    Where download_my_file_temp_delete is a procedure for deleting the file corresponding to ID .
    Here id alias is DELETE so I am passing #DELETE#.
    If I am click delete corresponding to any file its opening a blank page I seen URL is like
    http://abcd.com:portno/pls/workspace/owner.download_my_file_temp_delete?p_file=4031625747435433
    if I am clicking back and refreshing then getting file is deleted successfully.
    That means procedure is working but I want that after clicking on delete link corresponding to any file same page should appear with refresh then my problem will solved.
    Can u suggest me any approach.
    Thanks && Regards,
    Ravi

    [This is not John, hope that's ok!]
    This kind of thing is best done by rendering checkboxes next to each file in your report region;using apex_item.checkbox(1,file_id) and providing a Delete button that would fire a after-submit process that does
    for i in 1..htmldb_application.g_f01.count
    loop
    download_my_file_temp_delete(htmldb_application.g_f01(i));
    end loop;[And of course a same-page branch on the page]

  • Select Query and Recordset on same page

    I have been workig with Coldfusion for a while now.  Where I work there is a need for web pages to extract data from data sources.  I have been successful at doing this.  Typically I use a form that selects multiple criteria, which when submitted loads a target/action page that displays records that are filtered based on the SQL statement contained on that action page.  What I do is to conditionally check if criteria is passed using cfif.  And if a field parameter is indeed passed it becomes part of the cfquery.  This works out well - especially for reporting.
    But now I am seeing more and more a need to accomplish the same process - but on a single cfm page.  So the page I seek will have both the form (select) and the recordset results on the same page. 
    In this exercise I will be caching results od a query and having several queries to further refine what I seek (QOQ).  What I am seeking is the best practice to follow, I was thinking that using an iframe on the page would be and adequate solution whereby the query would pass the criteria and its form action would pass the variable(s) to the action page, which would be the source of the iframe.  But I am not certain that this is a best proctice.  Nor have I had great success at getting the pages to work in concert. 
    Any advice that you can lend would be appreciated. 

    I ideally start by reducing the 2-page functionality - of form page and action page - to just one. It goes like this:
    <cfset isValidationPassed = false>
    <cfif isDefined("form.someVar")>
    <!--- Do validation. Validated form implies isValidationPassed is true --->
    </cfif>
    <cfif isValidationPassed>
    <!--- Do action page stuff --->
    <cfelseif NOT isDefined("form.someVar") OR NOT isValidationPassed>
    <!--- Display the form. --->
    <!--- If form had been submitted, inform user which validation failed, and what to correct. Display the form. --->
    <cfoutput><form method="post" action="#CGI.SCRIPT_NAME#"></cfoutput>
    </form>
    </cfif>
    The idea is then to pile on the complexity, layer by layer.

  • Report and Form on same page

    I used the wizard to create a report and form on a table. When the user hits the edit link on the report, it brings up the form (so they can edit) on a new page. Instead of this, I want the form to show on the same page as the report. What is the best way to do this? Should I create 2 regions on the same page (1 for the report and 1 for the form)?

    Bob,
    take a look at
    Re: How to get a form to appear on the same page when a button is clicked?
    at the end you can login to a (my) workspace to see how it's done.
    Leo

  • Hyperlinks directed to different section of same page?

    Is this possible in iWeb? What I want is to have a menu bar at the top of one of my pages that links to different sections of the same page since its a really long page. Any help would be greatly appreciated!

    There is a way using HTML snippets. See Peter Berglund's post in this thread: http://discussions.apple.com/message.jspa?messageID=9044022#9044022 and then go to his blog for more info.
    I've used it in the Contents page for my demo sites. The links in green are to "anchors" on the pages indicated.
    The hyperlink would be http://web.me.com/MMeAccount_Name/Site_Name/PageName#widgetX with X being the number of the widget just above the area you want to direct to. You'll have to publish the page and the change the X until you get the location you want (particularly if you have more than one widget on a page). The widgets are numbered in the order they were created.
    OT

  • Use a Jump Menu to Make Selection and stay on same page.

    I have a form that you select a ID from a drop down list
    click submit, and then are redirected back to the same page with
    the results of a query based on the selection from the drop down
    list. I want to change this so the user doesn't have to click
    submit... I want my drop down list to act as a jump menu. How do I
    get my dropdown list to act like a jump menu, which essentially
    submits the form, and posts the results below?

    2 ways, both use javascript (you can't do it with just cf):
    1) add an onChange attribute to your select with
    'this.form.submit()' as
    value. this will submit the form, refresh the page and show
    your results
    - just as if user clicked your 'submit' button. be careful,
    though, if
    you are checking for existence of the submit button in your
    action page
    - it won;t be there since it has not been clicked.
    2) you can also employ some ajax features to submit your form
    asynchronously, 'behind the scenes', and show results without
    refreshing
    the page. CF8 has built-in ajax js functions and tags to do
    it,
    otherwise look into ajaxcfc by rob gonda or jQuery or other
    js framework
    that has these features.
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Using VO as form and table on same page

    Hi,
    We are facing some issues while using same view object on one page. The view object is dropped as input form and as table on same page. There are few fields in the input form that have autosubmit property set to true. Now while entering the data into form, after clicking any autosubmit field, if we refresh the page, then new row gets created in table with value of the auto submit field. This is in cache only and not created in DB. We tried by exposing two instances of same view object in application module but still same issue. Finally we created two view object, one which is EO based and another ready only through query. Its working fine now. But is there any other possible solution, without creating two view objects?
    Jdev: 11.1.1.6.
    Thanks

    Hey Ami,
    I've tried understanding your problem but i'm not sure if i could.
    The problem is that you can insert via the form but it doesn't update the table ?
    Is that it ?
    Regards,
    Frederico.

  • 8.0.2 Insert and Update on same page?

    With 8.0.2 is it possible to have an update and insert on the
    same page?

    On Fri, 19 Jan 2007 08:34:35 -0600, Lee
    <[email protected]>
    wrote:
    >Did you have to tweak the code to get them to work
    together (changing
    >function names) or did they work automatically?
    >
    >Perhaps it's just what I am trying to do with the page. I
    have two forms
    >and depending on which they need, either the update is
    used or the
    >insert is used.
    >
    >Does this still sound like it should work?
    Reply in the App Dev forum.
    Steve
    steve at flyingtigerwebdesign dot com

  • Javascript and vbscript on same page?

    I an editing a customers site which had some old server side javascript on the page.
    I need to use vbscript on the page now as the page is being upgraded to aspx instead of asp.
    The question is, do I need to upgrade all the existing server side javascript on the page to vbscript or can the two co-exist side by side?
    Thank you
    Terry

    terryfoster wrote:
    I wish I could, he left when the tea stopped flowing!
    Hi
    I'm not surprised they left.
    aspx pages are Microsoft's .net pages which is completely different to asp. Using both on the same page will depend on your server set-up, but javascript is not a language you can use for aspx, and I would not recommend mixing them except for the most basic usage.
    Your choices for aspx are - C#, vbscript, C++, Java++,, there are a few others but I have never heard of anyone using them.
    You can use javascript for your client-side, (browser) scripting language though.
    PZ

  • Multiple 'add row to updateable form' buttons on same page

    Hi,
    I have a master-details page with 1 master region and 2 details regions. Both details regions are updateable reports. In each details region, I created a 'Add row' button, with a different name. Then I created 2 'Add rows to tabular form' processes, one for each button.
    The issue is that both buttons add a row to the same details report. How to specify which button adds a row to which report?
    Thanks,
    Guillaume

    Guillaume,
    The built-in tabular form feature only supports one tabular form on each page. You'll have to put the two forms on separate pages. Or use simple reports as the detail reports with edit links to an edit form page.
    Regards,
    Marc

  • Opening Numbers and getting the same page size and location each time

    Can someone help me with something which is pretty basic, please?
    When I open a Numbers spreadsheet which I use frequently, each time it opens as a tiny box and always has to be resized and repositioned onscreen before I can start work.
    I figure there must be something I can do to have it open in the same screen position and the same size each time, but what?

    Hi Norman,
    Your tags show OS X Mavericks 10.9. The latest version of Mavericks is 10.9.2
    Are using Numbers 3.0 ? The lates version of Numbers is 3.1 and it does save the zoom.
    Maybe this will help, but it does not work in Numbers 3.0
    Numbers > Preferences > General > Default Zoom > 100% (or whatever % you want).
    And Save your document before closing to retain the zoom and position.
    The Numbers *window* size can not (yet) be saved, but the zoom and the position within a sheet can be saved in Numbers 3.1
    Regards,
    Ian.

Maybe you are looking for

  • Trouble playing any videos on Macbook Pro

    So 2 months back, my macbook pro is having trouble playing any type of flash videos, from youtube, embedded videos, pretty anything with flash. flash player is up to date, i can surf the internet and do my work flawlessly but as soon as i start a vid

  • Download windows 8.1 through store and install later

    I have a laptop that came pre-installed with Windows 8 and I'm going to upgrade to 8.1 through the store in the next couple weeks.  The information I have found say that you can pause the download and resume it again later, but What I am trying to fi

  • Keyboard layout problems in Gnome

    I'm not sure if it was a recent upgrade that did it or not, but in gnome my keyboard layout is only half right. I checked the keyboard manager in the gnome menu and it was set to Generic 105 key (INTEL). In xorg.conf the keyboard is listed as pc105.

  • Inherent design flaw in HP laptop keyboards

    Anyone struggling with random behaviour when typing quickly (windows shutting down, blocks of text being deleted etc) may be interested to know that there is a flaw in HP laptop keyboards. This has been seen on an HP550 laptop, it's not clear how man

  • How to resolve insufficient data for an image

    Hi I am using oracle 9i database I have written a package using 'utl_smtp' package to send email and attachment. When I am attaching a oracle report (in .pdf format;This report has an Image inserted into it) and sent it to an email address, the attac