How to set item values when redirecting to the same page.

I just created a redirect button that I want to redirect to the same page and set the 2 page items on the page to the same value they had before the redirect.
But I can't write:
Set These Items: P1_Permit_Number,P1_Fishing_Year
With These Values: &P1_Permit_Number.,&P1_Fishing_Year.
Because there are no values in the session state, since a submit has not been done.
So how do I do this?
I know how to get the values stored in the items, e.g., $v('P1_PERMIT_NUMBER')
but where do I place that command? It's not allowed under "With These Values"
And I don't really want to make this a submit button and create a process that says:
P1_PERMIT_NUMBER := $v('P1_PERMIT_NUMBER') because that would complicate the page too much -- I already have other processes and branches on the pages whose conditions would have to be modified so that they don't run during this scenario.
Thanks.

Thanks Gary and Andy. I rewrote the function according to above instructions:
function redirectToURL()
var permitNumber = document.getElementById('P1_Permit_Number');
var fishingYear = document.getElementById('P1_Fishing_Year');
var url = 'f?p=&APP_ID.:1:&APP_SESSION.::::P1_Permit_Number,P1_Fishing_Year:' + permitNumber +',' + fishingYear;
window.location.href = url;
But when I entered a value for permit number and fishing year and redirected, the word "null" appeared in the Permit page item, instead of the permit number that I had entered.
Remember that I am not submitting here. So if the syntax you showed me, i.e. getElementById('P1_Permit_Number'), searches for the item's session state, then it will be wrong, since there is no session state value for the items at this point. Perhaps that is the reason I got the null?
If so, what can I do?

