473,480 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

repositioning long forms after a post


After a javascript-generated post event (this is a post, not ajax
messaging)
the current screen has to be redrawn. But on *long forms*
(longer than a single screen) then the current screen positioning
is lost, and the current form ends up redrawn, with a different
vertical
positioning--after the post event.

However, If I sent the x,y mouse position as post parameters,
and if the current widget (that generated the post) had
a well-known anchor tag name, would there be a way
to combine that much information, after the post, in order to redraw
the
form close to it's original vertical positioning?

How?

Dec 7 '06 #1
6 1763
salmobytes wrote:
After a javascript-generated post event (this is a post, not ajax
messaging)
the current screen has to be redrawn. But on *long forms*
(longer than a single screen) then the current screen positioning
is lost, and the current form ends up redrawn, with a different
vertical
positioning--after the post event.

However, If I sent the x,y mouse position as post parameters,
and if the current widget (that generated the post) had
a well-known anchor tag name, would there be a way
to combine that much information, after the post, in order to redraw
the
form close to it's original vertical positioning?

How?
I think that can be accomplished with some dhtml, which I will try to
help with, but what is the form layout? Are there multiple ways
(buttons, links, etc) by which the user can submit this form? If not,
won't the mouse position at submit time always be right on the submit
button?

Dec 8 '06 #2

pangea33 wrote:
I think that can be accomplished with some dhtml, which I will try to
help with, but what is the form layout? Are there multiple ways
(buttons, links, etc) by which the user can submit this form? If not,
won't the mouse position at submit time always be right on the submit
button?
Thank you.
I need a generic solution. I have a java application that is, among
other things,
be a 'forms editor' that makes hierarchical forms (some widgets
can contain other widgets). The resulting forms (abstract data entry
forms,
generated from the Java application) can be saved
server side as xml, stored in Exist, Xindice, SleepyCat, Oracle, etc

That backend XML can be used to automatically generate data entry
forms, at a later date, instantiated as either Java Swing Widgets or
as html forms.

......it gets complicated. Data (from the generated forms) is stored
server side too. A servlet can splice XML form definitions together
with historical data sets (mostly for documenting complex laboratory
data)
so any historical data set can be re-displayed, at any time, as it
looked
when it was originally saved..........so data entry sessions
can finished up over a period of time.
All of that works. The Java application part is slick as schoolboy's
sleeve
in January. But the html side is still a bit clunky. Form users
can dynamically add new options to select menus in the
html data entry form, but each "new option" event generates
a post, so the server can update a tree of DefaultMutableTreeNodes,
that represent the backend XML.

So it isn't always a submit button that generates a post.
And posts from a very long form end up shifting the screen to a new
vertical position.

I think I need to track scrollbar positioning somehow, and
rebuild that scrollbar position after the post. Each hierarchical
widget
in the XML-like form has a uniquely named anchor tag.

Ajax is a possibility...............but I'd like to solve it without
Ajax if at all possible.

Dec 8 '06 #3

salmobytes wrote:
pangea33 wrote:
I think that can be accomplished with some dhtml, which I will try to
help with, but what is the form layout? Are there multiple ways
(buttons, links, etc) by which the user can submit this form? If not,
won't the mouse position at submit time always be right on the submit
button?
I found this on the net. This example assumes asp.net on the backend,
and I'm using Tomcat. But the server side isn't the problem here.
I'm a reasonably competent java programmer, but a javascript neophyte.
Maybe I can work with this.

http://patrickfoley.com/2005/01/21/scroll-saver/

Dec 8 '06 #4
salmobytes wrote:
salmobytes wrote:
pangea33 wrote:
I think that can be accomplished with some dhtml, which I will try to
help with, but what is the form layout? Are there multiple ways
(buttons, links, etc) by which the user can submit this form? If not,
won't the mouse position at submit time always be right on the submit
button?

I found this on the net. This example assumes asp.net on the backend,
and I'm using Tomcat. But the server side isn't the problem here.
I'm a reasonably competent java programmer, but a javascript neophyte.
Maybe I can work with this.

http://patrickfoley.com/2005/01/21/scroll-saver/
window.scrollTo(x,y) is not specified by any particular DOM standard so
it's not guaranteed for all browsers, but support by both Mozilla and
IE is a good start.

http://developer.mozilla.org/en/docs...indow.scrollTo
http://msdn.microsoft.com/workshop/a...s/scrollto.asp
http://www.w3schools.com/js/tryit.as...indow_scrollto

Dec 8 '06 #5
ASM
salmobytes a écrit :
After a javascript-generated post event (this is a post, not ajax
messaging)
the current screen has to be redrawn. But on *long forms*
(longer than a single screen) then the current screen positioning
is lost, and the current form ends up redrawn, with a different
vertical
positioning--after the post event.

However, If I sent the x,y mouse position as post parameters,
if something has been send (post) it is certainly because somebody
pressed a button, no ?

so you know the place of this button and perhaps can you link to it

function redraw) {
blah
blah
location = '#myButton';
}


--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Dec 8 '06 #6
function redraw) {
blah
blah
location = '#myButton';
Yes, but that puts that button at the top of the redrawn
screen, which is visually annoying and confusing,
if that button was at screen middle before the post,
especially in a long form.

So the answer (I think....it's starting to look like) is
to (somehow) persist the mouseXY position, from
before the post, and then, when back at the client,
to do a window.scrollXY(oldX, oldY).....which might
not be exactly the same vertical positioning, but it would
be close enough (I pounded nails for the Close Enough
Construction Company for 20 years, before diving into
software).

Dec 8 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1541
by: Kor | last post by:
Hi, Does anybody understand why the technique described in http://www.macromedia.com/devnet/server_archive/articles/css_positioning_dynamic_repositioning.html doesnt work in Netscape 6/7 and...
1
2238
by: John | last post by:
Hi First of all apologies for posting so much code but this is rather involved and I am totally stumped. Basically I have a main form (Staff Batch SMS/E-Mail) which calls a function (SendSMS) in...
2
2127
by: Jerry O | last post by:
Hi, I appear to have a problem where the user is not kicked back to the forms authentictation url when they post a webform, via a get, that results in a long url due to viewstate. Instead they...
5
2998
by: Mike Labosh | last post by:
In VB 6, the Form_QueryUnload event had an UnloadMode parameter that let me find out *why* a form is unloading, and then conditionally cancel the event. In VB.NET, the Closing event passes a...
3
1799
by: George | last post by:
In my Webform I am building in VS.NET, I need to position and reposition a number of panels at runtime from within my Code Behind. Can someone tell me what namespaces I need to import, what the...
0
2189
by: Slawomir Nasiadka | last post by:
Hi, I'am new to this group so I would like to say "Hello" everyone and here is my problem: I'm writing a simple application (code is at the end of this message) witch would list all mails...
9
3251
by: esakal | last post by:
Hello, I'm programming an application based on CAB infrastructure in the client side (c# .net 2005) Since my application must be sequencally, i wrote all the code in the UI thread. my...
7
2046
by: Leszek L. | last post by:
Hello, I am new to this group; if my question is OT then please excuse me and tell me where to go. I am using MS Visual C++ with some of its graphics libraries. Now the compiler tells me that...
0
7037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7034
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6732
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6886
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4768
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4472
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.