Web.show_document() with javascript

Hi Guys,
I'v been searched this forum about web.show_document() with javascript.
I saw some threads said
I can do like
WEB.SHOW_DOCUMENT ('javascript:window.open("http://www.google.com","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes");self.close()','_blank');
and someone said it worked, but it doesn't work in my machine.
also some one said the javascript engine is not included in Form 10.1.2, so I can not use WEB.SHOW_DOCUMENT function like above.
My form builder is 10.1.2.0.2 (Production), os is xp sq2 ,ie 6.(ie6 has some tighter security)
I want to get clarification about this function, can i use the javascript on it or not ? I really want the pop up window without toolbar and customize size. I need do some configuration in formweb.cfg also?
Thanks in advance. I appreciated every response.
Appcat

Hi Jan,
Thanks for your reply. I check the metalink about it.
The first solution is
1. Make forms Developer URL a trusted site in IE to allow script executions.
For that open Internet Explorer->Internet Option-> Security.
Select the "Trusted Sites" Option.
Click on the Sites Button.
Add the Developer Suite URL in that.
for example
http://<Yourmachinename>:8889/
It doesn't work in my machine ,still can not activate the javascript.
The second solution is
2. Place the script invocation code in a html file in Oracle_home/forms/server directory and call it.
For example :
Create a simple form.
In Forms Trigger :
web.show_document('http://<Yourmachinename>:8889/file.html');
In the file.html you may enter the code, for example:
<HTML>
<HEAD>Heading</HEAD>
<BODY>
<SCRIPT LANGUAGE="Javascript">
window.open("http://www.yahoo.com","_self");
</SCRIPT>
</BODY>
</HTML>
It also doesn't work in my machine, the problem is http://<Yourmachinename>:8889/file.html can not be found, even i put it under the Oracle_home/forms/server folder, but i click it directly ,the javascript works. that means the URL http://<Yourmachinename>:8889/file.html is incorrect or I should put the html file into other directory. And I also checked the default.env,FORMS_PATH=D:\DevSuiteHome\forms.
anything wrong with my env?
Do you have any idea about it?
Thanks,
Appcat
Message was edited by:
user577805
Message was edited by:
user577805