Similar Messages

  • In flex, How to set a value to one parameter, the parameter defined in a cffunction in a cfc file

    In flex, How to set a value to one parameter, the parameter
    defined in a cffunction in a cfc file, In the cffunction there are
    much cfargument, I want set a value to one of them, such as the
    cfc:
    <cffunction access="remote" name="myShow" output="false"
    returntype="struct">
    <cfargument name="ID" type="numeric" default=0>
    <cfargument name="GoodsID" type="string" default="">
    <cfargument name="DestTime" type="string" default="">
    <cfargument name="DestCount" type="numeric" default=1>
    How I set a value to only parameter one of them , such as set
    GoodsID when use mx:remoteObject.
    Thanks for your help

    Got maybe a solution for you, I have just tested it.
    So, the idea is to use intermediate variables. Imagine Var1 and Var2 variables that you refresh with your more or less complicated queries. Then what you can do is to refresh your final variable Var3 with a query using your intermediate variables. Here is an example for Oracle:
    select #Var1+#Var2 from dual
    This way you can make a chain of dependent variables: Var3 is using Var2 and Var2 is using Var1.
    Hope it helps.
    Shamil

  • I am trying to create my own apple id, but when i try to click creat my id, i am redirected to the same page, there are no errors saying anything is wrong

    i am trying to create my own apple id, but when i try to click creat my id, i am redirected to the same page, there are no errors saying anything is wrong

    Here is a link that should meet your needs.
    Rescue email address and how to reset Apple ID security questions
    Let us know how you got on.

  • How to Set Up 2 Skype Accounts on the Same MacBook Pro Computer

    How to Set Up 2 Skype Accounts on the Same MacBook Pro Computer

    http://community.skype.com/t5/Mac/How-can-I-run-two-Skype-accounts-on-a-Mac/td-p /169126
    http://everydaylife.globalpost.com/run-two-skype-accounts-same-mac-computer-3524 6.html
    http://www.profesional.co.cr/technology/multiple-skype-accounts-mac-os-or-window s-same-time/
    Note that you posted in the Mac Pro desktop forum

  • How to Set JFilechooser to show file with the same extension in the filetyp

    How to Set JFilechooser to show file with the same extension in the filetypes??
    help

    I also don't understand, but if you mean how to display only files with a certain extension in your JFileChooser then you should have a look at the JFileChooser API:
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JFileChooser.html
    The introduction shows an example of how to do that.

  • How do I type Hebrew and English on the same page

    How do I type Hebrew and English on the same page in Indesign?

    What version of InDesign are you using? And on what operating system? Switching keyboard ("input methods") is in your OS, not in InDesign. InDesign has had the capability to display right-to-left languages since CS4, but only the Middle East edition has the abilities to actually manipulate Hebrew text. If you're trying to do a bilingual, bidirectional document, you'll need the ME edition. If you are a CC subscriber, it comes with your subscription; if you are not, you'll need to buy another version of ID, or a plugin that will allow you to access those RTL features.

  • How do I combine text and photos on the same page in iPhoto using photobook

    How do I combine text and photos on the same page in iPhoto using photobook?

    You mean while creating a book in iPhoto?  Click on the layout button while viewing a page and select the layout that includes both text and photos.  Most themes will have those options.
    OT

  • How do I create a duplicate image inside the same page? Then how do I change the color of that image

    how do I create a duplicate image inside the same page? Then how do I change the color of that image from black to red?

    Hello there!
    Here is one way to create a duplicate image and colorize it. As you can see below, I have one image right now, that I want to duplicate.
    My layers panel looks like below.
    To duplicate your image, click the downward arrow on the right side of your Layer Panel.
    Select Duplicate Layer. This will duplicate the layer that the image is on.
    Select "OK" to approve the duplication.
    As you can now see in the Layers panel, the image is duplicated. The new layer is now at the top of the Layer panel.
    Now to colorize your image, go to Window > Adjustments.
    The Adjustments panel will now be opened. Select the Hue and Saturation icon as seen circled in red.
    The Hue and Saturation propertied panel will be opened. I selected "Colorize", and adjusted the hue and saturation bar to achieve the level red in my photo.
    As you can see below, the image is now red.
    Now i want to make sure only ONE of my image layers is red. I moved the Hue and Saturation layer to only be on top of the bottom layer. The image on the top layer now will not be affected by the red.
    Select the move tool, so I can now move the image layers so we can see both of them.
    With each image layer selected, you can take the move tool and move the images. I moved mine on top of eachother and you can see my red layer (bottom) and the non red layer (top).
    I hope that helps. i have also included helpful links.
    Please post back with any questions,
    Janelle

  • How to set a value when right click on af:commandlink ?

    Hi All,
    JDev Ver : 11.1.1.4.0
    How to set a value to property listener on right click of a commandLink ?
    I am having values that are hyper linked using af:commandlink, when i right click on hyperlink, that value i need to get in the managed bean ?
    (While right click i am populating on menu item)
    how to get the value ?
    Give some solutions ?
    thanks
    Gopinath

    Hi,
    Try this code:
    <af:clientListener method="rightClick"
    type="contextMenu"/>
    <af:serverListener type="setValue"
    method="#{beanName.setValueMethodName}"/>
    <trh:script xmlns:trh="http://myfaces.apache.org/trinidad/html"
    id="s13">rightClick = function(event) {
    var source = event.getSource();
    AdfCustomEvent.queue( source, "setValue"
    , {}, false); }
    </trh:script>

  • How to get a form to appear on the same page when a button is clicked?

    Hi,
    I have a report on a page with a create button. When a user clicks the create button, a form should appear on another region in the same page....how do i go about doing this?
    I know how to do this if the form is on a different page, but i'd like the form to appear on the same page as the report and only when the button is clicked.
    Thanks.

    Hi,
    I did the following, but it didnt work....
    1) Created a hidden item on the page, and in the Default Value field, I set the value to N.
    2) Created a button in the report with the following values under "Optional URL Redirect":
    Target is a: Page in this application
    Page: 4
    Set these items: P1_SHOW_FORM
    With these values: Y
    3) Created a form of HTML text type with the following values under "Conditional Display":
    Condition Type: Request=Expression 1
    Expression 1: P1_SHOW_FORM='Y'
    What have I done wrong or have i missed something?
    Thanks.

  • How can I jump to certain region on the same page?

    Hi,
    I want to jump to certain region on the same page.
    1) Let say I have 5 regions on page 15 and I have to able to redirect from region 1 to region 5 with out scrolling.
    2) I have to able to branch from page 2 to page 15 ==> region 4.
    How can I do it?
    I thank you for any help in advance.

    I can get this to work but the page is submitted, either when I use a button with URL link or from a link on a display only text field.
    Is this how it is supposed to work? I thought it was supposed to work just on the browser so it is fast.
    IGNORE THIS!
    =============================
    I resolved it easily by modifying the URL from f?p=blah blah to #LINK_NAME
    Message was edited by:
    user530800

  • How to display more than one data on the same page?

    Hello all,
    I have a question that is if I want to choose more one data on the same page and the data is selected from the same column.
    I.E I want to tick more than one boxes in the page but the data is selected from the same column.

    Select all the item to burn... right click...
    Or
    Place all items into a folder and burn the folder to the disc.
    Or
    Make a Burn Folder in the Finder (place items into the folder) and burn from there to a disc.

  • How to create links to different files on the same page?

    Good day to all again,
    can someone please guide me through creating several links to different files on the same page. In other words, I am creating a photo page where my links are called Gallery 1, Gallery 2, etc... I would like to create links so when the User clicks on Gallery 1, they see Gallery 1 slide show in the frame; when the user then clicks Gallery 2, then they see Gallery 2 slide show in the window.
    My slide show files are done and I am using GoLive CS2. I have no knowledge of JavaScript or ActionScript/Flash.
    Any suggestions are highly appreciated.
    Thank you
    Alek

    Hi Diana,
    I'm a professional photographer and in the process of getting
    my finished site published. I used Coffeecup Photo Gallery. You can
    create multiple albums on the same page. Do a Google search for the
    address. It's easy, inexpensive, and it works. I tried to do this
    with the Photo Gallery in DW and FireWorks--but couldn't get it
    right. CC uses Flash and Javascript.
    Good Luck

  • How to set item values without using fields in branch's ACTION block?

    Okay, I will try to say this in a easy way so it is not weird.
    I have created a button, SAVE, that has a Branch of branch type: Branch To Function Returning A Page. This is my code for the branch:
    if :P2008_NAP_SUPPORTING_MATERIALS = 'Yes' then
    return '2092';
    else
    return '2040';
    end if;
    The code for this type of branch is stored in the ACTION block of the Branch page. The ACTION block for a Branch of branch type: Branch To Function Returning A Page is different than the ACTION block for a Branch of branch type: Branch To Page Or URL.
    I need to set some item values with some specific values, which I can do with a branch type: Branch To Page Or URL. This is not possible with the branch type: Branch To Function Returning A Page. The ACTION block is totally different.
    How can I set some values on say Page 2040 from Page 2008 without using fields in the branch's ACTION block?
    Thank you in advance,
    Maggie

    Andy and Scott,
    I love seeing different perspectives in solving problems, it opens my eyes to new ways of looking at/using the tools (reserved words and 'Function returning a Page', etc.).
    One of my pet peeves has been that on branches I was limited to only 10 variables to be passed (I know, who would want more - but there was an instance where I had to pass more), and an even more frustrating time when using report Column Linking, which limits me to 3 variables.
    At least with the Branch linking I can use your suggestion Andy and add the variable setting statements into the function. I am assuming of course (and I should be able to) that I will be able to set more that 10 variables in a IF condition prior to the RETURN statement. This method will be much more understandable, for me, when looking through the branch at a later time to see what is happening, than an URL link where all the variable are strung out 'in a line' so to speak.
    I will still need to use URL Target branching on Links contained within a Column Attribute when I need to pass more than 3 variables, of which I have several places where I do this.
    Thomas

  • How to set setRowKey value when table is populated dynamically

    Hi All
    I have created a view object using only select statement and displaying all the records in it in the table at page load. Table is SelectMany. Now after selecting some records I press submit button. At the backend logic is executed which prints how many rows selected and the values of the selected rows. Everything works fine till here.
    Now when the view object is modified by putting where clause. And the parameter to this where clause is coming from url. When the page is loaded table displays only records based on filter criteria. But the problem begins when I press the submit button. It shows the error: row is null for rowKey:oracle.jbo.Key[AAAQkHAAJAAAACkAAA ]
    I have done some research and found that row key is not set for the displayed records. because at the backend when I am printing the values of keys in selectionState.KeySet it prints only null.
    This thing happens only when table is populated dynamically through url value.
    Can anyone help me how to get the selectionState.Keyset values when table is populated dynamically?

    SOLVED:
    Actually there is no problem with the rowKeys as I mentioned in the post. What happened was that I was executing the query everytime on page load. Second time when the page is loaded the param value was set to null. So row becomes null but on the other hand I am referring the rows by some selected row keys. so the error that row is null for key...
    So now i am storing the param value in managed bean and then referring it in the code.

