Issue with Bookmark functionality (using java script) in WAD.

Hi,
I am working on a WAD report and instead of using the default bookmark functionality within WAD, i use a java code to get the bookmark url in a new window.
But the problem is the java code is not working consistently at all times.
Issue1: If i click on the bookmark button on the report for the first time, it will open up a new window with the bookmark link. But if i close that new bookmark url window and again click on the bookmark button, a new window is opened which displays the template corresponding to the bookmarkk generated earlier (the report in its executed form), instaed of the bookmark url.
Can anyone help me to correct this issue. At any time i click the bookmark button i want to get the bookmark url opened in the new window, instead of the template.
Issue2: The bookmark is not at all working at particular times. It will show error message at the bottom the page. What I am  thinking is, this is because of the misalignment of the java code when you sava the WAD report. The java code is so sensitive that it gets realigned each time you save the WAD report. But sometimes even without making any changes also it is not working.
If anyone has any suggestion or inputs for solving these issues pleese help ASAP. The java code i used is given below.
function createBookmark()
var bwUrl="<SAP_BW_URL CMD='BOOKMARK'>";
child1=window.open(bwUrl,'win1','width=1,height=1,alwaysLowered=0');
window.focus();
//Ensure that BW completed generation of the bookmark url.
now = new Date();
startTime = now.getTime();
delayTime = 3000;
//Set timeout to 3 seconds
waitTime = startTime;
//check if the bookmark url is ready and timeout after the specified time (delayTime).
while (waitTime<(startTime+delayTime))
now = new Date();
waitTime = now.getTime();
//BW identifies a bookmark using BOOKMARK_ID. The presence of this string
//in the url is used to identify creation of the bookmark. If bookmark
//is created on the server, proceed to the next step.
if (child1.location.href.indexOf("BOOKMARK_ID") >0) 
break;
bookmark_url = escape(child1.location.href);
bookmark_url = bookmark_url.replace(/%3A/g, ":");
bookmark_url = bookmark_url.replace(/%3F/g, "?");
bookmark_url = bookmark_url.replace(/%26/g, "&");
bookmark_url = bookmark_url.replace(/%3D/g, "=");
var base_url = window.location+"";
var base_index = base_url.indexOf("?");
base_index = base_index + 1;
var book_link = base_url.substring(0,base_index);
if (book_link.indexOf("sapdbi")!=-1)
book_link = "http://dep.xxx.com/sso/index.jsp?target=BW&";
if (book_link.indexOf("sapqbia1")!=-1)
book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
if (book_link.indexOf("sapqbia2")!=-1)
book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
if (book_link.indexOf("sappbia1")!=-1)
book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
if (book_link.indexOf("sappbia2")!=-1)
book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
if (book_link.indexOf("sapqbi")!=-1)
book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
if (book_link.indexOf("sappbi")!=-1)
book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
var book_index = bookmark_url.indexOf("?");
book_index =   book_index +   1; 
var book_length = bookmark_url.length;
var temp_link= bookmark_url.substring(book_index,book_length);
portal_bwUrl = book_link+temp_link;
child1.close();
// The below two lines are not necessary, it is left for reference.
// https://portal.xxx.com/sso/index.jsp?target=BW&SAP-               //LANGUAGE=EN&language=EN&cmd=LDOC&TEMPLATE_ID=IPUWT_FRAME
bookmark_window=window.open("",'_blank','width=1000px,height=30px,status=0');
bookmark_window.moveTo(50,500);
var body_tag = '<body leftmargin=3 topmargin=3 bgcolor=#cad4e3 class=&amp;SAPBEXTbsBdyEdg&amp;>';
var body_text ='<p><font face=Arial size=2>
This bookmark can be copied and pasted to Internet Explorer-Favourites, mail or other documents:
</p>';
bookmark_window.document.write('<title name="SAP_BW_TITLE_!IID_171">Bookmark</title>',body_text, body_tag, portal_bwUrl, '</body>');
Thanks in Advance.

Hi Danny
Thanks for the update
Hi Danny
  Thanks for the update.
  I can't find any code in the attachment.Its a Web Page.
  Rightclick on webpage and View Source
  Then i can find Code.
  Still it is not working
Issues: Which object i have to replace with the URL in the code
Value = 'Weekly'
or
fun(WEEKLY REPORT)
and
when i paste that code in the XHTML tab of template and tried to save it,The scripted is changed
Please update how to proceed
Thanks

