CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 How to keep "Edit" mode after a page reload ?

Print topic Send  topic

Author Message
Diego Scanarotti
Posted: 09/02/2003, 4:52 AM

I'm trying to implement a mechanism of consequential listboxes using the
command window.location.href="..." on the onchange event of every listbox.
It works properly when the user inserts a new record but it has problem when
the user needs to modify a record already present in the DB.
In order to make the page keep the "edit" mode, I have to pass the page the
primary key. When the page reloads using the primary key + the just-selected
value from the listbox, the system ingnores the last parameter and reloads
the values from the database, overriding the selected value.
I can immagine 2 possible solutions:

1. Find out how to keep the "edit" mode without passing the primary key
2. Find out how to apply the "SELECTED" flag to the chosen value of the
listbox.

Unfortunately I'm not able to do both of them. Can anyone help me or giving
me some suggestions ?
Thankyou.

Diego

DonB
Posted: 09/03/2003, 5:03 AM

You may have to add some code to the Initialize event of the page to
retreive the listbox value you selected (which presumably is appearing on
the end of the URL once the page reloads). You can try modifying the value
of OperationMode() (an array) to force the page into edit mode. I don't
know personally if this works as I have not tried it.

Generally, a form will put itself into edit mode if the necessary primary
key value are supplied for the form and a matching record is found in the
database.

Since you are essentially talking about changing a stateless behavior into
a stateful one, you mayl need to establish state with a session variable, or
follow the code on an EditableGrid to see how the hidden "state variable" is
implemented there. Create a test page and through an EditableGrid on it to
see how they work.

--
DonB

http://www.gotodon.com/ccbth


"Diego Scanarotti" <diego.scanarotti@mpsam.ie> wrote in message
news:bj209k$gl3$1@news.codecharge.com...
> I'm trying to implement a mechanism of consequential listboxes using the
> command window.location.href="..." on the onchange event of every listbox.
> It works properly when the user inserts a new record but it has problem
when
> the user needs to modify a record already present in the DB.
> In order to make the page keep the "edit" mode, I have to pass the page
the
> primary key. When the page reloads using the primary key + the
just-selected
> value from the listbox, the system ingnores the last parameter and reloads
> the values from the database, overriding the selected value.
> I can immagine 2 possible solutions:
>
> 1. Find out how to keep the "edit" mode without passing the primary key
> 2. Find out how to apply the "SELECTED" flag to the chosen value of the
> listbox.
>
> Unfortunately I'm not able to do both of them. Can anyone help me or
giving
> me some suggestions ?
> Thankyou.
>
> Diego
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.