Hyperlink in Java Script Item

Hi Java-Experts,
can anyone send me an example for following problem:
1)
I want to open a hyperlink (http://www.sap.com) in a frame (iframe1).
Therefor i need a function, that i can call later with a button.
2)
Is it possible to open a web Template with the "standard command" also in an iframe?
Thank you very much in advance, best regards
Frank

Hi,
Let there be no mistake. Java has nothing to do with JS
(see also http://www.dannyg.com/ref/javavsjavascript.html and http://www.htmlgoodies.com/beyond/javascript/article.php/3470971)
Anyway, you're JS code should look like
frames['iframe1'].location.href = 'some URL';
iframe1 is the name in the name attribute of your frame
See also http://www.quirksmode.org/js/iframe.html
Eddy
PS. Which type of SDN Ubergeek/BPX suit are <a href="https://weblogs.sdn.sap.com/pub/wlg/6555">you</a>?

Similar Messages

  • Is there any way to determine if a link is a book mark or hyperlink in java script

    Is there any way to determine if a link is a book mark or hyperlink in java script
    Sub Problem:
    I am making an array of quads of all the hyperlinks in a document. I would like to automatically skip over all the bookmarks in the starting pages of a document and just get the links of the hyperlinks.
    Now I have to manually set the pages that contain bookmarks so they are not included in the array.
    Is there any way to determine if a link is a book mark or hyperlink in java script?
    It would help automate the conversion I need below
    John
    Main Problem:
    I have been working on converting a set of pdf files with 1000’s of hyperlinks like www.site.com\folder1\file1.pdf#page=10
    To jump to a local copy of the files with a relative type link
    ../folder1/file1.pdf and then go to the proper page.
    I have found that it can be done manually by changing the hyperlink to a javascript
    var otherDoc = app.openDoc('../folder1/file1.pdf', this);otherDoc.pageNum = 10 - 1;
    and setting each destination file with a disclose()=true;
    Based on the help so far that java script cannot access the hyperlink value in a link
    See: http://forums.adobe.com/thread/1039908?tstart=60
    I have resorted to the following plan using acrobat javascript, an external keyboard macro recorder and excel in combination to get around the problem
    Four folder level acrobat javascripts with “buttons”
    One to get all the link quads in an array, in the pdf and report the total number
    The second creates a form field in the far corner of the first page and moves there.
    The third jumps to each link found by creating a form field just to the left of the link and zooms in so it can be selected by a “mouse click” from the keyboard macro recorder 
    The forth deletes the form field
    The keyboard macro recorder runs javascript 2 and then 3 then clicks on the link just to the right of the middle of the screen and uses keys to get to the advanced editing to get to edit the hyperlink .
    The hyperlink is then copied to excel where it is converted using string functions to the needed javascript text to be copied back.
    To the acrobat file into a java script (after deleting the hyperlink)
    Rinse/lather/repeat
    I have been able to convert about 150 links an hour.
    Better then hand typing, but not like having java access to the links.
    I am looking to improve the solution

    thanks for your help.
    I may have been confusing a "acrobat bookmark" and a bookmark in a word file that is converted to a pdf and ends up being a
    link of the type:
    "Go to a page in this document"
    which I do not want in my array vs
    a link of the action type:
    "Open a web link"
    Which I do want
    John
    My code, note how I have to skip pages with "Go to a page in this document" links depending on the document, I would like to use the same code for each document and skip over the "Go to a page in this document" links :
    global.ilinkindex = 1; 
    global.aLinkquads = [ [0, 1, 1, 0, 0],
           [0, 0, 0, 0, 0] ];
    function GetLinkArray()
    global.ilinkindex = 1;
    var iTotalLinks=0;
    // for ( var p = 0; p < this.numPages - 8 ; p++)                   // end before bookmarks for each page of the file x.pdf
    //  for ( var p = 0; p < this.numPages; p++)                     // for each page of the file
    for ( var p = 23; p < this.numPages; p++)                     // start after bookmarks for each page of the file y.pdf
      var cropbox = this.getPageBox("Crop", p);
      var alinksonpage = this.getLinks(p, cropbox);            // get array of links on page
      for ( var ll = 0; ll < alinksonpage.length; ll++)
       var linkquads = alinksonpage[ll].rect;     // get link Quads
       linkquads[4] = p;          // add page number to link Quads array
        global.aLinkquads[global.ilinkindex] = linkquads; // add quads to global link Quads array
        global.ilinkindex++;
    iTotalLinks = global.aLinkquads.length - 1;
    global.ilinkindex = 1;
    app.alert("Number of Links in Document is " + iTotalLinks );

  • Column link - call java script & assign current report column value to item

    Hi,
    How to call java script and assing current report column value to item?
    I have a button column in the report to 'delete' the selected row.
    I want to first show dialog box with message 'Are you sure?'. If yes, process to delete
    will be executed, else no action.
    In order to fire JS, I used Column Link ->Target=URL.
    Problem: The alert is showing but I don't know how to pass selected row's primary
    key value to process (to delete selected row).
    I have a item which can be used to store selected primary key value but don't know how to assign the value
    when button pressed.
    Thanks in advance
    Dip

    Ok. The issue has been resolved by following way.
    PAGE PROCESS: delete_request
    begin
    delete xyz
    where id = :P8_id;
    commit;
    end;BUTTON URL:
    javascript: DelRec(null,'CREATE', 'f?p=&APP_ID.:8:&SESSION.:delete_request:NO::P8_id:#id#');Java Script:
    <script language="JavaScript1.1" type="text/javascript">
    function DelRec(msg, req, url){
    var confDel = msg;
    if(confDel ==null){
    confDel= confirm("Are you sure?");
    }else{
    confDel= confirm(msg);}
    if (confDel== true){
    redirect(url);           }
    </script>

  • How to get/read region item value in java script

    Hi All,
    i have text item on a page.
    how to read the item value in java script
    EXAMPLE
    P10_RESULT IS ITEM IT HAS VALUE "38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888"
    NOW I WANT TO REFER ABOVE ITEM VALUE IN JAVA SCRIPT LIKE
    var myPoints=new Array(&P10_RESULT.);
    SO I CAN POPULATE ARRAY WITH CORDINATES
    IT IS NOT WORKING
    WHAT IS THAT I AM MISSING.
    PLESE HELP .
    ThankS
    Rk

    region header code....
    <script src="http://maps.google.com/maps?file=api&v=2&key=&API_KEY." type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    //globals
    var bounds = new GLatLngBounds();
    var map;
    var centerPoint = new GLatLng(38.984898,-76.854549);
    var gmarkers = [];
    //var x= ""38.956472,-77.447777","38.999123,-//77.026184","12.951497,70.668646","17.459075,78.456888"";
    //var myPoints=new Array(x);
    //var myPoints=new Array($x('P10_RESULT').value);
    var myPoints=new Array(document.getElementById('P10_RESULT').value);
    //var myPoints=new Array("38.956472,-77.447777","38.999123,-77.026184","12.951497,70.668646","17.459075,78.456888");
    function initMap()
              doLoad();
                        addMarkers();
    function doLoad()
         if (GBrowserIsCompatible())
                   map = new GMap2(document.getElementById("map"));
                   map.setCenter(centerPoint, 7);
                   map.addControl(new GScaleControl());
                   map.addControl(new GLargeMapControl());
                   map.addControl(new GMapTypeControl());
    function myclick(i) {
    GEvent.trigger(gmarkers, "click");
    function addMarkers() {
         if (myPoints.length) {
              var bounds = new GLatLngBounds();
              for (n=0 ; n < myPoints.length ; n++ ) {
                   var mData = myPoints[n].split(',');
                   var point = new GLatLng(mData[0],mData[1]);
                   bounds.extend(point);
                   var marker = createMarker(mData[1],point, mData[0]);
         map.addOverlay(marker);
              map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
    function createMarker(i,point, title) {
         var marker = new GMarker(point,{title:title});
         GEvent.addListener(marker, "click", function() {
              marker.openInfoWindowHtml('<div style="width:250px;">' + title + '<hr>Lat: ' + point.y + '<br>Lon: ' + point.x + '</div>');
         gmarkers[i] = marker;
         return marker;
    //]]>
    </script>
    page body code
    onload="initMap()" onunload="GUnload()"

  • How to refer an application item in a java script ?

    Hi Friends,
    I have a simple java script for disabling an item as below :
    <script language="JavaScript1.1" type="text/javascript">
        function disFormItems(item1)
          if ($x(item1).value != "")
              disItem = document.getElementById(item1);
                    disItem.style.background = 'beige';
                    disItem.readOnly = true;
    </script>I have an application level item G_BUTTON_FLAG. Based on the value coming into this application item I want to disable the item.
    So I went and changed the script as below :
    <script language="JavaScript1.1" type="text/javascript">
        function disFormItems(item1)
          if ($x(item1).value != "" && $x('G_BUTTON_FLAG').value == "EDIT")
              disItem = document.getElementById(item1);
                    disItem.style.background = 'beige';
                    disItem.readOnly = true;
    </script>Can any one please tell me what am I doing wrong here ?
    Thanks,
    Raj.

    Hi Teku,
    Javascript can only see what is actually on the page - this has nothing to do with Apex, it's just what javascript is designed to do.
    There are two things you can do:
    1 - Add a hidden item to your page and set the application item as its source and then refer to that hidden item instead
    2 - Use Ajax to get the value
    I'd go with the first one as it's the simplest solution.
    Andy

  • Using Java Script With Item Button

    Hi All,
    please i want to know how can i call any java script function from an item button?
    i cannot find the "Action When Button Clicked" tab which is exist in a region button.
    Thanks in advance,
    Ola

    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

  • Jave script to enable and disable items

    Can any one tell me some sites that has used java script to enable and disable items.
    My target is to enable/disable an LOV and a text area when I press a button.

    You could check this example out.
    http://htmldb.oracle.com/pls/otn/f?p=11933:65:54438924816002::NO:RP
    Set the drop-down items to -1 to disable the text areas and any other value to enable them.

  • Adding Java Script RSS Feed to Library Item

    Can anybody help me I have been trying to add a java script
    for a rss feed to a library item page. That way a rss feed shows in
    the library page field. I have 3 sites from 1000 to 10000 pages.
    They all use a library item. I want the current news to show in
    this section of the web page. But it doesn's seem to work when I
    call the page up. I can insert the java script to the web page and
    it works correct.
    Can anybody give me some advice I would appriciate it.
    Thanks.

    > They all use a library item
    I think it's a huge mistake. Why would you use a Library item
    on sites this
    large, and commit yourself to uploading every changed file,
    when you could
    use a server-side include instead?
    > Can anybody give me some advice I would appriciate it.
    I would need to see your Library item's markup to advise you.
    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
    ==================
    "ace1mc" <[email protected]> wrote in
    message
    news:ecsbiu$f67$[email protected]..
    > Can anybody help me I have been trying to add a java
    script for a rss feed
    > to a
    > library item page. That way a rss feed shows in the
    library page field. I
    > have
    > 3 sites from 1000 to 10000 pages. They all use a library
    item. I want the
    > current news to show in this section of the web page.
    But it doesn's seem
    > to
    > work when I call the page up. I can insert the java
    script to the web page
    > and
    > it works correct.
    >
    > Can anybody give me some advice I would appriciate it.
    >
    > Thanks.
    >

  • Muse,Page items slow to load - eliminate render blocking java script?

    Everything was running smooth until I tried to cut and past new items into master pages. Now I have master page items loading out of sequence and very slowly at that. I went to google's page speed insites and I scored a 72% with a reccomendation to "Eliminate render blocking java script in above fold content" as well as "leverage browser caching"
    Well... I have no idea what that means
    any idea how I can improve the performance of my page? I've already compressed the images significantly, I don't think that's the problem. Google talks about expirey dates on cache items being too low or non existant causing delays on pages, and setting priority over viewable items. Can I do this in Muse?
    you can view the site here
    http://batco.businesscatalyst.com

    I've actually been having the same problem - the interesting thing is that I've only really noticed it in the past several weeks (before, everything loaded fine). Could there have been a change in Muse in the way it's loading scripts that is slowing it down?
    Examples:
    www.karlchristiankrumpholz.com
    www.pawdnerscolorado.com
    On the second site, I can't remember if I crunched the images, but on the first one, I used Image Optimizer to crunch down all of the pngs prior to publishing. For reference, I'm publishing both sites via Business Catalyst; one using a free CC account, and one using a paid eCommerce account.
    I ran it through Google PageSpeed, and here's what I get:
    Eliminate Render-Blocking JavaScript and CSS in above-the-fold Content
    Your page has 1 blocking script resources and 5 blocking CSS resources. This causes a delay in rendering your page.
    None of the above-the-fold content on your page could be rendered without waiting for the following resources to load. Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML.
    Remove render-blocking JavaScript:http://webfonts.creativecloud.com/bebas-neue:n4:all.js
    Optimize CSS Delivery of the following:
    http://www.karlchristiankrumpholz.com/StyleSheets/ModuleStyleSheets.css
    http://www.karlchristiankrumpholz.com/css/site_global.css?4210242644
    http://www.karlchristiankrumpholz.com/css/master_desktop-master.css?4254541493
    http://www.karlchristiankrumpholz.com/css/index.css?3941979157
    http://webfonts.creativecloud.com/c/c3d3d5/bebas-neue:n4.TGd:N:1/d
    Leverage Browser Caching
    Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
    Interestingly, image size doesn't appear to be as much of an issue, according to PageSpeed:
    Properly formatting and compressing images can save many bytes of data.
    Optimize the following images to reduce their size by 30.3KiB (13% reduction).
    Losslessly compressing http://www.karlchristiankrumpholz.com/images/headerbackground.png could save 19.1KiB (22% reduction).
    Losslessly compressing http://www.karlchristiankrumpholz.com/images/laurel.png could save 4.9KiB (29% reduction).
    Losslessly compressing http://www.karlchristiankrumpholz.com/images/rebel_%402x.png could save 4.6KiB (7% reduction).
    Losslessly compressing http://www.karlchristiankrumpholz.com/images/karlheader2-u1353.png could save 1,019B (2% reduction).
    Losslessly compressing http://www.karlchristiankrumpholz.com/images/arrowmenudown.gif could save 707B (84% reduction).

  • Java Script: I am in need of it for research items

    I am always needing to download updated versions of java script, it seems.  It also seems that this is a backdoor way to infect a computer with a virus.  I conduct a lot of research on my computer and articles run on java.  I recently upgraded my mac's operating system and java script also needs to be upgraded (so I am prompted to update it).  But, I recently read that hackers will prompt you into thinking you need to update a java script so that it can infect your computer.  How do I trust a java script update prompt?  I updated to OS X Yosemite, is it true that Java Script has been disabled by this operating software system?  If so, is it best to visit oracle to update java?  Should I delete all previous versions of java first and then visit oracle and then update?  Please advise on how to proceed.  Many thanks in advance.

    That's different. You have software on your Mac that requires Java to function. This is completely independent of your web browser, so has nothing to do with that. There's various software like that. Some being Adobe's apps, X-Rite's ColorPort app, ROES software for ordering photo prints from your digital files, and others.
    All it's telling you is an app you want to run is missing the Java runtime software it needs on your Mac. There are a couple of ways to do this.
    1) Download and install Java 6 SE for Mac. Version 6 was the last version Apple produced before turning over all future Java development to Oracle. This will typically fix the error.
    2) You can also install Java 8 from Oracle. If you do go this route, pay very close attention to the installer. It wants to install adware along with Java. Make sure to turn the check box off to prevent that. This alone won't fix the issue since the apps are looking for version 6 of Java. Once Java 8 is installed, open the System Preferences and click on the Java icon. Click on the Security tab of the dialogue that appears and turn off the top check box. This will prevent Java from working in your web browsers, which will stop any such exploits via the web from running.
    Now that you've disabled Java 8 for the web, time to get Java 8 working for apps looking for version 6. Open the Terminal app in the /Applications/Utilities/ folder and enter the two lines below in Terminal, pressing return after each one. To make sure you don't type something wrong, copy/paste the lines from here one at at time into the Terminal window. If you've never used the sudo command before, it will give you a generic warning about using the command. Then enter your admin password to allow the command to complete.
    sudo mkdir -p /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
    sudo mkdir -p /System/Library/Java/Support/Deploy.bundle
    There's no need to follow all of these steps for number 2 if you have no need for Java 8. I need it for ROES software, but I also need version 6 for ColorPort. By following these longer steps, I only need to install version 8. The Terminal lines trick ColorPort into using version 8 as 6. That way, I don't have to install both 6 and 8.

  • I'm note a firefox geek, but ever since my friend told me to install NoScript I can not access my msn and hotmail page. It tells me that Java Script is required, what ever that is. What do I do next. Do I uninstall the No Script. Thanks Ed

    I'm note a firefox geek, but ever since my friend told me to install NoScript I can not access my msn and hotmail page. It tells me that Java Script is required, what ever that is. What do I do next. Do I uninstall the No Script. Thanks Ed edit
    Details

    You are on Windows 2000, you do not have a "Firefox" button, and should consider yourself to be fortunate in that you still have menus and don't have to do anything to get the menus back instead of the "Firefox" button. (The same applies to Windows XP users).
    Use the "File" menu to get to Import. You are not on Windows 7 or Vista, and don't have to put up with the nonsense added for Aero.
    If you want the "Firefox" button you can get it with View -> toolbars -> (uncheck) Menu Bar. The menu bar and the "Firefox" button were supposed to be mutually exclusive (which is impossible in some cases without being incompatible).
    Once you are using the "Firefox" button ...
    Use the "Alt" key to view the menu bar (temporarily) containing File, Edit, View, History, Bookmarks, Tools, and Help. On Windows 7 and Vista, the menu bar was hidden by default in Firefox 4 and above. These menu items are more or less available under the "Firefox" button which has the most used of the built-in Firefox menu items available in a different format.
    To get back to having menus again. "Firefox" button -> Options (second column) -> (check) Menu Bar
    You can make '''Firefox 7.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface

  • Data transfer B/W parent windonw and child window with out java script

    hi ,
    i am using h:outputLink Tag to open child window , i am unable to pass parent window text box value to child window with out java script , Here i am using two different backing beans for parent and child windows . Plz help me .

    Hi -- I pass details between pages regularly. The following has worked for me:
    ApplicationFactory factory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
    ValueBinding binding = factory.getApplication().createValueBinding("#{beanName}");
    BeanName beanProperty = (BeanName) binding.getValue(FacesContext.getCurrentInstance());
    ... then set the you can set the values. Can't recall if I need to use SaveStates for the items. Probably if you use request scope beans.

  • How to  build a  Calculator in WAB Template  by using  Java Script......

    Hi ,
    I am  trying   to build a dynamic  calculator in WAD which is as  similar to one in Executive view in Cognos. The  problem i am  facing  is,  i can  able to build a normal  calculator  by using  java script  but  i am  unable  to read the  key figure  values from  the  analysis  item  on from the  data  provider  in to  by  calculator  by using  on click  function. I wanted  to get the all  the  values in to a internal excel , so  that  my calculator can read the  values from  that. can  any  one  help  me  on getting  values in to internal excel by using   java before the  executing the  web template ?...
    Thanks in advance....
    Jhon.
    Edited by: sap bw on Jul 31, 2008 5:51 PM
    Edited by: sap bw on Jul 31, 2008 5:52 PM

    I might not be understanding your question completely since you mention WAD and then Excel, but if you are asking how to get the key figure values using Javascript in WAD, you can go to the Dataprovider properties and enable 'Output Result Data'.  This will embed an XML element into the HTML output that you can then parse using standard Javascript DOM navigation.
    Hope this helps.

  • How to read the value of Inputfield in WAD in JAVA script?

    Hi Experts,
    I have a requirement in WAD .
    I have put an Input Field (text box), a button and a script control  in the web template.
    In my script control function , I want to read the value entered in the input field using java script. How do I achieve it?
    Thanks in advance.
    Regards
    akshay

    Hi,
    To do this, first you may want to view the HTML source of the report. So, when you have the report launched with the input field, right click and select View Source. Usually it is under a <span> tag with id something like sapbi_snippet_YOURWEBITEMNAME. Most useful commands here are document.getElementById and document.getElementsByTagName.
    You can also access the input web item value using standard sap command SET_SELECTION_STATE_BY_BINDING. Take a look at the documentation on this.
    Hope the above helps.
    Regards,
    wira

  • How to Debug Java Script in Adobe Form

    I have used an alert for empty fields . I have used Check button control for this.
    But the button click is very inconsistent. Some times it triggers the event sometimes it doesnt. Is there anyway to debug the java script. I have installed Script editor for IE but I am unable to use it for Adobe Forms.
    Any help is appreciated.
    Thanks,
    Vasu

    Hi Vasu,
    i think that maybe is the check sequence is not very correct.. and maybe you can try to code it one check for empty fields at a time..
    example
    Name.
    Address.
    Tel.
    Hp.
    Email.
    so u can try to code for one item at a time then slow try to debug it... as last time i use to insert the javascript inside each component then after it i implement into a button and slowly check for the check sequence which one need to be 1st and etc.
    hope it help you. if not maybe u can give more information. maybe i can help you out at myside.
    Regard,
    Ng Jia Jun

Maybe you are looking for

  • What's the best MacBook for basic graphic editing?

    Hi there, I've been saving up to finally get a MacBook after having a pro during university (stupidly it got soaked in my bag during a thunderstorm and didn't have any insurance on it). However, I'm trying to save as much money as I can so can't affo

  • Flash content will not display with Player: 10.3.183.7

    Hello, I helped to design a website last year in Flash based off a template purchased from myflashxml.com.  Up until the latest version of flash 10.3, all seemed to work ok.  As soon as upgrading to 10.3, we see the shift up to the left on the intro

  • Safari won't open I get ct_plugins plug-in ERROR too

    when i open safari i get the following error message: "The application Safari quit unexpectedly. The problem my have been caused by the ct_plugins plug-in. there is a solution said: "This is a problem with the Vuze toolbar you installed; it's not com

  • Colour Effect In after effects

    Hi Friends, I have after effects cs5 and I am learning it  myself by watching free video tutorials available on the internet. I am searching for a tutorial of video colour effect sawn in below image. Actually in that video some area is B&W but some i

  • Trouble with bridge

    Hi everyone, I'm on Mac, Photoshop CS5,1 all updated ok. I have a new problem after processed an image from Bridge to Camera Raw, when I click "Finish" and I return to Bridge, it doesn't take into account changes made in Camera Raw and I do not have