Similar Messages

  • Using Java scripting in WAD

    Hi All,
    Is it possible to make changes in Java Scripts used in WAD report?
    Can anyone tell me what are the changes possible using Java scripting and from where can I get the documentation for the same?
    Thanks.

    Hi Suchitra,
    With NW2004s, most of the javascript options can be entered directly through the Script object into the Web template. The suggestion is to use the command wizard to modify/control the behaviour of the objects...
    Check this links for details regarding Javascript.
    http://www.w3schools.com/jsref/jsref_onload.asp
    Hope this helps.
    ****Assign points if helpful****
    Regards,
    Ravikanth.

  • Trouble with sites that use java scripts for downloading.

    FF4 seems to do nothing when I hit the button to download a file.
    IT does not freeze the application it just does nothing.
    There is no response at all.
    I am running FF4 on a Laptop w/
    CPU Pent4 w/2Gb RAM
    O/S: WP prof w/SP3
    Many thanks
    LITC

    hI,
    Pls, I'm happy to know u r using application server. I have just started reading enterprise bean.
    But I could not set the path and some other configurations for it to start working.
    Pls, I would be most grateful, if u could put me through on how to configure application server.
    Right now, I'm in the state of dilemma due to the insufficient knowledge in it.
    My email is [email protected]
    Remain blessed

  • How to do Front End Validation for JSP Forms using Java Script with 9iJD...

    How to do Front End validation using 9iJD. Any wizard is there. We need to do the val. using Java Script. If its not available, please include that in the Production Release.

    Thanks a lot. When is the Production Release is scheduled. Please tell us whether itll be available for Free Download. Bec, we couldnt buy. Bec, if its working fine with all the options without any bug only, we can ask our company to buy 9iJD by stating the advantages. Just explain us.

  • Spawn a new PDF using Java Script within LC Designer

    I am trying to spawn a new PDF file to be created from an existing PDF using Java Script within the LC designer
    I have this example but I can't get it to work
    function createPdf()
        pdf = pdf$();
        pdf.addText('Hello World');
        pdf.writeToFile('c:/temp/hello_world.pdf');
        window.open('file://c:/temp/hello_world.pdf');
    Is it possible to create a PDF like this within LC Designer?

    Hi
    I would like to see if it was possible.  I thought it would be easy, as
    there is a standard batch processing sequence (Print 1st page of all) using
    Java that comes with Acrobat 7.  This allows you to print the first page of
    a number of files that you select when the sequence is run.  Its code is:
    /* Print 1st Page */
    /* This sequence prints the first page of
       each document selected to the default printer.
    this.print
    To my uninformed mind it seemed logical that the same code, slightly
    modified to print all pages, should work from within a form.
    Anyway, if there is a way to choose individual files, I would appreciate
    that.
    Thanks
    Rob

  • As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 also how we can insert,update,delete records in list using ECMA script.

    As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 step by step also how we can insert,update,delete records in list using ECMA script.
    Thanks and Regards, Rangnath Mali

    Hi,
    According to your post, my understanding is that you want to use JavaScript to work with SharePoint list.
    To create list items, we can create a ListItemCreationInformation object, set its properties, and pass it as parameter to the addItem(parameters) function
    of the List object.
    To set list item properties, we can use a column indexer to make an assignment, and call the update() function so that changes will take effect when you callexecuteQueryAsync(succeededCallback,
    failedCallback). 
    And to delete a list item, call the deleteObject() function on the object. 
    There is an MSDN article about the details steps of this topic, you can have a look at it.
    How to: Create, Update, and Delete List Items Using JavaScript
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • 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 fetch Properties of all Survey Lists from site collection using Java Script in SharePoint 2013

    Hi,
    I am trying to fetch properties of all lists of "Survey Type" from my site collection in SharePoint 2013 using script editor web part. I am able to fetch properties of one list by mentioning its name explicitly in code but not all survey
    list.
    My task is to display Survey name , description ,Time created and URLs of all survey lists using java script in script editor web part.
    And let me know , if there is any other OOB feature of SharePoint 2013 to achieve the same. 
    Here is the code  :
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
    function sharePointReady() {
         GetSurveyList();
     function GetSurveyList() {
            var spListTitle = " List Name";
             var clientContext = new SP.ClientContext.get_current();
            var oWeb = clientContext.get_web();
            this.surveyList = oWeb.get_lists().getByTitle(spListTitle);
            clientContext.load(surveyList);
            clientContext.executeQueryAsync(Function.createDelegate(this, this.GetListProperties),Function.createDelegate(this, this.onFailure));
     function GetListProperties() {
            $("#SurveyList").text("");
            var surveyTable = "<table border=1>";
            surveyTable = surveyTable.concat("<tr><td>Survey Name</td>");
            surveyTable = surveyTable.concat("<td>Survey Description</td>");
            surveyTable = surveyTable.concat("<td>Time Created</td>");
            surveyTable = surveyTable.concat("<tr><td>" + surveyList.get_title() + "</td>");
            surveyTable = surveyTable.concat("<td>" + surveyList.get_description() + "</td>");
            surveyTable = surveyTable.concat("<td>" + surveyList.get_created().format("MM/dd/yyyy hh:mm tt")+ "</td>");
                 surveyTable = surveyTable.concat("</table>");
            $("#SurveyList").append(surveyTable);
        function onFailure(sender, args) {
            alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    <div id="SurveyList"></div>

    Shifa,
    Please use search result webpart or content query webpart to list all survey list.
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to pass parameters to a page invoked using java script.--- Very Urgent.

    Hello,
    I have an advanced Table in my page. In the first column there is a
    messageChoice. In the second column there is link item.On the link item i have set the following value for destination uri.
    javascript:var a=window.open('OA.jsp?page=/AutoSales/oracle/apps/per/auto/webui/AutoSurrogatesPG&retainAM=Y','a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbar=yes'); a.focus();
    The user selects a value from the message choice and when he clicks on the link item, the value selected from the list should go to the new page invoked using java script as a parameter. I need the value selected from choice to generates few fields in the new page. I have preferred java script because i need the base page and a model window should open. I have tried using setForwardUrl() and setting '_blank' and new window for target frame property on the link item. But it isnt working. The new page is opening in the same window.
    I have also tried putting the value in a session.
    Please help with any kind of suggestions or solutions.
    Thank you.

    Uma,
    You need to
    - Have a PPR Action on the messageChoice (this would trigger a form submit to populate the underlying View Attribute)
    - Either
    - Retrive the value from the View Attribute in the pop-up page (as I could see that you are retaining the AM)
    - Use a SPEL in the link (on the modal page) to use the value from the View Attribute as the parameter value (in the form ${oa.current.<ViewAttributeName>)
    HTH

  • How to pass values to variables in WAD 7.0 using java script

    Hi.,
    My requirement is based on WAD 7.0.
    The sales value has to displayed in WAD using graph with various chart types.
    I have created variables for plant and material group in a query.
    I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
    Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
    Kindly help me how to use java script to get the values from FORM and pass it to variables.
    Regards,
    Selva

    Hi Selva,
    You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
    Please configure Action on the ButtonGroup webitem to use 'Commands'.
    ->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
    ->Set Display Variable Screen setting to OFF
    ->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
    ->Repeat above steps for Query Variable Material Group
    Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
    --Priya

  • Display pop ups in the jsp by using Java script

    Hi
    can any body say ,how to display pop ups in the jsp by using Java script ?

    that's correct. You can use the below code for AJAX request.
    <script type="text/javascript">
    var httpObject = getHTTPObject();
    //create XMLHttpRequest object
    function getHTTPObject() {     
         var xmlhttp;
         if (window.XMLHttpRequest) // if Mozilla, Safari etc
              xmlhttp = new XMLHttpRequest();
         else if (window.ActiveXObject){ // if IE
              try {
                   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
              catch ( e ){
                   try{
                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                   catch ( e ){}
         return xmlhttp;
    //define the function to send the request
    function sendRequest(){
        var currDesc = document.getElementById("description").value;
        var URL =  "manageMaintAction.do"; //action mapping in your struts-config
        var queryString = "currDesc="+escape(currDesc); //get the currDesc value in your action class like request.getParameter("currDesc")
        httpObject.open( "Post", URL, true );
        httpObject.onreadystatechange = cbFn;
        httpObject.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded");
        httpObject.send(queryString);
    //callback fn
    function cbFn() {
        if (httpObject.readyState == 4)
             if (httpObject.status == 200)
              var result = httpObject.responseText;
              alert(result);
    </script>

  • Issue with Duplicate FUNCTION

    Hi Guys:
    I am experiencing some issue with DUPLIATE FUNCTION.  What happen is that I have create some BUTTONS on the stage that was used througth out difference scence.....those buttons has same action that point page to particular scence.  And this is when I found the DUPLICATE FUNCTION issue.
    I found that I could get away by changing the name of the FUNCTION, but as I have quite a lots of those buttons so I really don't think this method is very pratical and organized.  So does anyone have any better idea how this can be solved?
    Many Thanks!

    Thanks so much, this did solve the problem.  Studpid me that were trying to add same FUNCTION on each Scene that has the same button.  Initially I thought it's more complex in AS3, but seems AS3 is actually trying to make thing easier and more praticler.
    Not really good at previously AS, but decided to spend some time on learning AS3.0 now.  Hope I could help people like me on the forum with question about AS3.0 soon. Just like the favor you did for me.
    Many Thanks!!

  • Acrobat standard 9.0 error while enabling commets option using Java script object

    I'm using the below java script code in my VB 6.0 application for enabling commets options in the PDF file
    Dim oJSO As Object
    Set oJSO = mPDDoc.GetJSObject
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    It is working fine till Acrobat 8.0. Now I'm trying with Acrobat 9.0 standard edition, it is throwing scripting error 'An unhandled Win32 exception occured in Acrobat.exe[308].
    Can anyone suggest the way to enable 'comment' options in Acrobat Standard 9.0 using Java Script Object?
    Thanks

    I get much the same problem with VB6, Acrobat 9 Pro and WinXP SP3. When I single step the line:
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    in debug I go to the error handler for my Sub. Inspecting the VB Err object has Number = -2147417851 and Description = "Automation error
    The server threw an exception." I get a Microsoft crash notice about Acrobat a short while later.
    I've experimented with the JavaScript debugger in Acrobat and you can execute Collab.showAnnotToolsWhenNoCollab = True and reference the value of Collab.showAnnotToolsWhenNoCollab in the console. The problem appears only when accessing Acrobat Javascript through the Interapplication Communication API.
    If anyone can help it would be appreciated. I tried Adobe's Acrobat support and they were no help at all.

  • New to Java Script(Want to open a new window using Java Script)

    Hi all,
    I am new to using Java Script. Now I have a HTML(First.html) page with a ADD button at the end of the page. What I want to know is, if I drag and select some part of the First.html and click on the ADD button a second HTML page(Second.html) should open displaying only the selected contents....
    Please help :-(

    myRef = window.open(self.location,'mywin',
    'left=20,top=20,width=500,height=500,toolbar=1,resizable=0');

  • By using Java scripting how  can  compare database value to Forms value?

    i develop portal form n want to compare field that is Issued quantity with available quantity through java scripting.please send me syntax with an example.
    problem:
    if issued quantity is greater than available Quantity then appear alert message
    Thanks,
    Sadaf

    this is the false forum for you. Try it in the database forum e.g.

Maybe you are looking for

  • Action to put 3D watermark on images...

    I have an action that puts a 3D watermark diagonally across my image.  What I'd LIKE to have it do is properly position itself and scale itself to fit images of different sizes and dimensions....... For example, if my image is 1024x768, my "horizonta

  • Grouping of files in the file system

    hi all, i am using Forms [32 Bit] Version 6.0.8.24.1 (Production). with the help of host command i am uploading any type of files from user specified location to specified directory. My requirement is like the files should be grouped wile saving to t

  • Cash Discount has become unrestricted

    Dear Experts, I have configured cash discount through payments term route. I have also maintained the SKTO condition in SD in pricing procedure. The issue is that while clearing (F-32) the system is accepting whatever discount we are entering. It is

  • ODI 10.1.3.5.1 - Where do I find this???

    Hi Does anybody know where I can download ODI 10.1.3.5.1 ?? I need to upgrade from 10.1.3.5.0 asap to get a bug fix. When I log on to http://www.oracle.com/technology/software/products/odi/index.html all I see is version 10.1.3.5.0 Thanks all

  • Missing PI_BASIS plug-in between 2002.2 and 2005.1

    Hi gurus, I need to install on my SAP System (SAP R/3 Enterprise) the <b>PI_BASIS 2002_2_620</b> (and many more) plug-ins but someone have still installed the <b>PI_BASIS 2005_1_620</b>. Now, on my server, I have only this two PI_BASIS plug-in releas