RE: Frame Questions
RE: Frame Questions
- Subject: RE: Frame Questions
- From: "Xia, Wen" <email@hidden>
- Date: Thu, 23 Jun 2005 16:22:20 -0700
- Thread-topic: Frame Questions
Hi Mark,
Thank you for your advice. I've been really struggling with frames these
days. I thought about javascript and haven't started working on it. So
if you can forward your code to me, it will save me a lot of sleep time
and coffee.
I know how to do it if the buttons are within the same form. And I have
a java method to track the changes and display a message for unsaved
changes. I wonder if there is a way to reuse the method, that is, call
the method and submit the form from another frame. It's just another
thought. Not sure whether it will work though.
Appreciate your help as always.
Wen
-----Original Message-----
From: Mark Morris [mailto:email@hidden]
Sent: Thursday, June 23, 2005 4:03 PM
To: Xia, Wen
Cc: email@hidden (Group)
Subject: Re: Frame Questions
BTW, this is a problem not only when using frames, but anytime
there's a way to navigate without submitting the current form, as
with a navigation menu or tabs. In the past I've argued that if a
user navigates away from a page without submitting, they probably
MEANT to discard their changes. I was told, however, that I was
giving the users too much credit. (Hence the code of which I
spoke! ;-)
Regards,
Mark
On Jun 23, 2005, at 5:53 PM, Mark Morris wrote:
> Hi Wen, how've you been? :-)
>
> If they've made changes and haven't submitted them to the server,
> only client-side Javascript will be able to help. You *can* access
> Javascript variables from other frames, so perhaps keep a
> "hasUnsavedChanges" variable in frame1, update it as necessary from
> frame 2, then check it via Javascript before any frame1 buttons are
> allowed to be processed. Throw up a "confirm" box and let them
> proceed or cancel.
>
> I have some similar code if you'd like me to forward it.
>
> Regards,
> Mark
>
> On Jun 23, 2005, at 5:20 PM, Xia, Wen wrote:
>
>
>> I have a frameset which have 2 frames - frame1 and frame2.
>>
>> In frame1, there are two buttons.
>> When you click on button1, an edit component is rendered in
>> frame2. And user
>> will edit data retrieved from the database.
>> When you click on button2, it shows a list of reports in frame2.
>>
>> Let's say the user clicks on button1 and change some data without
>> saving it.
>> And then he clicks on button2, there may be some unsaved changes
>> from the
>> edit screen. My question is, how to prompt user to save/cancel the
>> changes
>> before the list of reports is displayed? I have a method in the edit
>> component that tracks user changes, but how to call it from a
>> different
>> frame?
>>
>> Thanks in advance for your help.
>> Wen
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> 40onpointsoftware.com
>>
>> This email sent to email@hidden
>>
>>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 40onpointsoftware.com
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden