Calling a URL using JavaScript even handler

When I'm trying to call another URL using JavaScript, it doesn't work.
I did following things,
1).Created a Button
2).In javascript event handler, I'm calling Javascript function doSearch()
3). I wrote this function in Header Text Section of the Form Tex as below
<SCRIPT language="JavaScript">
function doSearch() {
location="http://www.oracle.com"
</SCRIPT>
When I saw the source of that button, it shows me as following,
--<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD>
<INPUT TYPE="BUTTON" NAME="FORM_TO_CALL_CUSTOM.DEFAULT.CALL_REPORT.01" VALUE="CALL_REPORT" onClick="doSearch(); do_event(this.form,this.name,1,'ON_CLICK','');">
</TD></TR></TABLE></TD></TR></TABLE>
But, it doesn't call that URL.
Plz. guide me.
null

Sorry, the code for the CALL_Report button is as follow.
--<Tab BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD>
<INPUT TYPE="BUTTON" NAME="FORM_TO_CALL_CUSTOM.DEFAULT.CALL_REPORT.01" VALUE="CALL_REPORT" onClick="doSearch(); do_event(this.form,this.name,1,'ON_CLICK','');">
</TD></TR></TABLE></TD></TR></TABLE
null

Similar Messages

  • How to call a url using javascript

    Hi friends
    Iam a newbie i have a requirement
    i have to call some n number of URL using javascript i have all my url in one table .... i have to call all the url from that table ... and the output of the url should be saved in a flat file...The output of the url is in XML format... can any one please suggest me in doing my task ... and one more thing in which tool can i run the javascript coding...please give me ur suggestion and idea how it can be done ....
    My URL for example ll be like this as shown below wen i run this url it ll give me an XML format output
    HTTP://www.myserver.com/ev_api.action?user_id=<username>l&password=<password>&statevar=history&cutoff=<date>&id=<id>
    Thanks in advance
    Thiliban

    thilib wrote:
    In this OTN is there is javascript forum can please give me the link for it
    Thanks
    thilibJust to rephrase Walter's reply: there is no javascript forum in OTN!

  • How to pass a single quote in a URL using Javascript

    Can someone tell me how to pass a single quote in a URL using Javascript. I have created a Javascript funciton in which I pass several column values from an APEX report.
    The URL for the report link I am using is "JAVASCRIPT:passBack('#EMP_ID#','#Name#','#e-mail#')"
    The problem occurs with the Name and e-mail columns contain a single quote (i.e. James O'Brien)

    Thank you Saad, that worked.
    Since I built the report using type 'SQL Query (PL/SQL function fody returning SQL query)' I had to add some additional quotes to get it to work.
    i.e.
    replace(EMP_EMAIL_NAME,'''''''',''\'''''')
    or
    replace(EMP_EMAIL_NAME,chr(39),''\'''''')
    Thanks for the help,
    Jason

  • Validate Sharepoint site url using javascript

    Hi All,
    I have the below requirement.
    User enters sharepoint site in a textbox and clicks on button.
    On button click, we have to validate the entered sharepoint site exist or not.
    All the code should be in client side. No server side code
    This should be achieved using javascript.
    So, if anyone has a solution for this, could you please help me in sharing the code for the requirement. 
    Thanks & Regards,
    Kishore
    Kishore

    Hi Kishore
    Please go through the links and below code..
    It'll help
    Validation of the entered SharePoint Site
    1. _spUserId (Variable)
    This variable gives the ID of the logged in user. For an anonymous user, this variable will be empty.
    var uid = _spUserId;
    You can test this variable in the address bar of your browser. Try
    javascript:alert(_spUserId);
    You will see an alert message with the ID of the logged in user.
    2. JSRequest (Object)
    Using this JSRequest object, we can get the querystring, pathname and filename. Before using any of these properties, you should call JSRequest.EnsureSetup();
    Ex: page url is http://www.xyz.com?qid=15
    To get a querystring value
    JSRequest.EnsureSetup();
    var q = JSRequest.QueryString["qid"]; // q = 15
    Similarly, you can use
    JSRequest.EnsureSetup();
    var f = JSRequest.FileName; // current page name
    var p = JSRequest.PathName; // server relative url
    3. GetUrlKeyValue(parameter, noDecode, url) (Method)
    GetUrlKeyValue() is a javascript function using which we can get the Query string parameter either from url in the browser or a url that we specify.
    parameter(string): query string parameter from the url.
    noDecode(bool): specifies whether the value has to be encoded or not. If false value is decoded, else returned as it is.(Optional)
    url(string): the url from which Query string values are to be retrieved.(Optional)
    Ex:
    alert(GetUrlKeyValue('a', false, 'www.xyz.com?a=te%20st'));
    The above statement will return the value ‘te st’. Here we are specifying our own url.
    alert(GetUrlKeyValue('a', false));
    The above statement will look for a query string variable ‘a’ in the browser url, and returns the decoded value.
    alert(GetUrlKeyValue('a'));
    The above statement will look for a query string variable ‘a’ in the browser url.
    4. _spPageContextInfo (Object)
    _spPageContextInfo object has several useful properties, some are
    a. webServerRelativeUrl (for current web)
    b. siteServerRelativeUrl (current site collection url)
    c. webLanguage (for localization)
    d. currentLanguage (for localization again)
    e. webUIVersion
    f. userId (current user id just like _spUserId)
    g. alertsEnabled (more for current page if it has any alerts on it)
    h. allowSilverlightPrompt (to have that prompt or not on the page)
    i. pageItemId
    j. pageListId (Guid)
    We can get the webServerRelativeUrl simply by saying
    var url = _spPageContextInfo.webServerRelativeUrl;
    All the remaining object properties can be used in the same way.
    5. escapeProperly(str) (Method)
    This function returns the URL encoded value of a given string.
    var s = escapeProperly("hello world!!"); //s = "hello%20world%21%21"
    6. unescapeProperly(str) (Method)
    This function decodes a URL encoded string.
    var s = unescapeProperly("hello%20world%21%21"); //s = "hello world!!"
    7. STSHtmlEncode(htmlString) (Method)
    This function encodes an html string
    var s = STSHtmlEncode("<p>sample text</p>");
    //s = "&lt;p&gt;sample text&lt;/p&gt;"
    8. TrimSpaces(str) (Method)
    This method trims out the leading and trailing white spaces of a string. It doesn’t remove spaces created by special characters such as ‘\n’, \t’
    var s = TrimSpaces(" Hello World!! "); //s = "Hello World!!"
    I intentionally put more spaces between ‘Hello’ and ‘World!!’ just to show that this method doesn’t remove any spaces between words.
    9. TrimWhiteSpaces(str) (Method)
    This method trims out the leading and trailing white spaces of a string. It also removes spaces created by special characters such as ‘\n’, \t’
    var s = TrimWhiteSpaces("\n\nHello World!!\t\t"); //s = "Hello World!!"
    10. LoginAsAnother(url, bUseSource)
    This method is used to login as different user.(as the name says)
    url(string): the url of the page to which the new user has to be sent after login.
    bUseSource(boolean): A boolean that indicates that the source will be added to the url, otherwise the source will be the window.location.href. This parameter is optional, default is false.
    <a href="#" onclick="javascript:LoginAsAnother('\u002f_layouts\u002fAccessDenied.aspx?loginasanotheruser=true', 0)">Log on as a different user</a>
    11. STSPageUrlValidation(url)
    This function validates a url if it starts with “http” or “/” or “:” ONLY. It returns the url value back if it is a valid url and an empty value if it is an invalid url. If the url is not valid, an alert message is displayed that says “Invalid page URL:”.
    var s = STSPageUrlValidation("praneethmoka.wordpress.com"); //s = praneethmoka.wordpress.com
    var s = STSPageUrlValidation(":praneethmoka.wordpress.com"); //s = "";
    var s = STSPageUrlValidation("w.wordpress.com"); //s = "w.wordpress.com";
    Now please don’t ask me what kind of a validation this is.
    STSPageUrlValidation(url) in turn calls a method PageUrlValidation(url) and here’s the code for PageUrlValidation method
    function PageUrlValidation(url)
    {ULSA13:;
    if((url.substr(0, 4) == "http") || (url.substr(0, 1) == "/") || (url.indexOf(":") == -1))
    return url;
    else
    var L_InvalidPageUrl_Text="Invalid page URL: ";
    alert(L_InvalidPageUrl_Text);
    return "";
    Indul Hassan
    Microsoft Community Contributor
    http://www.indulhassan.com
    You Snooze.. You Lose !!

  • ABAP calling HTTPS URL using CL_HTTP_CLIENT

    Hello,
    I have a requirement where I will have to call a URL inside an ABAP or BSP passing some query parameters  program and then the response will be a big string with all the data I need.
    I found I can use CL_HTTP_CLIENT thanks to Brian weblog.
    The URL is HTTPS, the technical contact told me that I would need to encrypt the data in SSL and after pass to the URL as a query parameter.
    Also the response will be encrypted so I will need to convert from SSL before being able to interpret it.
    He also said that I need to install a certificate on my webas server, and use this certificate.
    So my doubts are:
    Do the class CL_HTTP_CLIENT automatic convert the data to SSL?
    How do I install and use such certificate?
    Regards,
    Mauricio

    check out this weblog (under subheading <b>Release 620</b>) to understand how you can load the certificate and use the same with cl_http_client call
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    Regards
    Raja

  • Can't open links that use Javascript even if Javascript enabled

    I've tried to open links on a recruitment website but the ones that use javascript, or at least I assume they do as this appears at the bottom of the screen when i click on the link javascript:%20OpenWindow(350,402,%20'details.asp?dir=1&id=39649&type=O&checksum=df089b6b4eab6c4134db5582a6d77a31',%20'Update',%20'True'); but nothing happens. Direct links to another website work ok. i'm having no problems with this when using internet explorer.
    many thanks.

    I went to the web site. No problem loading.

  • How do i get the absolute url using javascript?

    I know this isnt a jsp problem but would be grateful if anyone can help.
    In jsp the method request.getRequestURI() would be the equivilent of what I am looking for in javascript.

    document.location

  • Printing different URL with javascript

    I am trying to print a URL using javascript but i do not want to print the current page. I have searched google, this forum and a javascript book and can not seem to figure it out. To exlplain in it generic terms i want to be on one page and tell it to print another. Reason being, I am looking at an overview page and want to print a report made in Oracle reports, (Yes I could load the report and print it but i want to print multiple reports from one button)(The reports do work and are valid) Here is a rundown of what I am doing.
    From a button i am calling a 'url' with the following code:
    javascript:V_PRINT('P50_CUSTOMER_ID','P50_YEAR');
    And then in the html header i have the code: (printing same page twice, just an example)
    <script language="JavaScript" type="text/javascript">
    function V_PRINT (formItem1,formItem2) {
    var formVal1 = document.getElementById(formItem1).value;
    var formVal2 = document.getElementById(formItem2).value;
    var url1;
    var url2;
    url1 = 'http://www.google.com/search?hl=en&q=' + formVal1 + '+' + formVal2;
    url2 = 'http://www.google.com/search?hl=en&q=' + formVal1 + '+' + formVal2;
    url1 = print();
    url2 = print();
    </script>
    This code just prints the current page. I know I am calling print incorrectly and thats where i need the help. Of course I might just be approaching it all wrong. Either way I hope someone with javascript knowledge can help.
    Thanks

    Hello,
    To print a page it has to be open in the browser since all it does it call the browsers print dialog.
    Here is one solution http://www.irt.org/script/508.htm and you can also try a iframe instead of a regular frame.
    If it's crossdomain request like your example here that might cause problems as well. There might be additional problems.
    Carl

  • Problem calling applet method using IE

    I've searched through the forum and can't seem to find anything that can help me fix this. I'm trying to call an applet's method using Javascript. This is working fine under Netscape, but not IE. Everything I've read seems to indicate that I'm doing this right, but I'm getting "Object doesn't support this property or method" when I try to call the applet method from IE.
    In this example method, I'm trying to call the applet's countChars method, which should return the length of the string you pass into it. Works under Netscape 6.2, but not IE 6.0
    Here's my applet code:
    import java.lang.String;
    public class test extends java.applet.Applet {
    public static int countChars(String s) {
    return s.length();
    And my HTML
    <HTML>
    <HEAD>
    <script language="Javascript">
    function refreshApplet()
    /*     i = document.forms.myForm.TestApplet.countChars();
         document.forms.myForm.output.value=i; */
         document.forms.myForm.output.value=document.applets["TestApplet"].countChars(document.forms.myForm.input.value);
    </script>
    </HEAD>
    <BODY>
    <APPLET CODE = "test.class" WIDTH = 400 HEIGHT = 400 ALIGN = middle NAME = "TestApplet" scriptable="true">
    </APPLET>
    <br>
    <form name="myForm">
    <input type="text" name="input">
    <input type="button" value="click me" onClick="refreshApplet();">
    <hr>
    <input type="text" name="output">
    </form>
    </BODY>
    </HTML>
    Thanks in advance!
    Craig Drabik
    Sr. Programmer/Analyst
    University at Buffalo

    I have very similar problem, my applet works OK using Netscape (6.2 and 7.0), but with IE 6.0 It only works with windows XP;
    The reported error is "Object doesn't support this property or method"
    Can someone please help me to solve this problem.
    Cheers
    Horus
    This is my code:
    - I call the applet using javaScript and input the method setData with two strings.
    function graphic()
         var dataZenith;
         var dataManual;
         initVariables();
         dataZenith = graphicZENith(); //Call other Javascript functions
         dataManual = graphicManual(); //Call other Javascript functions
         document.AppletOne.setData(dataZenith,dataManual);
    I run the applet with this HTML code:
    <applet NAME="AppletOne" code="Appl.class" width="450" height="450"
    MAYSCRIPT></applet>
    //Applet code/////////////
    import java.awt.*;
    import java.awt.geom.*;
    import java.applet.*;
    import java.util.*;
    public class Appl extends Applet {
         private int [] myArray1 = new int [156];     
         private int [] myArray2 = new int [156];
         private boolean flag = false;
         // maxDataYAxesNumber es usado para dividir el eje de las Y
    public void init()
              setFont(new Font("SansSerif", Font.BOLD, 12));
              setBackground (Color.white);
              setSize(getSize());     
    // Get data and put in an array
    public void setData(String data1, String data2)
              final String DELIMITER = ",";
              final StringTokenizer theTokens1 =
                   new StringTokenizer(data1, DELIMITER);     
              final StringTokenizer theTokens2 =
                   new StringTokenizer(data2, DELIMITER);
              try
                        String dataX = data1;
                        for (int i = 0; i < 156; i++)
                        myArray1[i] = Integer.parseInt(theTokens1.nextToken().trim());
                        myArray2[i] = Integer.parseInt(theTokens2.nextToken().trim());
              catch (NumberFormatException e) {};
              flag = true; //I get the data OK
              repaint();
    public void paint (Graphics g){
    Graphics2D g2d = (Graphics2D)g;
    setData(data1, data2) ;
    if (flag == true)
                   //Call other functions to process the graphic
    else g2d.drawString(" Sorry I can get Data", 100,80);          

  • Problem with access JSF applet using javascript

    Can someone help me!
    I'm using a applet in jsf page, and i'm trying to access this applet using a javascript.
    Here is the applet code
    <jsp:plugin code="DoAction.class" codebase="." height="400" hspace="10" jreversion="1.5" type="applet" vspace="50" width="100" name="myApp"/>
    Here is the javascript
    function printReturn()
    var a = document.myApp.returnString();
    alert(a);
    "returnString" is the method in applet which simply return a string
    But it doesn't work, it works well when i'm using this applet in JSF
    <applet code="DoAction.class" width="100" height="50" name="myApp" ></applet>
    Unfortunately it's depricated!
    Please tell me what is the solution....

    Thank You for replying.
    I'm trying to call applet method using JavaScript.
    It works when i'm using below apllet tag.
    <applet code="DoAction.class" width="100" height="50" name="myApp" ></applet>
    But it's deprecated
    It doesn't work for below applet tag
    <jsp:plugin code="DoAction.class" codebase="." height="400" hspace="10" jreversion="1.5" type="applet" vspace="50" width="100" name="myApp"/>
    This is my javascript
    <script type="text/javascript">
    function setSearch()
    var a = document.myApp.returnString();
    alert(a);
    </script>

  • Use javascript to make a Flex panel?

    Trying to make a functional indeterminate progress bar, i'we tried almost anything i could think of. nothing worked (or it worked badly). the one thing i haven't tried yet is to use actionscript to create a palette with a swf movie inside.
    but i need to create and call this palette using javascript.
    is there a way to do this? something like:
    app.doScript("actionscript code bla bla bla",ScriptLanguage.ActionScript)

    You can't run a Flex script with doScript, you need to "run" it as an SWF inside a ScriptUI component:
    http://blogs.adobe.com/indesignsdk/2009/05/flash_uis_with_indesign_cs4.html

  • External XML using Javascript

    Hi
    By using captivate 5.5, I have created the Glossary using Javascript. But I am unsure on how to 'call' external xml content in a textbox in Captivate 5.5. Please guide me on how to call external xml using javascript.
    And is there any possibility to call "For Loop" javascript in the captivate 5.5. Please advice on how to proceed further.
    Thanks
    Sathish BC

    Explore this:
    http://macrofireball.blogspot.com/2007/07/adding-xml-data-in-adobe-captivate.html

  • How to write an JavaScript Event Handler for Portal Form?

    I have created an form in Portal builder.
    There are two column, R04 and R05.
    I need to use Javascript Event Handler to check if R04 value is smaller than R05 value.
    Can I be able to build up this function?
    Can anyone give me a hint? or steps?
    Thanks

    Here are some suggestions.
    1. do what we did, and write your own protocol server that understands whatever custom commands you need, and then write a custom thin client which will send commands to and receive responses from this protocol server. you can use any language for the client software. the protocol server should be written in java so that it can receive commands from the client and then use the 9iFS API to execute the requests or retrieve the data that the client wants to display.
    2. write a custom fat client, in java, that accesses the 9iFS API directly. this means that each client will be accessing the iFS schema on the database machine directly. if you configure the iFS service on the client to use the THIN driver, then you won't need to install the Oracle client software on the client machine. You'll just need all the iFS .jar files and the database's JDBC driver (classes12.zip). Note that using the THIN driver is not supported because of bugs and performance problems. If you use the OCI8 driver, which is supported, then you'll have to install the whole Oracle client software package on the client machine.
    3. write a thin client that uses the WebDAV protocol, and communicate with our built-in DAV server. this approach will allow you to execute any command that DAV understands. you may be able to find some free HTTP or DAV client software on the net, or you can try writing it yourself. this is probably a better solution than number 1 unless you really need to send custom commands that are not in our DAV server's vocabulary.

  • HTMLB eventing using javascript

    Hello experts,
    I have a requirement which i am unable to figure out how to do it .
    I have HTMLB dropdown in which the items are popolauted using listitembox. Now my requirement is to disable another drop down depending upon the value selected in this dropdown .
    There is no controller in this PDK component . Hence need to use javascript to handle this . But not able to do it.
    Could anyone help me in resolving this .
    Points will be awared.
    Regards,
    Pratima.

    Hi,
    never used, but found here: [http://www.sapdesignguild.org/resources/htmlb_guidance/index.html|http://www.sapdesignguild.org/resources/htmlb_guidance/index.html] in this part: [http://www.sapdesignguild.org/resources/htmlb_guidance/dropdown_dev.html|http://www.sapdesignguild.org/resources/htmlb_guidance/dropdown_dev.html] that it should support onClientSelect event - that should do it.
    Romano

  • Calling url without using javascript

    Hi all,
    In my BSP application, I need to call url in a popup or in the application itself without using javascript.
    My requirement is the url should not be visible to the users. For this, if a javascript is used the url would be visible to the users whereas if the url is called in the BSP application itself then only BSP url would be visible.  Can anyone suggest some methods to call url in a BSP application?
    Thanks and Regards,
    Sneha.

    Hi Sneha,
    you can have ABAP make the HTTP request then just pass the response directly back to the web client.
    Sample of how to make a HTTP request can be found at http://help.sap.com/saphelp_nw04/helpdata/en/e5/4d3514c11411d4ad310000e83539c3/frameset.htm
    Cheers
    Graham Robbo

Maybe you are looking for

  • How to display the fields dynamically in OAF

    Hi All, I have developed a OAF Page and it has one table region and has 5 rows on it.One of the field on the table is Message Choice. The requirement is,If I select "Parts" then Lov Field should be displayed and If I select "Services" then one text f

  • MacBook 2.1 Kernel Panic on startup

    Hi, Guys! I have a macbook that sometimes goes in Kernel panic at startup I need to power of the the mac pressing the power button for some seconds, after this it boot normally... this is the log of kernel panic: Interval Since Last Panic Report:  11

  • I was wondering if someone could help me

    hello i was wondering if someone could help me. i dont know if this is the right forum so im sorry if its not! my family computer recently got a virus and was gone for good. we got a new computer and i redownloaded itunes. i thought that all the musi

  • Find out where my log4j is configured from

    now that i got my xml config working, it seems that every logging statement is generating 2 log messages on the stdout. one of them comes from my xml config and the other??! how do i find out why/where the evil log statements are configured?

  • How often does Cisco release signature updates?

    Hi, i would like to know how often does Cisco release updates for the Signature engine for the IPS appliances? I was not sure to make the auto update from Cisco.com to be every-day, every-hour or once a week? Also can you advise me of the recommended