Maybe you are looking for

  • My iPod Touch got disabled, but I don't have the computer that it's registered to anymore.

    A young family member of mine decided to play with my iPod Touch and put a passcode on it.  After several wrong tries and a fruitless attempt to get the little dear to remember what she put, it's disabled now.  I no longer own a computer (I'm submitt

  • Cost of carrying Inventory

    Hello, My client wants to capture the cost of Stocking, cost of labor and other miscellaneous charges on inventory. For Example, we have Material which needs to be kept in temperature below room temperature, so for this we need to keep it in refriger

  • Package compilation problem in WinXP

    I am creating a simple program to throw a dice but have some problem with packages. I have 2 files, in the directory, C:\Dgame\Dgame\Dice.java and C:\Dgame\Dgame\Dealer.java . I packaged both of them into a package called Dgame (using "package Dgame;

  • Install BI Content Process Chain 0TCT_MD_C_FULL_P01

    Hello, I am installing BI content Process chain (0TCT_MD_C_FULL_P01) for BI statistics. I did the install but when I try to activate it says " Process has no predecessor" . Has anyone installed this chain and how did you do it. Can you please expalin

  • Leopard uninstall possible?

    Can leopard be uninstalled? I am not happy with it since the install. I want it back to the place before the upgrade. Was that Tiger? Mike