Similar Messages

  • Web.show_document using javascript in Forms6i

    Dear all,
    I wnat to know in forms6i , is it workable calling web.show_document with javascript?
    As I face a problem that calling a url by web.show_document, but the requirement should not display the menu bar ... how can I do?
    Thanks in advance.
    JY

    jennisy wrote:
    Hi,
    Actually, there is a button to trigger the web.show_document.
    I've tried this code, but it doesn't work. There is no any feedback and no error popup.
    WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://www.yahoo.com"))','_blank');
    Hi JY,
    what happens if you actually try this
    Web.Show_Document(‘http://www.yahoo.com’, ‘_blank’);

  • Closing the browser windows created by web.show_document and javascript

    From Forms I am issuing a http request using web.show_document and javascript:window.open(). The http request makes a remote procedure call to a coldfusion component on a JRun appserver. I want this rpc to fire in the background so that the current forms browser window remains as is.
    The logic is as follows
    l_rpcURL := 'http://....just a standard URL.....'; -- edited for this thread
    l_jsURL := 'javascript:window.open("' || l_rpcURL || '","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=no");self.close();';
    WEB.SHOW_DOCUMENT (l_jsURL,'_blank');
    The http request works fine but leaves a browser window behind. It's the one created by the javascript.window.open(). If I remove the self.close() from the javascript then I have two browser windows open, one from web.show_document and the other, as described previously, from the window.open().
    Any idea how I can force closure of the window opened by the window.open() ?
    Thanks

    Hi,
    did this occured afer installing service pack 2?
    A work around is The only solution that is to create a close.html file and calling this file in the code: Web.show_document('http://server:port/close.html','_self');
    <html>
    <body onload="closeit()">
    <script>
    window.close();
    </script>
    </body>
    </html>
    Monica

  • WEB.show_document with MAILTO in IE8 - Navigation Cancelled message

    When generating an email from within Oracle Forms 10g using:
    WEB.show_document('mailto:'||'[email protected]'||'?subject='||'test msg'||'&body= 'test body','_SELF');
    An IE8 window pops up with a message saying 'Navigation to the webpage was cancelled'.
    The test email does appear separately, but if the email is generated a second time, the email will not be generated unless the window saying 'Navigation to the webpage was cancelled' was manually closed before the second email generation.
    If we try the same test in our IE7 browser, the email pops up without an IE window coming up in the background (as expected).
    We have tried changing the last parameter to _BLANK and also excluding it altogether, neither option works properly in IE8.
    What code can I use to generate an email within IE8 & IE7 without the extra browser window appearing in the background?

    Ok - so I've had a TAR logged with Oracle since before asking my colleague to post the same query on here.
    As of a couple of days ago Oracle were able to reproduce the same issues using a simple test case. Yesterday they came back with the first part of a fix and updated "Note 1075355.1 - How To Use WEB.SHOW_DOCUMENT To Open Multiple Pages In The Same Browser" accordingly.
    Basically if you are running IE8 on Windows XP and want to use the WEB.SHOW_DOCUMENT with mailto to launch an e-mail you need to specify a named window instead of the regular parameters which are: self, parent, top, blank
    So you would need to use something as below where the word CUSTOM can be anything.
    WEB.show_document('mailto:'||'[email protected]'||'?subject='||'test msg'||'&body=' ||'test body','CUSTOM');
    However this does not appear to fix the issue for IE8 when running on Windows 7.
    Below are other security settings that were recomended and we tried (but I don't think they had any effect):
    1. In IE 8 go to menu Tools -> Internet Options -> Security -> Sites ->
    - Add this website to the zone :
    mailto
    - Uncheck "Require server verifcation (https:) for all sites in this zone."
    - Click Add
    2. In IE 8 go to menu Tools -> Internet Options -> Security -> Custom level
    - Set 'Display mixed content' to Enable.
    Anyway hopefully this information may be useful to anyone else experiencing the same issues - I'm kinda surprised that this hasn't come up and I am interested to hear how other people send email from Forms 10G or 11G applications?

  • Web.show_document() with .csv-Files

    Hallo,
    when I try to show a .csv-file using web.show_document in MS-Excel I'm facing the following problem:
    Depending on the windows-settings (?) before showing the Excel-sheet the browser opens an alert 'open/save file'.
    When this alert is activated the web.show-document() is not successfull, that means: it seems that the browser tries to open the new window but it immediatly 'crashes' (I'm using '_blank' as parameter).
    When this alert is not activated everything works perfect.
    My guess is that it has something to do with whith the javascript-problem under XP-SP2. (i also can't get javascript working together with web.show_document).
    Enviroment is: Forms 10g, Windows XP SP2, MS-IE (Mozilla works fine), 10g iDS and iAS
    any ideas?
    tia
    Frank

    Hello,
    already done, doesn't help.
    The odd thing is: when I type the url web.show_document should show directely into the IE (with virtual pathname) the alert shows up, I can choose 'open' and it works (thats the way I get rid of the alert). It seems to me that showing the alert somehow causes the problem in combination with web.show_document.
    I have a similar problem with javascipt. When I type it directly into the browser everything works fine, from web.show_document .. no way.
    So my guess was that maybe the alert itself uses javascript. I dont know much about java and browsers and so its really only a guess.
    The Alert I'm talking about is the following (modulo translation errors):
    do you want to open or save the file
    Name... / Type... /from....
    open/save/cancel -Buttons
    checkbox: always ask before opening a file of this type
    Frank

  • Issue while generating report using web.show_document with https

    Hi All,
    I am facing some issue while seeing the report using web.show_document as shown below:
    https://ucrmskr.apac.nsroot.net:10301/forms/html/001725032_gca.rtf_
    In this case the report opens directly without asking for me to save or open or cancel option
    whereas if I hit
    http://scrmskr.apac.nsroot.net:7801/forms/html/001725032_gca.rtf_
    it asks for save or open or cancel option
    so that I can save the report to my machine and open in wordpad format
    The report generated in the first case is not coming in proper format
    Below are my forms.conf mappings:
    # Name
    # forms.conf - Forms component Apache directives configuration file.
    # Purpose
    # It should include the weblogic managed server (routing) directives for
    # the servers where Forms applications are deployed and other miscellaneous
    # Forms component OHS directives.
    # Remarks
    # This file is included with the OHS configuration under
    # $OI/config/OHS/<OHS Node Name>/moduleconf sub-directory.
    # virtual mapping for the /forms/html mapping.
    RewriteEngine on
    RewriteRule ^/forms/html/(..*) /workaroundhtml/$1 [PT]
    AliasMatch ^/workaroundhtml/(..*) "/ucrmap1/weblogic/bea/ucrms/config/FormsComponent/forms/html/$1"
    RewriteRule ^/ucrms/icons/(..*) "/workaroundicons/$1" [PT]
    AliasMatch ^/workaroundicons/(..*) "/ucrmap1/weblogic/bea/ORA_PFRD/forms/java/$1"
    RewriteRule ^/forms/help/(..*) "/workaroundhelp/$1" [PT]
    AliasMatch ^/workaroundhelp/(..*) "/ucrmap1/ucrrgbg2/help/$1"
    <Location /forms>
    SetHandler weblogic-handler
    WebLogicCluster kauh0079:9001
    DynamicServerList OFF
    </Location>
    Please let me know what needs to be done additionally if we are trying to hit https because in the second case we were hitting http with similar mapping in diff environment and it was generating report successfully.
    Regards,
    Harish

    Thanks for answering,
    I changed the URL from
    http://nbotlaguduru.dms.local/export/FMSLaborChargesalcs20060829132645.pdf
    to
    http://nbotlaguduru.dms.local:8889/export/FMSLaborChargesalcs20060829132645.pdf
    and the same problem occured
    the file is located on my local C drive in:
    C:\lcs\export
    seems as though I am missing something else as well
    any ideas?

  • Problem with web.show_document with Jinitiator and Firefox

    Not sure Firefox 2.0 is officially certified with Forms 9.0.4.1 and Jinitiatorbut regardless we have some users who want to use this combination. Everything seems to work fine except for the calls to web.show_document which opens a new browser window and displays some html etc.
    The problem is that even though the client Forms JVM is Jinitiator (1.3.1.18 or .21) when the call to web.show_document occurs somehow the Sun Java Plugin starts and having the two JVM's at once causes a fatal crash in Firefox. Can anyone suggest a way to preven the second JVM from opening?
    When the user uses the Sun Plug as the client Forms JVM there is no problem as the second JVM does not open. Unfortunately some users insist on Jinitiator with Firefox hence the problem. -quinn

    James,
    This whole applet embedded in a browser model for webforms is driving us batty at times. The list of problems includes:
    1) Users are constantly tempted by browser controls and accidentally do all sorts of things to get them in trouble. This has included but not limited to using the navigation arrows, jumping off to read their email in the same window as the form and returning to a dead forms session, minimizing, resizing, blurring off to another window and then returning back by clicking on the title bar of the browser and wondering why the form doesn't tab etc.
    Sure hobbling the browser by opening with limited functionality is a possibility but not a complete solution.
    2) New versions of browsers seem to break something. Both IE 7 and Firefox 2 have their own problems with web.show_document, especially file associations such as CSV and DBF and trying to open things in Excel in IE7.Firefox seems to have less problems for some yet some some oddities like the one that started this thread (and 2.0 opening new windows in tabs by default instead of windows).
    3) JVM jigsaw puzzle. Is it Jinit or Sun, which versions? Which combinations of browser version and JVM works.
    4) General fragility of the whole architecture. Running a client JVM in a web browser on top of a PC Operating system connectiong to a forms server over a network embedded in a Java Container server on a full blown web server running on a unix operating system is pushing the bubble. Throw in the mix that any of these components can be combined in numerous ways makes one wonder how it works as well as it does.
    Still users randomly getting dropped connections to forms server (network gltches?). General sluggishness (poorly written forms?). Periods of users with unduplicatable errors primarily network related it would appear.
    General feel that it is not rock solid stable. Perusing metalink documents on performance and tuning gives too much and too general info to troubleshoot so just shrug shoulders and say 'network problem'.
    What's the solution? Java webstart would seem to help at least with the browser realted issues but is that supported and documented how to use yet. Also we'd lose web_show_document which is critical (could it be replaced by webutil calls to open browser?).
    -quinn

  • Secure Web.Show_Document with forms10.1.2.3 under vista Need authentication

    Hi All
    I installed forms 10.1.2.3 successfully under Windows Vista , i use Java Bean described in the OTN Forms document titled "Oracle Forms Services - Secure Web.Show_Document calls to Oracle Reports" ,but when the form calls the report, the following error message :
    "REP-51018: Need database user authentication" is presented to the user.
    note : I did this before successfully with forms 10.1.2.0.2 under windows xp
    What is wrong with me please under Vista ?
    Note :The Java console give this :
    Java Plug-in 1.5.0_12
    Using JRE version 1.5.0_12 Java HotSpot(TM) Client VM
    User home directory = C:\Users\crizma1
    network: Loading user-defined proxy configuration ...
    network: Done.
    network: Loading proxy configuration from Internet Explorer ...
    network: Done.
    network: Loading direct proxy configuration ...
    network: Done.
    network: Proxy Configuration: No proxy
    basic: Cache is enabled
    basic: Location: C:\Users\crizma1\AppData\LocalLow\Sun\Java\Deployment\cache\javapi\v1.0
    basic: Maximum size: unlimited
    basic: Compression level: 0
    basic: Plugin modality.register
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    basic: Registered modality listener
    liveconnect: Invoking JS method: document
    liveconnect: Invoking JS method: URL
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@e34726, refcount=1
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@7be8c2
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@e34726, refcount=2
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@e34726, refcount=1
    network: Connecting http://mostafa:8889/forms/java/frmall.jar with proxy=DIRECT
    basic: Loading http://mostafa:8889/forms/java/frmall.jar from cache
    basic: Reading cached JAR file from JRE 1.5 release
    basic: Certificates for http://mostafa:8889/forms/java/frmall.jar is read from JAR cache
    security: Loading Root CA certificates from C:\PROGRA~1\Java\JRE15~2.0_1\lib\security\cacerts
    security: Loaded Root CA certificates from C:\PROGRA~1\Java\JRE15~2.0_1\lib\security\cacerts
    security: Loading Deployment certificates from C:\Users\crizma1\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
    security: Loaded Deployment certificates from C:\Users\crizma1\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Loading certificates from Internet Explorer ROOT certificate store
    security: Loaded certificates from Internet Explorer ROOT certificate store
    security: Loading certificates from Internet Explorer TrustedPublisher certificate store
    security: Loaded certificates from Internet Explorer TrustedPublisher certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    basic: Loaded image: jar:http://mostafa:8889/forms/java/frmall.jar!/oracle/forms/icons/splash.gif
    basic: Loaded image: jar:http://mostafa:8889/forms/java/frmall.jar!/oracle/forms/icons/oracle_logo.gif
    basic: Loaded image: jar:http://mostafa:8889/forms/java/frmall.jar!/oracle/forms/icons/bgnd.gif
    network: Connecting http://mostafa:8889/forms/java/oracle/forms/registry/Registry.dat with proxy=DIRECT
    network: Connecting http://mostafa:8889/forms/java/oracle/forms/registry/default.dat with proxy=DIRECT
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    network: Connecting http://mostafa:8889/forms/frmservlet?form=d:%5CFEMTOSOFT%5CACC%5Cmainmenu&separateframe=true&acceptLanguage=ar-eg&ifcmd=startsession with proxy=DIRECT
    network: Connecting http://mostafa:8889/forms/lservlet;jsessionid=0125fc1e6334c60e076ddfdd063a1d231270ff1507db8a2efc0666273e237011?ifcmd=getinfo&ifhost=Mostafa&ifip=192.168.1.2 with proxy=DIRECT
    network: Connecting http://mostafa:8889/forms/lservlet;jsessionid=0125fc1e6334c60e076ddfdd063a1d231270ff1507db8a2efc0666273e237011 with proxy=DIRECT
    network: Connecting http://mostafa:8889/forms/java/frmrwinteg.jar with proxy=DIRECT
    java.io.FileNotFoundException: http://mostafa:8889/forms/java/frmrwinteg.jar
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.plugin.net.protocol.http.HttpUtils.followRedirects(Unknown Source)
         at sun.plugin.cache.CachedJarLoader.isUpToDate(Unknown Source)
         at sun.plugin.cache.CachedJarLoader.loadFromCache(Unknown Source)
         at sun.plugin.cache.CachedJarLoader.load(Unknown Source)
         at sun.plugin.cache.JarCache.get(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
         at sun.misc.URLClassPath$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getResource(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.util.ResourceBundle.loadBundle(Unknown Source)
         at java.util.ResourceBundle.findBundle(Unknown Source)
         at java.util.ResourceBundle.getBundleImpl(Unknown Source)
         at java.util.ResourceBundle.getBundle(Unknown Source)
         at oracle.forms.registry.MessageManager.getMessage(Unknown Source)
         at oracle.forms.registry.MessageManager.getMessage(Unknown Source)
         at oracle.forms.engine.Runform.createInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: WARNING: error reading http://mostafa:8889/forms/java/frmrwinteg.jar from cache.
    basic: httpCompression = true
    basic: Downloading http://mostafa:8889/forms/java/frmrwinteg.jar to cache
    basic: encoding = null for http://mostafa:8889/forms/java/frmrwinteg.jar
    network: Connecting http://mostafa:8889/forms/java/myappicons.jar with proxy=DIRECT
    basic: Loading http://mostafa:8889/forms/java/myappicons.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Connecting http://mostafa:8889/forms/java/oracle/forms/engine/RunformBundle_ar_EG.class with proxy=DIRECT
    network: Connecting http://mostafa:8889/forms/java/oracle/forms/engine/RunformBundle_ar_EG.properties with proxy=DIRECT
    إصدار بريمج Forms هو : 10.1.2.3
    network: Connecting http://mostafa:8889/forms/lservlet;jsessionid=0125fc1e6334c60e076ddfdd063a1d231270ff1507db8a2efc0666273e237011 with proxy=DIRECT
    network: Connecting http://mostafa:8889/forms/lservlet;jsessionid=0125fc1e6334c60e076ddfdd063a1d231270ff1507db8a2efc0666273e237011 with proxy=DIRECT
    basic: Loaded image: jar:http://mostafa:8889/forms/java/frmall.jar!/oracle/forms/icons/frame.gif
    network: Connecting http://mostafa:8889/forms/lservlet;jsessionid=0125fc1e6334c60e076ddfdd063a1d231270ff1507db8a2efc0666273e237011 with proxy=DIRECT
    network: Connecting http://mostafa:8889/forms/lservlet;jsessionid=0125fc1e6334c60e076ddfdd063a1d231270ff1507db8a2efc0666273e237011 with proxy=DIRECT
    Edited by: Mostafa Abolaynain on Jun 18, 2009 7:50 PM

    If I am remembering correctly, some changes were necessary in order to make this work with 10.1.2.3. So, if you are using the old jar which you used in previous versions, I would recommend obtaining the one specifically updated for 10.1.2.3. Refer back to the OTN page which has the download and choose the link that references the new version:
    http://www.oracle.com/technology/products/forms/techlisting10gR2.html
    Be sure to clear the client Jar cache before re-testing. This is not the same as the browser cache.

  • Problem: Web.Show_Document with separate frame = True

    We run our application in a seperate frame, so the applet is running outside our browser. When I change the URL in the browser-window the Forms Built-In Web.Show_Document does not work anymore (no browser window will be shown). Is it possible to solve this?

    Maurice,
    though Forms shows in a separate frame, the Applet instance is in the Browser window. If you change the URL in the Browser window then this is equivalent to closing the Applet session. The sepratate frame is a Java Frame that is called similar to
    Frame f = new Frame();
    f.show();
    There is no way to change this except the suggestion to make the Browser Window small as possible do the user does not play with it.
    Frank

  • Can I use web.show_document with forms name parameter ?

    Hi All,
    I need to pass URL to web.show_document but with form name too. Is it possible?
    I'd like to do something like web.show_document('url?report=myReport','_blank')
    Thanks in advance
    Edited by: _blackjack on Dec 13, 2012 2:17 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Yes, you can use any valid URL within web.show_document

  • Calling query doc. (text file) from a web template with JavaScript

    Hi,
    I would like to have an explanation of the following:
    My goal is to develop a solution within a dynamic web template that supports calling of query documentation (description and purpose of the certain report). This query documentation will be provided from a textfile(e.g .csv) and presented under the information tab applying a text element web item. This will be done with query technical name acting as key with the following column structure:
    Technical name    Description    Purpose
    I really would appreciate if anyone could provide me with a more or less detailed solution proposal for this. Javascript etc.?
    Thanx in advance

    You can use the command line tool cURL instead of a GUI browser.
    set myFonts to do shell script "curl http://site.com/fonts.txt"

  • How to access web services with Javascript

    I want to create a XUL/Javascript form which uses CRM On Demand web services. At this time I cannot login (no sample code is given for javascript), therefore I generate my JSESSIONID separately, try and put it in the URL I call in my code, but the server answers back with the logon.jsp page.
         function test()
    var xmlToSend = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:con='urn:crmondemand/ws/contact/' xmlns:con1='urn:/crmondemand/xml/contact'>";
         xmlToSend += "<soapenv:Header/>";
         xmlToSend += "<soapenv:Body>";
         xmlToSend += "<con:ContactWS_ContactQueryPage_Input>";
         xmlToSend += "<con1:ListOfContact>";
         xmlToSend += "<con1:Contact>";
         xmlToSend += "<con1:ContactId></con1:ContactId>";
         xmlToSend += "<con1:AccountId></con1:AccountId>";
         xmlToSend += "<con1:ContactEmail>= '[email protected]'</con1:ContactEmail>";
         xmlToSend += "<con1:ContactFirstName></con1:ContactFirstName>";
         xmlToSend += "<con1:ContactFullName></con1:ContactFullName>";
         xmlToSend += "<con1:ContactLastName></con1:ContactLastName>";
         xmlToSend += "<con1:AccountName></con1:AccountName>";
         xmlToSend += "</con1:Contact>";
         xmlToSend += "</con1:ListOfContact>";
         xmlToSend += "</con:ContactWS_ContactQueryPage_Input";
         xmlToSend += "</soapenv:Body>";
         xmlToSend += "</soapenv:Envelope>";
    var xmlhttp;
         xmlhttp = new XMLHttpRequest();
         xmlhttp.overrideMimeType('text/xml');
         xmlhttp.onreadystatechange=DisplayContact;
         xmlhttp.open("POST", "https://secure-ausomxdsa.crmondemand.com/", false);
         xmlhttp.setRequestHeader('Man', 'POST /Services/Integration;JSESSIONID=blablabla HTTP/1.1');
         xmlhttp.setRequestHeader('Content-Type', 'text/xml');
         xmlhttp.setRequestHeader('Content-Length', xmlToSend.length);
         xmlhttp.setRequestHeader('SOAPAction', 'document/urn:crmondemand/ws/contact/:ContactQueryPage');
    function DisplayContact()
              if (xmlhttp.readyState==4) {
                   if (xmlhttp.status==200) {
                        var response = xmlhttp.responseXML;
                        var responsetxt = (new XMLSerializer()).serializeToString(response);
                        document.write(responsetxt);
    The result is: responsetxt always contains the HTML code of logon.jsp.
    Anyone could help with a login code, or with the interrogation.
    Jeremy

    Hi,
    A JS Sample....
    You can use this JS in a Web Applet
    _____________________________________________ START OF FILE _____________________________________________
    <html>
    <head>
    <script type="text/javascript">
    var sso_token='%%%SSO Token%%%' // You can use an OCOD Variable in OCOD Web Applet
    sso_token = sso_token.replace(/\+/g, "%2B");//re-Encondig SSO-Token
    alert (sso_token);
    //////////////////////////////////// getInnerText() ////////////////////////////////////////
    function getInnerText(node) {
    if (typeof node.textContent != 'undefined') {
    return node.textContent;
    else if (typeof node.innerText != 'undefined') {
    return node.innerText;
    else if (typeof node.text != 'undefined') {
    return node.text;
    else {
    switch (node.nodeType) {
    case 3:
    case 4:
    return node.nodeValue;
    break;
    case 1:
    case 11:
    var innerText = '';
    for (var i = 0; i < node.childNodes.length; i++) {
    innerText += getInnerText(node.childNodes);
    return innerText;
    break;
    default:
    return '';
    //////////////////////////////////// sso_login() ////////////////////////////////////////
    //https://server/Services/SSOTokenValidate?odSsoToken = "ssotoken value"
    //https://server/Services/Integration?command=ssologin&odSsoToken="ssotoken value"
    var ajax=null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
         ajax = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
         ajax = new XMLHttpRequest();
    function SSO_Login() {     
    //var url = 'https://secure-ausomxdsa.crmondemand.com/Services/SSOTokenValidate?odSsoToken='+sso_token; // Check SSO Token
    var url = 'https://secure-ausomxdsa.crmondemand.com/Services/Integration?command=ssologin&odSsoToken='+sso_token;
    ajax.open("HEAD", url, true);
    ajax.onreadystatechange = getReponse;
    ajax.send(null);
    //////////////////////////////////// Login() ////////////////////////////////////////
    var ajax=null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
         ajax = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
         ajax = new XMLHttpRequest();
    function Login() {     
    var url = 'https://secure-ausomxdsa.crmondemand.com/Services/Integration?command=login';
    ajax.open("HEAD", url, true);
    ajax.onreadystatechange = getReponse;
    ajax.setRequestHeader('UserName','GLABADEN-FR13-15/WSUserName');
    ajax.setRequestHeader('Password','OnDemandPassword');
    ajax.send(null);
    //////////////////////////////////// getReponse() ////////////////////////////////////////     
    function getReponse(){
         switch(ajax.readyState){
              case 0:
              case 1:
                   //open com
              break;
              case 2:
                   //send query
              break;
              case 3:
                   //recieving data
              break;
              case 4:
                   //data received
                   //ajax.status contient 200, 404, ...
                   //ajax.statusText contient OK, NOT FOUND, ...
                   var reponseTexte= ajax.responseText;
                   var responseXml= ajax.responseXml;
                   alert(ajax.getResponseHeader("Set-Cookie"));
              break;     
    //////////////////////////////////// Call_WS() ////////////////////////////////////////     
    function Call_WS(){
    var xmlhttp =null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("POST", "https://secure-ausomxdsa.crmondemand.com/Services/Integration",true);
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==4) {
    rteNode = xmlhttp.responseXML.getElementsByTagName("ListOfContact").item(0);
    alert(rteNode.childNodes.length);
    for(var i=0; i<rteNode.childNodes.length; i++){
    switch( rteNode.childNodes.item(i).tagName ){
    case 'Contact':
    var ContactId = rteNode.childNodes.item(i).childNodes.item(0).tagName;
    var ContactIdValue = rteNode.childNodes.item(i).childNodes.item(0).text;
    var ContactIdGetValue = getInnerText(rteNode.childNodes.item(i).childNodes.item(0));
    alert(ContactId+" : "+ContactIdValue +" / "+ContactIdGetValue);
    break;
    case 'Other':
    break;
    default:
    break;
    xmlhttp.setRequestHeader("SOAPAction", "\"document/urn:crmondemand/ws/contact/10/2004:ContactQueryPage\"")
    xmlhttp.setRequestHeader("MessageType", "CALL")
    xmlhttp.setRequestHeader("Content-Type", "text/xml")
    //xmlhttp.setRequestHeader("Content-Type", "text/xml;charset=UTF-8")
    //xmlhttp.setRequestHeader("Content-Type", "text/xml;charset=ISO-8859-1")
    var miSoap=
    '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:crmondemand/ws/contact/10/2004" xmlns:con="urn:/crmondemand/xml/contact"> \n' +
    '<soapenv:Header/> \n' +
    '<soapenv:Body> \n' +
    '<ns:ContactWS_ContactQueryPage_Input> \n' +
    '<ns:PageSize>10</ns:PageSize> \n' +
    '<con:ListOfContact> \n' +
    '<con:Contact> \n' +
    '<con:ContactId></con:ContactId> \n' +
    '</con:Contact> \n' +
    '</con:ListOfContact> \n' +
    '<ns:StartRowNum>0</ns:StartRowNum> \n' +
    '</ns:ContactWS_ContactQueryPage_Input> \n' +
    '</soapenv:Body> \n' +
    '</soapenv:Envelope> \n' ;
    alert(miSoap);
    xmlhttp.send(miSoap);
    //$(document).ready(function () {
    alert("start");
    $("table").each(function() {
    alert("table");
    var $table = $(this);
    var str_id = $table.id;
    alert(str_id);
    </script>
    <h1>Javascript WS</h1>
    <input type="button" onclick="Login()" value="Login">
    <input type="button" onclick="SSO_Login()" value="SSO_Login">
    <input type="button" onclick="Call_WS()" value="Call_WS">
    </body>
    </html>
    _____________________________________________ END OF FILE _____________________________________________
    Best Regards,
    Gerald

  • How to call Web Services (with javascript) in a view load event ?

    Hello to the expert community,
    I'm looking for a piece of javascript code allowing to call Web Services in a view load event ?
    Any ideas will be really appreciated.
    Regards.
    Have a nice week.

    Thank you for your answer, dongmei.
    It seems that the MethodResultTableDataProvider does not return the response of the web service as a value field if the WSDL contains only one result element.
    E.g. from WSDL of the USWeather Web Service which returns theGetWeatherReportResult string:
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.webserviceX.NET" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">
          <s:element name="GetWeatherReport">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="GetWeatherReportResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="GetWeatherReportResult" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="string" nillable="true" type="s:string" />
        </s:schema>If I drag the web service method on the page and I should be able to select the response value in the Bind to Data dialog box. But there is no value field. Value fields only occur if the web service returns more than one value.
    The question is how can I get the response GetWeatherReportResult from the service.

  • Web page with javascript login shows the login in IE8 but not Firefox 9

    The web page http://epgservices.sky.com/nevermiss/ loads properly in Internet Explorer 8 and shows login details but these don't show when loaded in Firefox 9.0.1
    The login is generated by Javascript as far as I can see. Java is enabled and is not being blocked by AdBlock Plus because I've turned it off to see if it made any difference but the login for this website does not show

    Hi cor-el,
    Thank you for your reply. Earlier in my attempts to solve this problem and before contacting Firefox Help, I did start Firefox in Safe Mode after clearing the cache and the cookies from sky.com but this made no difference. The login was still not showing.
    Today after trying the website on my laptop running Firefox 9.0.1 and finding the login was loading correctly I decided to uninstall Firefox but keeping my original extensions etc., and re-install Firefox from a freshly downloaded install file. It is now displaying the login correctly on that web page. I think it may have been caused by lefy-overs from previous upgrades of Firefox and the re-install cured the problem. It's amazing what problems a fresh install will solve!
    Thank you for your help

  • Open PDF document in a web only with Javascript. How?

      Hello everyone.
      I want to open a PDF document using Javascript. Is it possible?.
      I think so but I do not know.
      I have read this site:
    http://www.adobe.com/devnet/acrobat/javascript.html
    but I find no examples, no help.
    Thank you, kind regards.

    If the user has a PDF viewer installed (such as Acrobat or Reader), and it
    is set to open PDF files in the browser, then the file will open in the
    browser window. If not, it will be launched externally or saved.
    Alternatively, you can try embedding the file in your page:
    http://blogs.adobe.com/pdfdevjunkie/2007/08/using_the_html_embed_tag_to_di.html

Maybe you are looking for