Manually submit a form without using javascript?

i'm trying to automate registration of a site by using java (no gui). However there is no direct submit button or form.submit() present in its registration url. Checked the javascript codes and it opens a window, and checks if the window opener is present .
if (window.opener && !window.opener.closed)
window.opener.document.theForm.submit();
window.close();               
}Is there a solution for this problem?

I'm trying to access an http url (not mine).
(1) By setting post variables , I can retrieve the html of the url as string. Here's the code.
     static String getHtml(String url_nm, HashMap variables)
          String html = "";
          String data = "";
          boolean firstRun = true;
          if (variables != null)
               Set keys = variables.keySet();
               Iterator iterator = keys.iterator();
               while (iterator.hasNext())
                    if (firstRun)
                         firstRun = false;
                    else
                         data += "&";
                    String name = iterator.next().toString();
                    try
                         data += URLEncoder.encode(name, "UTF-8") + "=" +
                              URLEncoder.encode(variables.get(name).toString(), "UTF-8");
                    catch (Exception e1)
          try {
             URL url = new URL(url_nm);
             URLConnection conn = url.openConnection();
             conn.setDoOutput(true);
             OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
             wr.write(data);
             wr.flush();
             BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
             String line;
             while ((line = rd.readLine()) != null) {
                  html += line;
             wr.close();
             rd.close();
         } catch (Exception e) {
              e.printStackTrace();
          return html;
[/code
(2) The problem is even if i set the post variables, i cannot submit the form since the form can only be submitted if i was actually browsing it in a web browser. The html displays a window where the actual submit  form is set (as you can see in my later post) .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Opening new window without using javascript..

    Hi,
    This is the second time iam posting this question. I didnt get satisfactory answer to my previous post..
    Is there any possibility of displaying a new window on button click using only JSF and without using javascript? if yes please tell me how to do..
    Thanks...

    Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
    Its working fine now without JavaScript.
    Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
    Is this possible? Please give me an idea to do this.
    Thanks.

  • How to automatically submit a form without clicking the button?

    Hi,
    Is there any way to submit a form without clicking the button? Any idea is greatly appreciated.
    -Joey

    well if you are filling some textfields you can do a onchange call so you can submit the form, or use any of the existing functions to do that.

  • Struts how can validate form without using validate method.

    Hi
    Is this possible validate a form without using validate form
    if it is possible then
    please tell me how can we validate it
    Thanks
    Surendra

    Make use of validator framework.. this would enable you to do validation both @ client side by javascript under defined validation rules and also enables you to do it @ serverside....
    And if want to create a Dyanamic Form beans which takes care of validations to make use ValidatorForm or DynaValidatorForm class under the pacakage org.apache.struts.validator and create an instance of it with preconfigured validations under structs...
    Make use of the links below which i think are the best tutors for newbies....
    http://www.roseindia.net/struts/struts_validator_framework.shtml
    http://www.oracle.com/technology/oramag/oracle/04-jan/o14dev_struts.html
    http://www.onjava.com/pub/a/onjava/2002/12/11/jakartastruts.html
    Hope might be of some help.. :)
    REGARDS,
    RaHuL

  • Hiding a Form without using EXIT_FORM.

    Anyone know how to hide a form without using exit_form or minimize? Im shocked I havent found a way to keep a form active in the back ground without having it displayed. Imagine a minimize without all the annoying windows on the bottom of the oracle desktop... anyone know how to do it? Let me know :)

    HIDE_WINDOW does not hide a window that is associated to the main canvas of a form, same goes for HIDE_VIEW. And what do you mean by open_form?

  • Scrolling component into view programmatically without using javascript

    Hi,
    Is it possible to scroll an adf component into view programmatically without using javascript?
    I know of <af:scrollComponentIntoViewBehaviour> that can be added to a command component , but is there a way to do that programmatically in a bean?
    Problem with using javascript is its not guaranteed to work in different browsers.
    Regards,
    Rakesh.

    Hi John,
    Thanks for the reply.
    If i use the af:scrollComponentIntoViewBehavior, then i wont be able to achieve my desired functionality.
    In my use case, i want the id, of the component that needs to be scrolled into view, to be determined in the server listener of the button which is not happening.
    Code snippet in jspx page is as follows:
    <af:commandButton id="cb1" immediate="true">
    <af:clientListener method="clickButton" type="click"/>
    <af:serverListener type="customEvent"
    method="#{pageFlowScope.bean.doScroll }"/>
    <af:scrollComponentIntoViewBehavior id="#{pageFlowScope.bean.compId}/>
    </af:commandButton>
    And the java code for method doScroll is something like :
    public void doScroll (ClientEvent clientEvent)
    //logic to determine compId goes here
    compId = "id";
    So, the problem here is "compId" is set to some value when bean is loaded and the id in the af:scrollComponentIntoViewBehavior will be set to that value forever.
    I cant find any way of telling it to re-read the "compId" value, say after clicking the button. I can refresh the button in the server listener to update the compId .
    But the updated compId will come into picture from *next click*. This is because, after the button is clicked, "scroll" action happens first and then serverListener executes.
    Is there a way to change order of this execution like "execute server listener first and then do the scrolling thing" ?
    Regards,
    Rakesh.
    Edited by: 927925 on Jul 27, 2012 2:02 AM

  • It won't let me submit a form without checking all the boxes.

    It won't let me submit the form without checking every box on question #3. I just upgraded to 6.02 and it worked before without checking every one.

    The website may be adding a required attribute to force that.
    *http://www.the-art-of-web.com/html/html5-form-validation/
    *https://developer.mozilla.org/en/HTML/element/input#attr-required

  • Pop-up display Using JSP (or JSTL) without using JavaScript

    Please tell me how to display a pop-up window , without using Javascript code.'
    Thanks
    Amarshi

    Remember that Java - on the web - is mainly used for server-side programming and applets. If you want client side activity to occur, you must use languages like javascript or vbscript.
    Vincent

  • Can I use ant's api without using javascript ?

    Can I use ant's api without using javascript and which tasks we cant do without javascript in ant's build file?
    eq:
    jar=project.createTask("jar");
    jar.setDestFile(new java.io.File(project.getProperty("lib")+"/myJarFile.jar"));
    jar.setBasedir(new java.io.File(project.getProperty("classes")));
    jar.setIncludes(project.getProperty("GenericDirStructure")+"/**");
    jar.setIncludes("META-INF/**");
    jar.perform();
    can I create above jar without using javascript i. e<script language="javascript"> in build.xml file.
    Thanks,
    Archan

    Archana144 wrote:
    hello georgemc
    How to use ant's api without javascript in build.xml file because it gives error if I tries to do something like
    project.createTak("echo").in build.xml..etc ..without including this in <script language="javascirpt">
    And I cant use <jar> task directly because ..I want to crete multiple jar files depending on some configuration done in properties files..so I m doing this jar creation in loop.
    Thanks,
    Archan
    Edited by: Archana144 on Aug 13, 2008 6:00 PMHave you read all the Ant documentation? The <script> task was only added in 1.7, before that, there was no using Javascript in build files

  • 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

  • To get the button on system form without using ADDON

    Hello,
    I want to get the new button on tne System Form without creating or using Add-on.
    And while clicking on that button, i want to display "Hello World" message..
    Can u please tell me how to get new button on the System form without using AddOn?
    Thanks
    Nisha

    Hi Nisha,
    It is not possible to add a button on a system form without using an add-on, this is because in order to add a button an a system form you have to access its form id at run time (that converts this standard form into a customized form for your add-on ) the location of some existing control that will be taken as the base location identifier for the new control and only then you would be able to add a new button on the form.
    Regards,
    Prashant

  • How to compile a form without using apps in r11?

    Is any possible to compile a form without using the apps?
    We want to create an account(not use apps) to "compile a form" in our test environment for special developer.
    What should I do if it's possible to do?
    or If not what can I do?

    Thank you guys for kindly reply.
    We are merging with the other company now.
    Their developer will test in our test/dev environment.
    But the policy don't allow them to access the apps account directly.
    It looks like I can't create a non apps user which has got same rights/privs as apps user.
    The best option for me is to let developer compile the form in NON PROD env with apps user
    or create a custom shell script to compile the form like srini said.
    Thanks,
    Nick

  • How reset Acrobat form field using javascript API

    How reset Acrobat form field using javascript API

    There are several ways:
    resetForm(["Text1"]);
    or
    getField("Text1").value = getField("Text1").defaultValue;
    George

  • How to save the session states for a tabular form WITHOUT using check boxs?

    Greeting guys,
    As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
    My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
    Thanks in advance.
    Luc

    The following is the first collection solutin I've tried:
    htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
    for i in 1..p_row_num loop -- Loop on the whole form rows
    if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
    --If either of them has some input values, the row should be saved into the colleciton.
    then
    htmldb_collection.add_member(
    p_collection_name => 'TEMP_TABLE',
    p_c001 => htmldb_application.g_f01(i),
    p_c002 => htmldb_application.g_f03(i),
    p_c003 => htmldb_application.g_f04(i),
    p_c004 => htmldb_application.g_f05(i),
    p_c005 => htmldb_application.g_f06(i),
    p_c006 => htmldb_application.g_f08(i)
    end if;
    end loop;
    Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
    Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
    Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error.

  • Reading form data using javascript

    Hello.
    I want to go over the data received from the context to the PDF file using JavaScript, without binding it to any elements on the form.
    How can I access the data?
    I've tried using xfa.data or xfa.dataset, but didn't manage to get to it.
    How can it be done?
    Thanks.

    The following applies if it's a PDF generated from ABAP :
    Let's say a simple type parameter from context is named EBELN. To get it from javascript, you must use :
    $data.data.EBELN.value
    or
    $record.EBELN.value
    (it's the same)
    For example, to display the value, use:
    xfa.host.messageBox( $data.data.EBELN.value );
    Edited by: Sandra Rossi on Jan 28, 2009 7:34 PM : added $record line

Maybe you are looking for

  • Problem with oc4j when accessing over the host name?

    Hi! I have a standalone oc4j and application is working perfect when I use ip address of the server. When I use dns name of the server I just can pass the login page and after that every jsp return me to the login page? THANKS FOR A HELP!!!

  • Interaction report in Fronter fails... SCORM 1.2 and SCORM 2004 problems...

    I am using Captivate 2.0 and trying to make a SCORM content that will report user interaction in the new Fronter 7.1 (www.fronter.com). I use the reload SCORM 1.2 player for complaince check, since I do not have one for SCORM 2004 ( http://www.reload

  • ITunes Visualizer on External Display Blacks Out Main Display

    Is it possible to have the iTunes Visualizer full screen on an external display while keeping the main display active? In other words, I'd like to have my 2nd monitor display the iTunes Visualizer in full screen while I do work on my main screen. Eve

  • Macbook bound to AD won't allow network login or new local account creation

    As the title states I am having an issue related to a macbook pro that is bound to active directory. The only option we tweak when binding the macs to AD is that we opt to "create mobile account" option under directory utility. It also seems that whi

  • Listening to things besides Itunes wirelessly?

    now that I have my Airtunes set up to play all my Itunes songs, I can not listen to any other websites through my speakers. No Youtube, CNN, band websites, Myspace pages, movies, etc., nothing though my speakers. Only my Itunes. The problem is that b