Reading HTML after the onload Method is used in the website

Hello,
I try to read a HTML site with the HttpURLConnection. That works fine.. But I only geht the static html. Is it possible to read the html after the javascript is done... In the site I calc a result with a external method (JS) so I need to calc and than I read the elements....
Example:
mySite.jsp?first=1&second=3
in the Site
<script>
function test() {
document.getElementById("foo").innerHTML = <c:out value="${param.first * param.second\" />;
window.onload = test;
</script>
<div id="foo"></div>
This is a simple example to show how the site works.... But I have no chance to disclaim the javascript....
Thanks for help

The server just generates the Javascript. It doesn't run it at all. That's the job of the client, which in this case is your program. So, you would have to parse the HTML and execute the Javascript that's in the onload method. This will be a non-trivial amount of work.

Similar Messages

  • Reading xml element outside onLoad method

    i want to read xml element outside onLoad method but i m unable to read can u plz give idea to solve this problem.................i m using this code..
    var linkData:XML = new XML();
    var linkXData:XMLNode;
    var serverName:XMLNode;
    var projectName:XMLNode;
    linkData.ignoreWhite = true;
    linkData.load("server.xml");
    linkData.onLoad = function(success:Boolean)
    if(success)
      trace("Link data loaded");
      serverName = linkData.firstChild.childNodes[0].firstChild;
      projectName = linkData.firstChild.childNodes[1].firstChild;
      linkXData = linkData.firstChild;
      trace("in success"+linkXData.childNodes.length)
    else
      trace("Failed to load link data");
    trace("ServerName="+ServerName)
    trace("projectName ="+projectName )
    this is giving ServerName=undefined
                        projectName =undefined
    my xml is
    <?xml version='1.0' encoding='UTF-8'?>
    <data>
    <servername>hyddtl900411</servername>
    <projectname>CCBCPC</projectname>
    </data>

    hi
    i am trying like that..............in that i want 2 use servername and projectname in navigation bar but sometimes it is working somtimes it is not working......
    i think due to loading of xml.can u give me some idea so that i can use that variable after loading of xml.
    var linkData:XML = new XML();
    var linkXData:XMLNode;
    var serverName:XMLNode;
    var projectName:XMLNode;
    var a;
    var b;
    linkData.ignoreWhite = true;
    linkData.load("server.xml");
    linkData.onLoad = function(success:Boolean)
    if(success)
      trace("Link data loaded");
      serverName = linkData.firstChild.childNodes[0].firstChild;
      projectName = linkData.firstChild.childNodes[1].firstChild;
      linkXData = linkData.firstChild;
      trace("in success"+linkXData.childNodes.length)
    else
      trace("Failed to load link data");
    id=setInterval(testvalue,1000);
    function testvalue():Void{
    a=serverName;
    b=projectName;
         trace("ServerName outside="+serverName)
         trace("projectName outside ="+projectName )
    setserver(serverName);
    clearInterval(id);
      var val;
    function setserver(val){
    trace("val="+val)
    init1(val);
    in init1() function...................................
    function init1(val){
    trace("val in init1="+val)
    trace("///////////////////////init1//////////////////////")
    trace("ServerName in init1="+serverName)
    trace("projectName in init1 ="+projectName )
    /*var localhost="hyddtl900411";
    var projectName="CCBCPC";*/
    var localhost=val;
    var projectName="CCBCPC";
    trace("localhost="+localhost)
    var links:Array = new Array();
    trace("link="+links[0])
    links[0] = "http://"+localhost+":8080/"+projectName+"/web/productOverview.html";
    links[1] = "http://"+localhost+":8080/"+projectName+"/web/Training.html";
    links[2] = "http://"+localhost+":8080/"+projectName+"/web/a.html";
    links[3] = "http://"+localhost+":8080/"+projectName+"/web/Case_studies.html";
    links[4] = "http://"+localhost+":8080/"+projectName+"/web/Team.html";
    links[5] = "http://"+localhost+":8080/"+projectName+"/web/offering.html";
    for(var i:Number = 0; i < links.length; i++)
    this["btn_" + i].pageRef = links[i];
    this["btn_" + i].onPress = function()
      getURL(this.pageRef);
    //highlight current button
    if(_root.activeBtn != undefined)
    this["btn_" + _root.activeBtn].enabled = false;
    this["btn_" + _root.activeBtn].useHandCursor = false;
    this["btn_" + _root.activeBtn].gotoAndStop(4);

  • Why tcp closed by peer when trying to read msg after the successful Listen?

    Hi everyone,
    I had trouble to read data after Listen function return a good connection ID. The embedded application is running in ARM processor and I build a PC application with Labview to read the device status via TCP connecion. There are required two TCP connections between embedded application and PC application with specific port to listen on each side. After exchange port number by UDP message, both sides know the destination port to send msg. I can send request to embedded apllication in one TCP connection then listen to other TCP connection for reply. By monitroing the traffic of network card, I can see the successful TCP open sequence and in coming reply data, but Labview application shows error 66 "network connection closed by peer" when trying to read data, which is quite strange. I already see those data with network monitor tool, such as wire shark.
    Did anybody experience the similar problem? and provide some suggestion? Is it problem of configuration of Labview? windows XP? I am using Labview 6.1.
    Thanks
    Lei
    Solved!
    Go to Solution.

    LeiJ wrote:
    Thanks Mike,
    The problem was solved. It is timing issue. There is another while loop in code which sends heartbeat UDP message regularly for ervry 10 seconds, and this cause the problem of TCP read function. If I stop or remove this thread of while loop, the read function works fine. The UDP heartbeat message is only need to use once at first beginning to broadcast port number when setup TCP connection. Possibly I can send the heartbeat somewhere esle. I think the TCP error code 56 (timeout) and 66 (network connection closed by peer) is not distinguished in TCP read function. Thank you for reply and suggestion.
    Regards
    Lei
    Actually LabVIEW distinguish between these errors very specifically. If you get an error 66 the connection was closed for sure, either explicitedly by the peer of implicitedly by the TCP IP stack after loosing the connection for to long such as when the Ethernet card would be disabled.
    The issue most likely is that your client after sending back an open-package expects a specific response in a specific amount of time and closes the connection down if it does not get a valid response. Seems like a good measure to try to minimize the resources on your embedded target that need to be allocated when a badly behaving client is looping in a connection attempt.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • I can't find reader.html in the safari.app!

    Hi,
    I have tried finding the reader.html in safari.app by showing package contents, the navigating to the path indicated in the previous discussion (which is now archived) but the file is not there. I would like to change the font in Safari, but I don't know how to do so otherwise. Can somebody help in any way? Thanks

    Go to Safari / Preferences, and then select the  Appearance tab. Set font and encoding options.

  • Read html from a cgi returned page using URL

    i have a problem with the following case.
    i want to quote google's searching result in my program, and what i do it like this.
    1> open a connection
    URL url = new URL("http://images.google.com/images");
    URLConnection connection = url.openConnection();
    connection.setDoOutput(true);
    2>post a parameter
    PrintWriter out = new PrintWriter(connection.getOutputStream());
    out.println("q=singapore+satellite+image");
    out.close();
    3>Read the result
    BufferedReader in = new BufferedReader(
                        new InputStreamReader(
                        connection.getInputStream()));
         String inputLine;
         while ((inputLine = in.readLine()) != null)
         System.out.println(inputLine);
         in.close();
    However, i get the following result:
    <HTML><HEAD><TITLE>Bad Request</TITLE></HEAD>
    <BODY><H1>400 Bad Request</H1>
    Your client has issued a malformed or illegal request
    </BODY></HTML>
    Press any key to continue . . .
    can anyone tell me what is wrong?
    thanks a lot.
    post on networking p2p.wrox.com

    Without looking it up, I seem to recall there's a setMethod() method, and you give it "GET" for a parameter. But you could look that up. With the Get method, the parameters are appended to the URL after a question mark, like this:
    http://images.google.com/images?q=singapore+satellite+image
    where as with the Post method, the parameters are sent in a separate stream, the way you wrote your program. Get can usually extend only to 255 characters (or some small number like that), Post is theoretically unlimited.
    If you look at the URLs that a Google search produces, you will see that it uses the Get method.

  • External Harddisk read only after the system hand during I copy some folders to my external drive.

    I'm using macbook pro mid 2010.
    I could not write my external HDD 1TB (WD) after I copying the folder from local folder to external folder via my parallel desktop.
    During the copying, the system hang halfway and no choice i terminate the copy. SInce that, i could not write my HDD either from OSX or via parallel desktop.
    When i check the infer, the HDD shown read only. I truing to use the disk utility to verify the disk but I could not click on the button.
    Appreciate someone could advice me beside backup and reformat the HDD.
    Thank you!

    I've got the same problem here with a Seagate external HD. I've been able to install Leopard on another Western Digital HD and boot from it to copy some files to a newly purchased external, but in Leopard I can't copy my 180GB music library because of several errors. It either says that the file names cannot be copied because they are too similar to another file name (accidental dupes in the library) or that the names are too long to be copied and neither make any sense. I'm trying to figure out how to move all of my music over without having to go through it file by file and without losing anything.
    I was able to easily copy all other information from the hard drive; the music is the last remaining item I need before I reformat the external and use it in Snow Leopard as a TM backup drive.

  • HT5312 why do i have to talk to someone all on the phone to answer a simple security question... im not very social and id rather find an answer by reading it on the website; after all that's what its for. Right?

    frustrated

    If you have a rescue email address on your account, as described on the HT5312 page that you posted from, then you can reset them via http://appleid.apple.com - follow steps 1 to 5 half-way down that page and you should give you a reset link.
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset - which is likely to be by phone as they need to confirm your id and that it's your account, which is more easily done by phone rather than having emails going back-and-forth.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • To make RFQ form or Quotation form read only after the satus is made closed

    Hi All,
    I have a requirement where we need to make all the fields either on RFQ or Quotation form read only/freezed/greyed out once the document status is made Closed from Active satus. The User should not be able to change any value in the RFQ or Quotation form. The same needs to be achieved in core purchasing module. Looking forward towards kind suggestions. Thanks.
    With Best Regards,
    Nirabh Nayan

    Hi,
    Please perform form personalization.
    Triggering event : WHEN-NEW-RECORD-INSTANCE, WHEN-VALIDATE-RECORD
    Triggering object : PO_HEADERS
    condition : :PO_HEADERS.STATUS='Closed'
    In action, Type : property
    Object type : Block
    Target object : PO_Headers
    Property name : update_allowed
    value : false.
    Like this, you need to create a actions for all the Blocks available in RFQ/Quotation Form ( ex: PO_lines, PO_Shipments etc)
    Thanks,
    Subhashini

  • How to make fields read only after form is filled in

    I am creating forms to be used within our company.  The customer srv representative (CSR) would fill in the form and send it to the customer for signature and initial.  There are a few issues I can't solve.
    1)  I need to make the rate & services fields read only after the CSR initials the form

    Will the CSR have Acrobat or just Reader, and what type of computer will the CSR be using (Windows/Mac/mobile OS)? If just Reader (Wind/Mac), this is possible by setting the fields to read-only with JavaScript. The problem is this can't be considered secure, even if using a password as discussed here: Password-protect and hide one form field
    With Acrobat you have the ability to flatten certain fields, which makes it a bit more difficult to change the "fields".

  • I was ALWAYS able to open Adobe Reader items on my IMAC but just recently it is giving me a message stating "Before Viewing PDF documents in this browser you must launch Adobe Reader and Accept the End User License Agreement, then quit and relaunch the br

    I was ALWAYS able to open Adobe Reader items on my IMAC but just recently it is giving me a message stating "Before Viewing PDF documents in this browser you must launch Adobe Reader and Accept the End User License Agreement, then quit and relaunch the browser. When I download Adobe Reader for MAC it does not give me an option to except and Agreement I am using OS 10.9 HELP ASAP!!

    lindsey k wrote:
    Before Viewing PDF documents in this browser you must launch Adobe Reader and Accept the End User License Agreement, then quit and relaunch the browser.
    And... did you do what the message tells you?
    lindsey k wrote:
    When I download Adobe Reader for MAC it does not give me an option to except and Agreement
    Nothing to do with the download; you need to open Adobe Reader once after the install is complete, and accept the EULA.

  • I Have been getting BAD battery life after the ICS UPDATE !! on the DROID RAZAR MAXX have this happen to any one else ??????

    i have been getting really bad battery life after install ICS on my droid razar maxx i can only go 1 day and 3 hours where i used to be able to go 2 day easy have this happen to anyone else can someone tell me how i can make my battery life better??????/ and do i need to let my phone go complete dead before fully chargeing it again ??????
    before install the ICS update i had 30 percent of battery life remaining so i pluged it in and let charged for a little bit while it updated my phone and ever thing after it updated i unplug my phone and started playing on my phone to see what ICS was all about but when it got to 15 and said " connect to your changer so i did !!!!! should i haved let my phone going complete dead since i unplug without it fully changer or does it matter ?????????????? if someone could please help me !!!!:)

    What was your battery reading right after the update when you unplugged the phone? I have never let my Maxx drain further than 20% battery ever before I charge it. Yesterday after the update I also played more with the phone trying to learn the OS, as did most everyone on this forum. Give it a few days of your normal use before you decide your battery life has decreased. I took my phone off charger today at noon, it was 100%, and now it's 80%, with about 30 min talk time, and mostly standby. that's about normal batt life for me, maybe a little better than before the update. I'm still going to watch it for a few days before I make a conclusion about battery life.

  • IBooks crashes after the last update

    Cannot read anything after the last update. The app crashes constantly while loading some PDF documents. Bug??? Fix it please and hurry up!!!

    There are some compatibility issues between the latest Flash player and some Firefox add-ons or settings. Could you see whether anything in these articles helps:
    * [[Flash 11.3 crashes]]
    * [[Flash 11.3 doesn't load video in Firefox]]
    You also could try the reset feature: [[Reset Firefox – easily fix most problems]].
    If you prefer more specific and targeted advice, please provide more specific information about the circumstances of the crashes or other problems.

  • When I open another Tab and type in a website address, after the site loads the URL in the navigation bar disappears. Why?

    When I open a new tab and type in the website url, after the website loads the website url disappears. In order for me to get it to come back, I have to right click on the navigation bar and click undo. why is this?

    Did this happen immediately after the reset or at a later time?
    Does this only happen on a new tab?
    What is the current setting for the new tab page as set via the browser.newtab.url pref?
    You can open the <b>about:config</b> page via the location bar.
    *http://kb.mozillazine.org/about:config
    Rename or delete the prefs.js file and possible numbered prefs-##.js and user.js files to reset all prefs to the default value.
    *http://kb.mozillazine.org/Preferences_not_saved
    *http://kb.mozillazine.org/Resetting_preferences

  • If I want to open the same website in a second tab and press Ctrl+T and start typing the website title or URL, why does Firefox 4 insist on switching to the first tab? Is it possible to turn this off?

    I regularly need to open the same website in two tabs, to be able to view changes made between opening the first and second tabs. In Firefox 3.x I could press Ctrl+T and start typing the website title or URL, which would be auto-completed by Firefox. This enabled me to quickly open the same website in a second tab. Firefox 4 does not do this, instead it wants me to switch to the existing tab. This is not what I need.
    Of course it is possible to open the same website in a second tab via e.g. a bookmark, but this takes more time and effort. It would be great if I could select Firefox's behavior in this situation.

    To create a duplicate of an existing tab in Firefox 4, do one of the following:
    *middle-click the icon on the left end of the URL/Location/Address Bar
    *hold down the Ctrl key and drag the tab until a small arrow appears at the border between tabs, then release the mouse button, then release the Ctrl key.
    <br />
    <br />
    You have multiple Java Console extensions because Java did not clean up after itself when updating; Firefox button > Add-ons > Extensions OR, using the Menu Bar, Tools > Add-ons > Extensions:
    *Java Console 6.0.17, Java Console 6.0.19, Java Console 6.0.20, Java Console 6.0.21, Java Console 6.0.22, Java Console 6.0.23
    Using the instructions here:
    *http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
    you can delete the following folders:
    *{CAFEEFAC-0016-0000-00'''''17'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''19'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''20'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''21'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''22'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''23'''''-ABCDEFFEDCBA}
    You can leave {CAFEEFAC-0016-0000-00'''''24'''''-ABCDEFFEDCBA}
    <br />
    <br />
    '''You need to update the following:'''
    *Adobe Shockwave for Director Netscape plug-in, version 11.5
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.3"
    *Shockwave Flash 10.2 r152
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update Shockwave for Director'''
    #*NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    #*Use Firefox to download and SAVE the installer to your hard drive from the link in the article below (Desktop is a good place so you can find it).
    #*When the download is complete, exit Firefox (File > Exit)
    #*locate and double-click in the installer you just downloaded, let the install complete.
    #*Restart Firefox and check your plugins again.
    #*'''<u>Download link and more information</u>''': http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**SAVE the installer to your hard drive (save to your Desktop so that you can find it after the download). Exit/Close Firefox. Run the installer you just downloaded.
    #**Use either of the links below:
    #***https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox ''(click on "Installing and updating Adobe Reader")''
    #***''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE

  • I bought a used PowerMacPC G5. I can burn and read DVDs, but I can't read or burn CDs. The CDs are not even recognized. After the drive searches for a while, the CD is ejected without any error messages. The CDs work okay on my iMac.

    I bought a used PowerMacPC G5. I can burn and read DVDs, but I can't read or burn CDs. The CDs are not even recognized. After the drive searches for a while, the CD is ejected without any error messages. The CDs work okay on my iMac.
    I am running Mac OSX 10.4.11. According to the System profiler the CD/DVD drive is a "PioneerDVD-RWDVR-112D." When I compare the information under this heading, the only unusual difference from my iMac is that the G5 reads "Burn Support: Yes (Unsupported)." My iMac reads "Burn Support: Yes (Apple Shipping Drive)."
    Under the System Preferences the options are set to "Ask what to do" when a blank CD or DVD is inserted. Music CD set to open iTunes, Picture CD set to open iPhoto, Video DVD set to open DVD player.
    Do you have any suggestions?
    Thanks, Jack

    Hi Jack, great help so far!
    Internal...
    http://eshop.macsales.com/static_pages/Framework.cfm?page=superdrive/sdl_powerma c_g5.html
    External be sure it's Firewire & not Bus powered...
    http://eshop.macsales.com/shop/firewire/optical-drives/

Maybe you are looking for

  • New T530 with dead / unresponsi​ve pixel in upper middle of screen

    I have one dead or unresponsive pixel in the upper middle part of the screen. It is stuck in red color. It is very difficult to ignore  this red dot and it is very annoying to use my machine with this red dot on the screen. What can I do?  I ordered

  • How to call oracel report through ADF

    I need to call execute oracle report through. ADF any one have idea?

  • Pre Turns Off or Shuts Down when I close the keyboard

    Is my pre screwed or is it OS?   It shuts off, not the version that other people have had where you have to pop the battery (the power button still works to turn it back on) out to get it to restart.  Anyway, it shuts off when I slide it closed.  I t

  • Monitor - Printout Mismatch

    Hello: My problem is a mismatch between the monitor display and the final print.  As detailed below, I've calibrated the monitor and the printer.  Further, I've run a number of tests, to isolate the problem. 1. My current computer system includes Win

  • Printing directory of documents in Finder

    I have tons of documents listed in Finder since 2006. Can I print the list/directory of all the documents. I do not want to print out all the documents. HELP!