How to maintain dynamic rows with data when click on Previous button?

Hi,
I have 1 aspx page and divided into 3 pages using panels.Each panel has "Next" and Previous buttons
I have created and deleted dynamic table rows when click on Add button using javascript. whenever i click on Next button it will navigate to same page of next panel.
when i click on previous button then it goes to previous panel but whatever i have added dynamic table rows in 1st panel that got removed.
Can u please help me for how to maintain state of dynamic table rows with entered data when click on Previous button?
How to get dynamic table rows with entered data in previous panel when click on Previous button?
Please find the below javascript code:
function insertRow() {
if (index >= 2) {
document.getElementById('deleteRow').style.display = "inline";
else { document.getElementById('DeleteRow').style.display = "none"; }
var table = document.getElementById("myTable");
var row = table.insertRow(table.rows.length);
cell1 = row.insertCell(0);
t1 = document.createElement("select");
t1.options[t1.options.length] = new Option('--Select--', '0');
t1.id = "ddlYear" + index;
cell1.appendChild(t1);
for (var i = 1975; i <= 2015; i++) {
opt = document.createElement("option");
opt.value = i;
opt.text = i;
t1.add(opt);
t1.style.width = "155px";
var cell2 = row.insertCell(1);
t2 = document.createElement("Select");
t2.options[t2.options.length]=new Option('--Select--','0');
t2.options[t2.options.length]=new Option('State Board','1');
t2.options[t2.options.length]=new Option('CBSE','2');
t2.options[t2.options.length]=new Option('ICSE','3');
t2.options[t2.options.length] = new Option('Others', '4');
t2.style.width = "155px";
t2.id = "ddlCourse" + index;
cell2.appendChild(t2);
var cell3 = row.insertCell(2);
t3 = document.createElement("input");
t3.id = "txtCity" + index;
cell3.appendChild(t3);
var cell4 = row.insertCell(3);
t4 = document.createElement("input");
t4.id = "txtInstitute" + index;
cell4.appendChild(t4);
var cell5 = row.insertCell(4);
t5 = document.createElement("Select");
t5.options[t5.options.length] = new Option('--Select--', '0');
t5.options[t5.options.length] = new Option('English', '1');
t5.options[t5.options.length] = new Option('Hindi', '2');
t5.options[t5.options.length] = new Option('Telugu', '3');
t5.options[t5.options.length] = new Option('Others', '4');
t5.style.width = "155px";
t5.id = "ddlMedium" + index;
cell5.appendChild(t5);
var cell6 = row.insertCell(5);
t6 = document.createElement("input");
t6.id = "txtSpecialization" + index;
cell6.appendChild(t6);
var cell7 = row.insertCell(6);
t7 = document.createElement("input");
t7.id = "txtFnl" + index;
cell7.appendChild(t7);
index++;
function DeleteRow(index) {
var table = document.getElementById("myTable");
table.deleteRow(index);
// if (index = 2) { alert("There is no rows added.Please add the new row"); }
Design:
<tr style="font-size: 12pt" id="trSecond" runat="server">
<td colspan="3">
<table id="myTable" width="100%" border="0">
</table>
<tr>
<td colspan="3" align="right">
<input type="button" title="Add" value="Add" onclick="insertRow();" />
<input type="button" id="deleteRow" title="Delete" value="Delete Row" onclick="DeleteRow(this);" style="display:none" />
</td>
</tr>
Thank you.

Put the button click into an action listener and build the new frame there. The code I have below isn't exactly what you're doing (it's amazingly oversimplified), but it's probably similar enough to get your wheels turning in the right direction.
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class sample
     public static void main(String[] args)
          JFrame frame = new JFrame("Sample");
          frame.setSize(400,400);
          Container content = frame.getContentPane();
          content.setLayout(new FlowLayout());
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          final JTextField text = new JTextField(10);
          content.add(text);
          JButton button = new JButton("Send");
          content.add(button);
          frame.setVisible(true);
          button.addActionListener(new ActionListener()
               public void actionPerformed(ActionEvent ae)
                    JFrame myframe = new JFrame("Results");
                    myframe.setSize(200,200);
                    Container mycontent = myframe.getContentPane();
                    mycontent.setLayout(new FlowLayout());
                    String mytext = text.getText();
                    JLabel label = new JLabel();
                    label.setText(String.valueOf(mytext));
                    mycontent.add(label);
                    myframe.setVisible(true);
}

Similar Messages

  • How To Find Last Row With Data +2, Then Format?

    I need to find the last row +2, select the range A:L, then format.
    Could someone please supply the code?  I can handle the format part.
    Thanks!
    A. Wolf

    Works great!
    I need to do 2 other things:
    1) Add a text value to r in A: & center over selection A:L
    Dim r As Long
        r = Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
           USED THIS BUT ENDING UP IN MIDDLE OF L:!
        ActiveCell = Range("A" & r)
        ActiveCell.Value = "Estimated True Up Total"
    2) 2) Format a total in r as currency/2 decimels/aligned to right.
    THANKS AGAIN!!!
    A. Wolf

  • Having a problem with dates when I send my numbers doc to excel. dates are all out and that they have to cut and paste individual entries onto their spreadsheet. Any idea how I can prevent this

    having a problem with dates when I send my numbers doc to excel. dates are all out and that they have to cut and paste individual entries onto their spreadsheet. Any idea how I can prevent this.
    I'm using Lion on an MBP and Numbers is the latest version

    May you give more details about what is wrong with your dates ?
    M…oSoft products aren't allowed on my machines but I use LibreOffice which is a clone of Office.
    When I export from Numbers to Excel and open the result with LibreOffice, the dates are correctly treated.
    To be precise, dates after 01/01/1904 are correctly treated. dates before 01/01/1904 are exported as strings but, as it's flagged during the export process, it's not surprising.
    Yvan KOENIG (VALLAURIS, France) mardi 3 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • 30EA1: Database mounted, can't get rows with DATEs

    I'm starting to use SQL Developer 3.0.02 build MAIN-02.37. I tried to use it with a 10g standby database that is only mounted, to check on its recovery progress, and it appears to NOT return rows with DATE columns in them. I've tried this with both a TNS connection and a basic connection. If the database is open, no problem.
    Example: select instance_name, host_name, startup_time from v$instance;
    If I remove the DATE column "startup_time" from the query, I get the expected rows. The Logging Page pane at the bottom shows ORA-01219 errors "database not open, queries allowed on fixed tables/views only."
    I get that ORA-01219 message in TOAD against the mounted standby database, but I also get all the rows including the DATE column when I run the exact same statement there.
    Is this a bug, or expected behaviour, or is there some setting I'm missing?
    Edited by: gmaccrim on Nov 25, 2010 4:26 PM

    I have similar problem on standby database with query on v$database.
    This query
    SELECT name,dbid FROM V$database
    works fine, but this one
    SELECT name,dbid,created FROM V$database
    doesn't return any row.
    I have Version 2.1.1.64 Build MAIN-64.45.

  • How to maintain the material master data in plant

    Hi all,
    while creating BOM I am getting an error "no material master data in plant' can some one help me how to maintain the material master data in plant
    Regards,
    Balu

    Check the material available in MARC table in SE11 transaction against your plant.If it is not available please maintain through MM01 transaction.

  • How to use TRUNC function with dates in Expression Builder in OBIEE.

    Hi There,
    How to use TRUNC function with dates in Expression Builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns '07/01/2010' where sysdate is '07/15/2010' in SQL. I need to use the same thing in expression builder in BMM layer logical column.
    Thanks in advance

    use this instead:
    TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(CURRENT_DATE) * -1) + 1, CURRENT_DATE)

  • How  to maintain version in ERwin Data Modeler

    Hi all
    Please tell me
    how to maintain version in ERwin Data Modeler
    regards

    In SharePoint, navigate to the form library, and then click Library Tools > Library > Settings > Library Settings.
    On the Form Library Settings page under General Settings, click
    Versioning settings.
    On the Versioning Settings page under the Document Version History section, select either the
    Create major versions option or the Create major and minor (draft) versions option, and click
    OK.
    http://www.bizsupportonline.net/blog/2012/10/version-control-infopath-forms-templates-sharepoint-libraries/
     Or
    plan this wsp nfoPath_VersionHistory.wsp
    http://infopathversioning.codeplex.com/

  • How to copy Log text (with Date, Time stamp ) User IDfrom BP to Transaction

    Hi Experts,
                     Can someone guide us how  to copy Log text (with Date ,Time & User ID) fron Business partner  (Prospect) to transactions by text detrmination procedure.
    Regards,
    Basavaraj Patil

    save text
    Fill out following parameters of SAVE_TEXT function module:
    HEADER
    TDOBJECT C 10 BUT000
    TDNAME C 70 10 digit BP number
    TDID C 4 Z001
    TDSPRAS C 1 Language
    INSERT = ’X’
    LINES
    TDFORMAT TDLINE
    |
    |testtttttttttttttttttttttttt( Your text)
    I would suggest you to use some other BAPI that would attach your text to BP than SAVE_TEXT.
    If you still wanted to use SAVE_TEXT then first make sure how the TDNAME is generated. It depends on the text determination procedure. For examples, it can be guid of BP, GUID followed by date or time or else the BP number itself.
    Just go to BP transaction, double click on the text pad, it will open you the SAP Script editor. Click on menu GOTO and select Header which will give you info about your TDID, TDOBJECT, TDNAME....
    Hope this helps.

  • How to connect Orcal devsuitehome with data 10g

    How to connect Orcal devsuitehome with data 10g
    can you give me full details coz I really dpress
    full details through Net configuration assistant or where

    Using the appropriate setting in tnsnames.ora file located in your [Forms_Home]\network\admin directory.
    There are some Oracle e-books about configuring the connection using the Oracle Net.. you should consult....
    All info are there....
    Sim

  • Dynamic LOV with dates and selected default value

    Hello,
    I have a dynamic lov with dates. Query looks like this:
    select distinct concat(to_char(b.send_day_time,'YYYY.MM.DD HH24'),':00') display_value, to_char(b.send_day_time,'YYYY.MM.DD HH24') return_value
    from ...
    No I want to select a specific date as the default value. I put the following code for the default value:
    declare
    begin
    return to_char ('2008.02.19 10:00');
    end;
    But it doesn't work.The date (string) exists in the lov but it is not selected.
    Can someone tell me where the problem is?
    Thx in advance.
    Greetings,
    hamburger

    Hi hamburger,
    As return value you specified to_char(b.send_day_time,'YYYY.MM.DD HH24'),
    so your default value should be like to_char('2008.02.19 10'). Also pay attention to select the "Default Value Type".
    Hope this helps.
    chrissy

  • How to Maintain the MM Master Data from one company code to other co code

    Hi Experts,
    Can any one pls tell me how to Maintain the MM Master Data from one company code to other co code.
    Presently we created New plants,New Purchase Orgs under different company code.
    1) Material Master data
    2) Vendor MAster data
    3) PIR
    4) Source List
    Is there any standard Transactions...??
    Please reply.
    Brgds,
    KK

    Hi
    Check out the link -
    http://wiki.sdn.sap.com/wiki/display/ABAP/StepstocreateasimpleLSMWusingbatchinput+recording
    lsmw for data migration for  xk01 transaction
    http://www.sap-img.com/general/lsmw-steps-for-data-migration.htm
    Regards
    Anand

  • How i can create table with data

    How i can create table with data from dev to production?

    How i can create table with data
    [url=http://en.wikipedia.org/wiki/Black_Beast_of_Aa
    aaarrrrrrggghhh]from dev to production?
    [url=http://img2.travelblog.org/Photos/3800/14977/t
    /64816-Col-Kurtz-0.jpg]The horror, the
    horror.lol, you gonna scare somebody here.
    Are we helping devil?

  • How can I create an icon that when clicked will open and maximize an image file?

    How do I create a icon that when clicked will open and maximize an image file?  I have tried to use the simple image widget with maximize upon tap/click - however I am can only size the image really small and put on the page.  I'd prefer to have a graphic that when clicked it simply opens up the image.  This is for a very simple question/answer book.   The user is suppose to look at a picture and locate something.  I want to put an 'Answer' graphic on the image and then the user can click the 'answer' graphic and it will open up the picture with the answer identified. 
    Is this possible?

    Have yiu tried the PopOver widget?  You can drop an image into it, maximise the image and the widgets window...But, you cannot get it full screen.
    With iBooks Author, you either learn to use what is available within the app, or look online for third party widgets to purchase which suit your project.

  • I want to do banners ,how can we do  when click the same button (next button)  it must show differen

    i want to do banners ,how can we do  when click the same button (next button)  it must show different images . cam any one help

    Check out my blog with samples on Edgehero.
    http://www.edgehero.com/articles/interactivity

  • Problem with connecting ipad 2 with crestron cp2e...help plss its urgent... I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while t

    problem with connecting ipad 2 with crestron cp2e...help plss its urgent...
    I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while the device was in auto -lock(sleep)press connect to reconnect) when i pressed again its connected with cp2e. i am using netgear wireless access point . i also has been changed access point as well as updated ipad firmware bt problem is as it is .. pls help.

    Hi have you solved the issue ?
    Cause I have the same problem.
    Tnx

Maybe you are looking for

  • Material Issue to Shopfloor

    Hi Expert, The scenario is, in the begining of the month production personnel takes the material from central store to shopfloor storage location & consume in different different process orders. If required he repeat the same activity during the mont

  • How to make a "Program" out of my .java files?

    I have made a little application that stores a file to disk. Is there someway to make a file out of my .java files so it can be run without opening my editor and choosing run?

  • Command DML in variables IN/OUT from in functions/procedures

    I Use function variables IN/OUT. Is possible command DML in variables IN/OUT? Example: Create Function status (v1 out number, v2 out char, v3 in number) return is varchar2 begin select col1, col2 into v1, v2 from table where col3=v3; return 'Sucess'

  • Homesharing not showing up

    I recently moved and set up my computer on my new network. Homesharing will not show shared libraries on any of my devices but one. I have a windows PC running windows 7. I have the most recent version of itunes. I have an iPhone5, an iPhone 4, an iP

  • Passwords for WPA/WPA2 PC household

    I just purchased and Airport Extreme N router today after reading good things. I was pleasantly surprised at how it detected the situation (Airport as a wireless bridge to the wired network with wired router. On my PC with the utility, it connects an