Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7009799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:54:31+00:00 2026-05-27T21:54:31+00:00

I have a form submit, where it get the values from the form and

  • 0

I have a form submit, where it get the values from the form and goes
to next page… here I have a hyperlink to open a child window, while
I click, it opens the child window and simultaneously it reloads the
parent window. I have a action configured to the parent window which
has a Database insert statement too.

The problem is that while I click the link it call my action
again(because of page reload), in this action I wrote if condition to
check null/empty string from the previous page form submit. since this
is the second time the action loads it looks of the fields(but
actually those fields are in my previous page form). so it take null
while checking my if condition.

Another problem is that when I solve the above problem here comes the
SQL insert statement, which is about to execute 2nd time. I dont want
this to happen or I dont want my action to execute while I open the
popup window and I want to populate the selected value from the popup
to the parent window.

code used for opening the popup

 function select_reactant()
    {
        window.open ("SeriesTab.action?component=reactant",
            "mywindow","scrollbars=1,resizable=1,width=1000,height=1000");  
        };

This is the place where I open the popup and want to populate the value selected from the popup to the textfiled here

<tr>
    <td><a href="" onclick="select_reactant();">reactant</a></td>
    <td><s:textfield name="reactant" id="reactantId" readonly="true" theme="simple"/></td>
  </tr>

jquery to get back the value form popup to parent window

$(window.opener.document).find('#reactantId').val(rxn);

the code inside action below is what the action that I mention at the beginning

if(Rxn!=null||!Rxn.equals(""))  //Rxn is the field variable for previous page
{ 
//my insert statement
}

while I run I get nullpointer error since the value for Rxn is reset to null by the page reload due to popup opening done by

window.open 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:54:31+00:00Added an answer on May 27, 2026 at 9:54 pm

    You can do something like this

    HTML

    <a href="#" id="anchSelectReactant">reactant</a>
    

    jQuery

    $(function(){
        $("#anchSelectReactant").click(function(){
            select_reactant();
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation where I needed to get data from a form submit().
I have a case where i want to submit a form and get the
I have this form submit code: Event.observe(window, 'load', init, false); function init() { Event.observe('addressForm',
I have a web page like this: <form id=some-form> <input type='text'> <button type=submit> </form>
Hey guys, I have a bit of a problem. I get values from textarea
I have a form with many input fields. When I catch the submit form
I have a form with a submit button. I have called a function on
I have a form which on submit I want to run a script via
I have form with one input for email and two submit buttons to subscribe
I have a form, when user submit the form, I want to direct the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.