dcsimg
www.webdeveloper.com
Results 1 to 7 of 7

Thread: Running a javascript code from a remote site

  1. #1
    Join Date
    Jul 2017
    Posts
    3

    Running a javascript code from a remote site

    There is a website which uses javascript as can be verified from its source. So, it gets the inputs from the user through web and then run a remote code by pressing the "continue" button.
    What I want to do is to fill to forms using a java code and not by human and then download the result. Problem is that the result page has *.cgi in its URL. Can someone explain to a noob what are the steps to do that? I am not going to perform robot/spamm things!

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    4,981
    Doesn't sound like an ethical project...

    The other question... Java or JavaScript, they are not the same thing...
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    Jul 2017
    Posts
    3
    Well I have asked them about the API. Also that is open to use. Instead of a user that manually opens some files, copy the names and other information from his dataset and the paste them on that website, I want to write a java code to automatically fills the form and the get the result. So why isn't that ethical?!

    I know java and jscript are not the same. I meant that my code uses java to extract the information needed and paste them on that website.

  4. #4
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    4,981
    Again....

    JAVA

    or

    JavaScript

    They are not the same thing, if its JAVA then you are in the wrong forum altogether.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  5. #5
    Join Date
    Jul 2017
    Posts
    3
    Please check the link in the first post and its source. The website uses java script to process the forms in the website.
    I said that I have a java code that generates the inputs needed by the website.
    For example, the website gets "Gene" and user has to manually enter the name by keyboard. Now, my java code processes something and extract the "Gene". Something like this:

    String geneName = getName();
    // connect to site and put geneName in the Gene field.

    Hope that is clear.

  6. #6
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    4,981
    Hmmm... Sounds like you are writing a bot to push data on to a form. Not something I do, have done or would consider doing. Sorry
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  7. #7
    Join Date
    Dec 2012
    Posts
    1,447
    You might use a browser extension like Tampermonkey and code the actions you require in Javascript. However I don't know how to hand over the results of your Java code to Javascript.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles