Java Script: Form Submit issue.

Is there a way where I can submit two forms ?
Thats is submit 2nd form only when the first form is submitted.
I tried this it works.
function formSubmit(){
document.form1.submit(); //Submit First Form
alert(); //This will stall the execution thus form2 will not be submitted till I click on OK
document.form2.submit();
}But If I dont put an alert in between, only the second form is submitted.
If I put a delay of say 3 seconds in between then it will throw a SOCKET CLOSED error in the action event triggered due to first form submit.
Well Basically when the Alert pop's up the parent page "STALLS" and thus the form2 does not submit till I click on OK, Is there a way I can stall the browser/Parent JSP page using JAVA SCRIPT ??

Relax people... Ok I will move my querries else where :) ..
But whats wrong if somebody can provide me an answer ? I am sure most of you know java script , if you dont know then don't answer simple as that.
You do know that Sun did not create JavaScript, right? So the Sun forum sites may not be the best place to look for a JavaScript forum " {code} 
You mean to say if something is not from sun I am not supposed to ask a question on that, I agree that this is JAVA Programming forum.
Peace,.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Not only does Adobe flashplayer continue to crash on my operating system (windows 7) but now java script is having issues .... what is wrong with firefox????

    for months I have checked the forums, and seen the same issues with Adobe Flash Player ... I have uninstalled and reinstalled too many times now and am totally frustrated with Firefox,. I just get it working again and Firefox updates and then I have the same issues ... and now my java script is screwing up and it never did before .... this all came after the latest update .... is anyone else having these issues or is my operating system under attack???

    Recent crashes of certain multimedia contents (this includes Youtube videos, certain flash games and other applications) in conjunction with Firefox are most probably caused by a recent Flash 11.3 update and/or a malfunctioning Real Player browser plugin.
    In order to remedy the problem, please perform the steps mentioned in these Knowledge Base articles:
    [[Flash Plugin - Keep it up to date and troubleshoot problems]]
    [[Flash 11.3 crashes]]
    [[Flash 11.3 doesn't load video in Firefox]]
    Other, more technical information about these issues can be found under these Links:
    http://forums.adobe.com/thread/1018071?tstart=0
    http://blogs.adobe.com/asset/2012/06/inside-flash-player-protected-mode-for-firefox.html
    Please tell us if this helped!

  • Please help: Running a java script form the windows command line.

    Hello forum,
    I'm trying to run a java script from the command line on
    windows but I always get the "Failed to open document" alert.
    I typed the following in the run command line:
    "flash.exe" C:\Documents and Settings\Hasan.Atieh\My
    Documents\science\java scripts\testing jsfl\get_files_mx2004.jsfl
    now I copied and pasted the path of my java script file from
    the windows explorer address bar so I'm sure that the java script
    file exists in the specified path.
    Any thoughts why am I getting the message!!

    :oops: never mind... issue resolved. I didn't quote the java
    script file path but thats because the help documents on flash
    didn't say that.
    this is what flash help say:
    To run a script from the command line on Windows:
    Use the following syntax (add path information as required):
    "flash.exe" myTestFile.jsfl

  • Java Script in Templates issue

    I have created a help system for our new financial reporting
    system and a developer has created a template which includes Java
    scripted 'Rate this page' radio buttons and a comments field in the
    header. I have imported the template into my project and attached
    all the topics to this template. When I preview or regenerate/view
    the HTML output and click on the comments field an error is
    returned.
    Our developer can get this to work on his machine but not
    mine (I.E security setting have been set to low but it still wont
    work).
    When I generate on the developers machine, we get our Java
    script code in the headers but not when we generate on my machine.

    Sorry - v rude of me:
    Any help/suggestions would be gratefully considered

  • CC has Java Script Plug in issues... CS5 won't let me see all my NEF files... help.

    In CC I am trying Photoshop (I currently use CS5), and it says it doesn't have the java script plug in... am I supposed to magically pluck it out of thin air to get it? I'm not a computer programmer and I am finding CC to be a maddening experience. CS5 won't let me see all the NEF files I have, and I have a client waiting on the images... RAWRRRR... How can I see this images if CS5 only shows me half of my images, and CC won't even let me open anything, not bridge, not files, nothing... help!

    Prompted to install Java SE 6 Runtime | Mac OS 10.9
    Mylenium

  • Script Form print issue

    在SAP没有安装中文支持包的前提下,SAP Script Form有可能打印出中文字符吗?如有,怎么实现?
    谢谢。

    HP打印机时,打印方式是frontend吗?
    用EPSON时也是用同样的打印方式吗?
    Frontend(F,G)是调用windows的字体,打印机内部没有装中文字体也没有关系,照样可以打印中文。
    其它打印方式:L,C不会调用windows的字体,打印机内部必须要装中文字体,才能打印中文。

  • Calling a Java Script form a Java class

    Hi All,
    I am having a project requirement of calling a Javascript from a java program. Here it goes...
    I have an external web page which I can access using a hyperlink this page is "Export to PDF" page. In this page we have an "EXPORT" button which on click calls a "do_export" javascript function. On clicking the EXPORT button a PDF is generated.
    Now my problem is I do not have the access to the code, so what I can do is to some how open that webpage and then execute that javascript function form a Java program or a JSP file or even a shell script file.
    It will be a great help if anyone can assist me to do it, I have been working on this from last 7 day, but still no sucess :('.
    Thanks in advance,
    Utkarsh

    ukkus wrote:
    Yes I had view the source code from browser, and its calling Export function, but my question is how to call that javascript function after getting the page loaded by a JSP or java program.
    I had to automate this export process and the only thing I had is this external URL or web page.If it is just a plain javascript function that does not interact with the browser environment (window and such objects)
    you can just run it using [javax.script ^API^|http://java.sun.com/javase/6/docs/api/javax/script/package-summary.html]

  • Java Script and PHP Issue

    I am using a JS date picker and it works great all by itself. However when I link it to a  MySQL db the JS no longer works.  Here is my source code below any help would be appreciated.
    Thanks
    Joe
    <?php require_once('Connections/Runin_db.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO `time` (`Time 1`, `Time 2`) VALUES (%s, %s)",
                           GetSQLValueString($_POST['Time_1'], "text"),
                           GetSQLValueString($_POST['Time_2'], "text"));
      mysql_select_db($database_Runin_db, $Runin_db);
      $Result1 = mysql_query($insertSQL, $Runin_db) or die(mysql_error());
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
      <table align="center">
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Time 1:</td>
          <td><input name="Time 1" type="text" id="Time 1" value="" />
          <a href="javascript:show_calendar('document.tstest.timestamp', document.tstest.timestamp.value);"><img src="images/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the timestamp" /></a></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Time 2:</td>
          <td><input name="Time 2" type="text" id="Time 2" value="" />
          <a href="javascript:show_calendar('document.tstest.timestamp', document.tstest.timestamp.value);"><img src="images/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the timestamp" /></a></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right"> </td>
          <td><input type="submit" value="Insert record" /></td>
        </tr>
      </table>
      <input type="hidden" name="MM_insert" value="form1" />
    </form>
    <p> </p>
    <p> </p>
    <p> </p>
    </body>
    </html>

    I would like to know how to do this process.  I would like my students to complete the module and then enter there name in the certificate line.  Then have them enter their email address so that the certificate can be emailed to them and they can print it off.  I would like to have the certificate be a PDF file so they cannot alter the name of the person who took the course.

  • Java script browser resize issue

    i'm building a website in dreamweaver for a friend and he
    wanted the browser to resize to a specific size once the user goes
    to the site. the script i have now works fine, but then when i go
    to another page, the browser bounces out and then resizes. is there
    a script that would just keep the browser the same size without
    having to bounce out? thanks.
    and click on any of the left side nav links to see the
    browser quickly bounce out and then resize. thanks.

    How rude.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "oiruop" <[email protected]> wrote in
    message
    news:fpki5e$2f5$[email protected]..
    > i'm building a website in dreamweaver for a friend and
    he wanted the
    > browser to
    > resize to a specific size once the user goes to the
    site. the script i
    > have now
    > works fine, but then when i go to another page, the
    browser bounces out
    > and
    > then resizes. is there a script that would just keep the
    browser the same
    > size
    > without having to bounce out? thanks.
    >
    > here's the link to view the issue yourself.
    >
    http://www.ohhello.tv/index2.html
    >
    > and click on any of the left side nav links to see the
    browser quickly
    > bounce
    > out and then resize. thanks.
    >
    > <SCRIPT>
    >
    > window.resizeTo(724,1000);
    >
    > </SCRIPT>
    >
    >
    > <SCRIPT LANGUAGE="javascript">
    >
    > var width = screen.width
    >
    > var height = screen.height
    >
    > document.write("<body
    onUnload=window.resizeTo("+width+ "," +height+")>")
    >
    > </SCRIPT>
    >

  • Script Form print issue with output type

    hello,
    i have maintained a output type for a purchase organisation in MN04, VN partner keep blank , medium 1 for print out and in date time : 4
    output device is 'LOCL' "print immediately" and "release after output" are active in communication.
    a message type generated when i created a PO, but it is a red light, and processing log is "Error in OPEN_FORM for document xxx".
    after checked, custom script from caused this issue, but how to resolve this problem?
    best regards,

    Hello,
    The error ME142 can have different causes like missing authorizations
    or a terminated connection. Please see SAP notes 397691 and 532251. This note
    states that is errors occur when purchasing documents are output, If
    errors occur when purchasing documents are output, the system generates
    an error message in the message log of the message overview. However,
    error message ME142 'Error in OPEN_FORM for document &' contains only
    the information that an error occurred and not the error cause. With the
    attached source code, the error cause is also displayed in the error
    message.
    Regards,
    David

  • Acrobat 9: Error when PDF form submit with file attachment

    Hi all,
    Hope you can provide some help with my PDF form submit issue. I am getting this error "There is no PDDoc associated with this CosDoc." in Acrobat 9 (Reader and Pro) when I try to submit a PDF form with a file attachment field (the file is specified). The same PDF form works fine in Acrobat 7 or 8 (Reader and Pro) with file attachment.
    If no file attachment is specified (user did not select a file) then the PDF form submits fine in acrobat 9. The form data submission format is in FDF. Same problem if I change to XFDF.
    There are no differences in the problem if the PDF form is created in Acrobat 7 or Acrobat 9, the same submit issue exists in Acrobat 9 but not in the older Acrobat versions.
    Is this a known issue and are there any workarounds/solutions?
    Thanks.

    Sounds like a bug to me. Please report it: http://www.adobe.com/support/feature.html
    George

  • Attach java Script to 3d annotation

    How to attach java Script form to 3D Annotation using acrobat javaScript in plug-in ?

    Duplicate thread
    Please do not create multiple identities to ask the same question.

  • Java Scripting

    How to add java Script Form field acrobat with 3D Annotation in plugin?

    Sorry but your question makes no sense whatsoever.

  • Urgent !!! - Java script help for events in adobe form

    Hi ,
    We have requirement  where we have 5 buttons on interactive form which will retrive data from R/3 system .
    1) How can i distingish the event of each button  ?
    For Ex : We have 5 buttons namely , GetPlantcode , GetStatus, SubmittpSAP etc..
    We hav only 2 events on adobe form - Submit to SAP and SAPCheckFields.
    Please let me know some alternative by which i can sent some variable to webDynpro which distinguishes them.
    2) How to set a value for the context variable on button click event ?
    Ex : I have a context node ( data node ) bind to adobe interactive adobe component on a webDynpro application. If i want to set Selectindicator ( value attribute in data Node ) a value on a button click , Please let me know the java script how i can do this.
    Happy New Year for all
    Nanda

    Hi ,
    We found one work around for this. It seems to solve our issue for now.
    Set a text field on adobe and try to set it with some value in each button click. We can get retrived that value in webdypro application through context bind value node to text field.
    Using the value in the value node we have applied different logic in same event submit to SAP.
    Nanda

  • By using Java scripting how  can  compare database value to Forms value?

    i develop portal form n want to compare field that is Issued quantity with available quantity through java scripting.please send me syntax with an example.
    problem:
    if issued quantity is greater than available Quantity then appear alert message
    Thanks,
    Sadaf

    this is the false forum for you. Try it in the database forum e.g.

Maybe you are looking for

  • Multiple Oracle_home (best way to upgrade) ??

    hello all, I was going thru the below link and found this very cool trick that i didnt know. http://searchoracle.techtarget.com/tip/0,289483,sid41_gci1252556,00.html?track=NL-93&ad=587723&asrc=EM_NLT_1354356 it goes something like this *My favorite b

  • Yoga Tablet 2 8" - How to install Windows 8.1 Profession​al?

    Hi folks, how can I install Windows 8.1 Professional on my Yoga Tablet 2 8"? I dont want to use "Windows 8.1 with Bing" because I still own a Professional Version of Windows which I could use. The Tablet doesn't want to boot from USB. It's always say

  • How to create a procedure function with a return value of ref cursor?

    Can anybody provide a sample about how to create a procedure function with a return value of REF CURSOR? I heard if I can create a function to return a ref cursor, I can use VB to read its recordset. Thanks a lot.

  • How to create  an image

    hi i have image data in a bytearray that is in either gif or jpeg format, how can i create an image using the byte array thanks in advance have a nice time

  • Receive connector to allow relay for localhost

    I have set up a relay receive connector to allow anonymous relay from another exchange server (send mails with Send-MailMessage cmdlet ) and it works just fine, but trying to send same mail from localhost falls into default receive connector and retu