Getting page item to resolve in URL

I have a page item which gets the IP of the sending computer. I then need to put this page item into a URL, but for some reason cannot get it to resolve. So I have a button that is set to redirect to:
http://&p2_id/cgi-bin/labelprinter.py?barcode=&P2_BARCODE.
Everything resolves fine except for P2_ID. Do I need to escape something? TIA

Here's one option: create a JavaScript function which will "create" URL for you. In order to do that, create a hidden text item (let's call it P2_URL).
(I hope I don't have typos in here!)
<script language="JavaScript" type="text/javascript">
  function create_url()
     $x('P2_URL').value =
       "http://" + $x('P2_ID').value +
       "/cgi-bin/labelprinter.py?barcode=" +
        $x('P2_BARCODE').value;
     window.open($x('P2_URL').value);
</script>Now, your button: set its action to "Redirect to URL" and URL Target tojavascript:create_url();

Similar Messages

  • How to get page item list in  a page?

    how to get page item list in  a page?

    Have a look at ISpread::GetItemsOnPage().
    That should get you started.

  • Which page items get included in URL on doSubmit()?

    This is totally perplexing me.
    I have a page with 5 page items in a tabular region. All of them are set to hidden/protected.
    The page is loaded with one of those page items specified in the URL.
    If I use the button to delete one or more rows on the from, or click on the "Add New Row" button, the page is submitted, and comes back with three of those five page items specified in the URL.
    First question: why only 3 and not all 5? Why THESE three? I can't see any differences between one of the page items that does display in the submitted URL vs. one that doesn't.
    Second question: I changed one of those page items to display conditionally. If a certain condition is not met, the field is never output to the page. However, EVEN THEN when I submit the page using one of the buttons above, the field is included in the submitted URL! Should that even be happening? That actually strikes me as a security risk, unless there's something I'm doing wrong.
    I can probably create a test page on apex.oracle.com if necessary. (It's on apex.oraclecorp.com right now, but moving it will take some time since I'll have to strip out some sensitive data.) But I'm hoping this is just some easy-to-explain concept I'm just not grasping.
    Thanks.
    - Keith

    hi Keith,
    1) check the branch. the branch defines what is passed to the next page.
    2) yes, this is correct behaviour. condition is for rendering, but the branch is fixed.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    Work: http://www.click-click.at

  • White spaces in filename (URL) become %20 and get Page Not Found

    I have installed iPlanet Netscape 6.0 sp2 under Solaris sparc 5.8. I also have the Weblogic plugin for Netscape. The problem is that if in the url I have spaces, it does not resolve the flename: http://server:port/dierctory/Hello%20Test.html and I get Page Not Found.
    I already tried the URLDecoder.decode(fileName) and it does not resolve the problem. My guess is that I am missing some configuration for Netscape. I never faced this problem before becasue I always have Netscape and Weblogic or another app server in the same server. Please, any clue would be appreciated. Thanks a lot in advance,
    Marga [email protected]

    I think there's an open bug about this. This thread appears to have a solution. If not, search forums with "+url +uri +%20"
    http://forum.java.sun.com/thread.jsp?forum=31&thread=298361

  • The bookmarks toolbar is there but has no item buttons on it. How do I get the items back for this toolbar? Also would like to know if the toolbars can be put on the same line to make more room on the page (drag & drop) ??

    The bookmarks toolbar is there but has no item buttons on it. How do I get the items back for this toolbar?
    Also would like to know if the toolbar can be put on the same line to make more room on the page (drag & drop) ?? Like the menu & bookmarks toolbar could/should fit on same line. This would add more page view...
    Floyd Perry
    Thanks

    Check that you still have the "Bookmarks Toolbar items" placed on the Bookmarks Toolbar
    * Make sure that you have the "Bookmarks Toolbar" visible: "View > Toolbars"
    * Check in "View > Toolbars > Customize" that the "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    * If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the Customize window onto the Bookmarks Toolbar
    * If you do not see the "Bookmarks Toolbar items" then click the "Restore Default Set" button
    You can only move the content from a toolbar onto other toolbars if all toolbars support that feature. You need to check that in the options of each toolbar.

  • Page items not getting set upon login in APEX 4.0.2

    We just upgraded our APEX in development from 4.0.1 to 4.0.2.00.07. While testing found that in APEX developer, unless we press one of the buttons (Debug/View Debus/Show Edit Links) in the tool bar on the login page, the application/page items are not getting set to display the conditional items (page regions/buttons/Tabs etc,.) Could this be some setting within APEX Developer?
    But the display is fine when the application is run directly in a browser, as an end user.
    Is anybody else having this issue? We are holding off our production upgrade because of this issue.
    Any help is appreciated.
    Thanks
    Radhika

    Hi,
    Could you please explain what you mean by
    Running 4.0.2 version...need to know how to remove the pop-up login and go straight to welcome/splash page?Do you mean application builder or your application login page ?
    If you mean application builder, you can not remove login page. You need always login to builder.
    If you mean your own application then change authentication scheme
    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/sec.htm#sthref2297
    Regards,
    Jari

  • Populate the URL for popupURL from a Table/Page Item?

    Dear all,
    Would someone please tell me if the URL to run a BIP report can be populated from a table/page item when using popupURL and if so, how?
    Background:
    I have a Table called TBL_LETTERS with a varchar2 column REPORT_URL
    I have a Page (Pg 303) which populates a Text Page Item (P303_REPORT_URL) with an appropriate URL string from the table.
    Here is my problem:
    I would like to replace my working javascript function (see below):
    run myLetter_40()
    popupURL('&BI_URL.Guest/DEV/TEST/FRM_40/MM_40/MM_40.xdo?_xpf=&_xpt=1&P_CASE_ID=&P303_CASE_ID.&P_PERSON_ID=&P303_PERSON_ID.&_xt=MM_40_xf=rtf');
    with something like:
    run myLetter_40()
    popupURL($x("P303_REPORT_URL").value);
    ...but this doesn't work.
    With my limited javascript knowledge I can only guess that the variables successfully assigned values in my first function example are not successful in my second, I am probably just passing the whole thing as a simple string (like this: +&BI_URL.Guest/DEV/TEST/FRM_40/MM_40/MM_40.xdo?_xpf=&_xpt=1&P_CASE_ID=&P303_CASE_ID.&P_PERSON_ID=&P303_PERSON_ID.&_xt=MM_40_xf=rtf+), but would very much welcome any advice.
    Do I need to
    a. Create the REPORT_URL string differently in the table so that when passed to the Page Item it includes the required variable data?
    b. Something completely different?
    c. Forget it, it's not possible!
    ps. I am using Apex 3.2.1
    Thank you in advance.
    Sue
    Edited by: smp245 on Aug 21, 2012 2:19 PM

    Thank you Erik-jan
    when I look at the parameter in de popupURL function I notice that you use substitution variables &P303_CASE_ID. and &P303_PERSON_ID.
    The value for these variables are filled in by Apex on page rendering.
    If you use this same URL in your column REPORT_URL Apex will not fill in the values for these substitution variables.
    Yes, this is exactly what is happening.
    I would suggest you use option A to build your URL with the desired values.
    If the values for &P303_CASE_ID. and &P303_PERSON_ID. are in the same table TBL_LETTERS you could use them to make a pseudo column for the URL string.
    &P303_CASE_ID. and &P303_PERSON_ID. are not in the same table. How would it be possible to build the string (to store in the table) so that when it is run javascript identifies the variables?
    I have tried building the string in various ways using syntax similar to below but nothing is working:
    '&BI_URL.Guest/DEV/TEST/FRM_40/MM_40/MM_40.xdo?_xpf=&_xpt=1&P_CASE_ID=' + &P303_CASE_ID. + '&P_PERSON_ID=' + &P303_PERSON_ID.' &_xt=MM_40_xf=rtf'
    Do you have any ideas?
    Thanks
    Sue

  • [CS3 JS] Getting a page item by its script label

    I have a text frame on a master page with its script label set. In my script, I am trying to get a reference to the text frame with this:
    var doc = app.activeDocument;
    var spread = doc.masterSpreads[0];
    var tabFrame = spread.allPageItems.item("TabLeft");
    I get the error "spread.allPageItems.item is not a function"
    Any help will be appreciated. Thanks.
    Rick

    Hi Rick,
    spread.allPageItems returns a flattened array of all of the page items in the spread, at any level of the hierarchy (i.e., inside groups and other page items). Is that what you want? Sadly, allPageItems does not benefit from the special case where we use the label as a name, so you'll have to iterate if that's what you want.
    As Peter says (thanks, Peter!), spread.pageItems.item("label") gives you all of the page items whose label matches the string, but it does so in sort of a weird way--you'll always get a page item object. If no page items match, you get an invalid page item; if one matched, you get a single page item, and if multiple page items matched, you get a page item object that actually contains multiple page items. It can take a little testing to figure out exactly what it is that was returned.
    Thanks,
    Ole

  • Get the type of a Page Item

    Hey guys,
    i am working on an inDesign extension. i have a requirement to go through the document elements. i was able to get all pageItem objects on a doc page.
    i am now trying to figure out what is the type of each pageItem so i am using the following code that i found in here:
    http://cssdk.host.adobe.com/sdk/2.1/docs/WebHelp/app_notes/indesign_pa ge_items.htm
    //Given a page item "myPageItem" of unknown type:
    var myPageItemType:String = flash.utils.getQualifiedClassName(myPageItem);
    this is supposed to give me for example: com.adobe.indesign::Rectangle
    instead all items are returning: com.adobe.indesign::PageItem
    any idea what i am doing wrong here?
    Thank for the your help.

    Responded on the EB forum...

  • How to get the page number that which have page item?

    i used Ilayouttarget .By using the selection target to get page number that which page have item to be.

    i used Ilayouttarget .By using the selection target to get page number that which page have item to be.

  • Some hyperlinks are not working e.g. #page-item and a name="#page-item" how can I resolve that

    It's a toplink to a page item on the same page internal (hyperlink) that is not working.
    E.g. toplink e.g. #ssc01 to the internal pagelink
    <a name="#ssc01"><b>Algemene Informatie</b></a>

    Don't add the hash (#) to the name attribute. The hash is used in the URL as separator and should not be in the name.
    <pre><nowiki><a name="ssc01">Algemene Informatie</a> </nowiki></pre>

  • How to get notified when ever I select any frame (any page item) ?

    I have added a observer class in my plugin which derives from ActiveSelectionObserver.
    But my observer constructor is not getting called when i select a page item. (In short, I am not getting notified about the selection)
    below is my code:
    class CSDTSelectionObserverImpl : public ActiveSelectionObserver
    public:
      CSDTSelectionObserverImpl(IPMUnknown *boss);
       virtual ~CSDTSelectionObserverImpl();
    protected:
       virtual void    HandleSelectionChanged (const ISelectionMessage*);
       virtual void HandleSelectionAttributeChanged(const ISelectionMessage* selectionMessage);
    CREATE_PMINTERFACE(CSDTSelectionObserverImpl, kCSDTSelectionObserverImpl)
    CSDTSelectionObserverImpl::CSDTSelectionObserverImpl(IPMUnknown *boss) : ActiveSelectionObserver(boss,IID_ICSDTSELECTIONOBSERVER) { }
    CSDTSelectionObserverImpl::~CSDTSelectionObserverImpl() { }
    void CSDTSelectionObserverImpl::HandleSelectionChanged(const ISelectionMessage* selectionMessage) { }
    void CSDTSelectionObserverImpl::HandleSelectionAttributeChanged(const ISelectionMessage* selectionMessage) {  
    if (selectionMessage && selectionMessage->WasSuiteAffected(IID_ILAYOUTSELECTION_ISUITE))
    Also, In my .fr file, I have added below:
    AddIn
      kDocBoss,
      kInvalidClass,
        IID_ICSDTSELECTIONOBSERVER, kCSDTSelectionObserverImpl,
    Do I need to implement the ILayoutSelectionSuite as well to get the notification on page item selection or implementing Observer via ActiveSelectionObserver is sufficient?
    Please help.

    I tried below in debug mode , but it gave me error while execution (when the line of code was called by in-design)
    InterfacePtr<ILayoutSelectionSuite> iLayoutSelectionSuite(fCurrentSelection, UseDefaultIID());
            if (iLayoutSelectionSuite == nil)
                break;
    iLayoutSelectionSuite->SelectPageItems(selection,Selection::kReplace,Selection::kDontScrollLayoutSelection); // Error
    So I was not able to get the UIDList of the selected page items, hence I used below code and this is working.
      InterfacePtr<const IIntegratorTarget> iIntegratorTarget(iLayoutSelectionSuite, UseDefaultIID());
            std::auto_ptr<IIntegratorTarget::TargetSuiteCollection> selectionSuites(iIntegratorTarget->GetTarget(ILayoutTarget::kDefaultIID));
            for(IIntegratorTarget::TargetSuiteCollection::size_type i = 0; i < selectionSuites->size(); i++)
                ILayoutTarget* target = (ILayoutTarget*)selectionSuites->at(i).get();
                if(!target)
                    continue;
                selection = target->GetUIDList(kDontStripStandoffs);
    But it would have been much easier and logical if I can get it using IlayoutSelectionSuite or if there is some better approach ?
    Please let me know.
    ileleLayoutSelectio
    Let me

  • How do i get current active or selected page item's  reference

    Hi all,
    How do i get current active or selected page item's  reference .
    Please help me

    You can implement a selection suite for your need, this selection suite will be placed into the kLayoutSuiteBoss.
    In this selection suite place a method to give you the UIDRef of the selected pageitem, which you can get by using the method "GetUIDList" of the "ILayoutTarget" interface.
    Manan Joshi
    - Efficient InDesign Solutions -
    MetaDesign Solutions
    http://metadesignsolutions.com/services/indesign-development.php

  • CS3: Rotated page item: How can I get the top-right point

    Hi
    I have a rotated page item. Now I should have the top-right and the bottom left point. If I get the rectangle of this page item I only have the top-left and the bottom-right point. And I can read the rotation angle.
    - How can I get the missing points?
    Thanks
    Hans

    Algorithmically speaking (ie, this is NOT real code), isn't it just something like:
    if page.rotationAngle == 90 then
    origTopLeft = (newBottomRight.Y, newTopLeft.X);
    else if page.rotationAngle == -90 then
    origTopLeft = (newTopLeft.Y, newBottomRight.X);
    else if page.rotationAngle == 180 then
    origTopLeft = newBottomRight;
    else
    origTopLeft = newTopLeft;

  • Pass value through URL without setting local page item

    Folks,
    I have a table where I have created a dummy column with a hyperlink on it to go to another page in the application which runs a report passing through columns on the table
    As I am doing this several times (for different pages in my application) - Is there a way of passing a variable through a URL to a report without setting a local variable
    i.e.
    Click Here
    Here I am assigning a local variable on Page 25 which is hidden called P25_TEST1
    What I would like to do is pass the value straight to page 25 (which runs the report) without the need to create hidden items on the report pages all the while
    Thanks
    Gareth

    You have a plain HTML page that loads with a url with something like ?field=value
    And you want "value" to show on your page, correct?
    <html>
    <body>
    <script>
    var qsParm = new Array();
    function qs() {
    var query = window.location.search.substring(1);
    var parms = query.split('&');
    for (var i=0; i<parms.length; i++) {
       var pos = parms<i>.indexOf('=');
       if (pos > 0) {
          var key = parms<i>.substring(0,pos);
          var val = parms<i>.substring(pos+1);
          qsParm[key] = val;
    qsParm['field'] = null;
    qs();
    if (qsParm['field'])
         document.write('You selected ' + qsParm['field'] );
    </script> 
    </body>
    </html>
    Call that as test.html?field=Hello
    Here's a nice link that explains it in detail: http://www.eggheadcafe.com/articles/20020107.asp

Maybe you are looking for