Discussion:
return to a position half way on a webpage after viewing details
ernie hilgers
2017-02-08 02:40:45 UTC
Permalink
Hi All,

I am in need of a push in the right direction with the following situation I cannot solve (for now):

I put up a web page and load it with 20 lines of information with a heigth of about 1.5 inch. (a loop is used)
The users normally has a laptop screen or a Pad (any brand), meaning they have to scroll about 4 times if they have clicked a link some where at the bottom of the list.

When they click a link to see detailed information, another web page is send to the browser by 4D with information from the database.
They must fill out some some information into the available fields and press "submit".

The submit sends this data back to the 4D database PUTS UP another screen indicating the data is send.

(here it comes:)
in order to show the 20 lines of information again, I build the web page using the 4D loop then send the page to the browser.
Now the user has to scroll down (again) to find the link they clicked (to see the details).
The users have approached me with the question if it is possible to make it happen automatically.

I want to have that clicked link smack in the middle of the screen (or at the top) again and eliminate the need for scrolling down to find it.
Did some searches on the internet but the explanation to do this is too vague for my current knowledge.

recap:
1) I build a webpage by filling it with data using a loop
2) send the page to the browser
3) user clicks a link
4) fills out the form, click submit
5) when receiving the data a form is send to the browser acknowledging data is received, then after 4 seconds
6) go back to step 1

Question:
How do I approach this problem in order to find a solution ?

Pressing the "back button" requires the user to press it 3x to get back to screen 1 and see which link was clicked, yes that works.
first back: the thank you, data received screen
second back: the form with info
third back: the original list AND yes in the visible part of the screen AND the link has changed color

However I don't want to allow the users to press the back button.

Your input is much appreciated.
- either: wrong way do the web -thing-: tell me where to look
- more javascript : tell me what topic
- ......

greetings

ernie hilgers (aruba)
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
**************************************************
Ronald Rosell
2017-02-08 05:43:32 UTC
Permalink
Hi Ernie,

There are two ways tackle this (probably others as well, but these come to mind quickly):

1) Instead of going to an entirely new page, leaving the current one, load the new page in an overlay. There are several “ibox” javascript libraries that will do this. Then, the confirmation page displays in the same overlay, and they can close the overlay using a close button, returning to the original form (which they actually never left). One of my favorite scripts for this is tinybox. http://sandbox.scriptiny.com/tinybox2/ <http://sandbox.scriptiny.com/tinybox2/>.

OR

2) Include an HTML anchor next to each of the form lines; your loop can create these. The anchor ID might be some variation on a variable in that line or segment of the form. So, variable15 might be associated with anchor15, etc. Since that variable name is being passed to your database, you’ll know what the associated anchor is. Then, the confirmation page can include a link (either a header refresh or a button to click) that returns you to the original page with #anchor15 at the end of the URL. That would case the page to redisplay and scroll to the element the user was working with.

__

Ron Rosell
President
StreamLMS
Post by ernie hilgers
Hi All,
I put up a web page and load it with 20 lines of information with a heigth of about 1.5 inch. (a loop is used)
The users normally has a laptop screen or a Pad (any brand), meaning they have to scroll about 4 times if they have clicked a link some where at the bottom of the list.
When they click a link to see detailed information, another web page is send to the browser by 4D with information from the database.
They must fill out some some information into the available fields and press "submit".
The submit sends this data back to the 4D database PUTS UP another screen indicating the data is send.
(here it comes:)
in order to show the 20 lines of information again, I build the web page using the 4D loop then send the page to the browser.
Now the user has to scroll down (again) to find the link they clicked (to see the details).
The users have approached me with the question if it is possible to make it happen automatically.
I want to have that clicked link smack in the middle of the screen (or at the top) again and eliminate the need for scrolling down to find it.
Did some searches on the internet but the explanation to do this is too vague for my current knowledge.
1) I build a webpage by filling it with data using a loop
2) send the page to the browser
3) user clicks a link
4) fills out the form, click submit
5) when receiving the data a form is send to the browser acknowledging data is received, then after 4 seconds
6) go back to step 1
How do I approach this problem in order to find a solution ?
Pressing the "back button" requires the user to press it 3x to get back to screen 1 and see which link was clicked, yes that works.
first back: the thank you, data received screen
second back: the form with info
third back: the original list AND yes in the visible part of the screen AND the link has changed color
However I don't want to allow the users to press the back button.
Your input is much appreciated.
- either: wrong way do the web -thing-: tell me where to look
- more javascript : tell me what topic
- ......
greetings
ernie hilgers (aruba)
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
**********************************************
Douglas Cryer
2017-02-08 08:45:05 UTC
Permalink
Koen,

Thank you for both postings. I was able to get into the design environment and after a bit of a battle with the bad method I was able to delete it and flush it from the trash.

Miyako,

I did not really understand your comment:

- rather than going to Design the normal way, you could open the DB directly with the MSC.

I did this for verifying and repairing both of which reported the structure was good. Am I missing something? Is there some way of looking deeper at the structure in MSC?

I have a problem with a different database where tools gives me a warning on a method that no longer exists in the database.

The warning reads:
(MY_NON_EXISTENT_METHOD
[I.55] : invalid table number

So the bracket before the method indicates it is looking at a deleted method but the method does not exist in the trash.

I have tried adding a method with the same name then deleting it and removing it from trash to see if that would either error along the way or flush it out. Any other ideas? The database is not broken YET...

I saw a demo at one of the conferences for a full structure checking application but I have not heard anything since.

Regards, Dougie
________________________________________________________

telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759 Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : ***@telekinetix.com <mailto:***@telekinetix.com> Web : http://www.telekinetix.com <http://www.telekinetix.com/>
________________________________________________________


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
*****************************
Keisuke Miyako
2017-02-08 09:30:32 UTC
Permalink
I would imagine you need to re-tokenise (open the method and press function+return or enter) the method
for the now-process-varaible token to connect to the newly created method.

or, perhaps you could use the global find-and-replace feature (which re-tokenises what it replaced)
by replacing the now-process-varaible token with a valid token (like a project method).

by the way,
sometimes trashing a method or form or table whose name is already using the max 31 characters could end up with only the opening parentheses.

2017/02/08 17:45、Douglas Cryer <***@telekinetix.com<mailto:***@telekinetix.com>> のメール:

I have a problem with a different database where tools gives me a warning on a method that no longer exists in the database.

The warning reads:
(MY_NON_EXISTENT_METHOD
[I.55] : invalid table number

So the bracket before the method indicates it is looking at a deleted method but the method does not exist in the trash.
I have tried adding a method with the same name then deleting it and removing it from trash to see if that would either error along the way or flush it out. Any other ideas? The database is not broken YET...


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
****************************************************************
Keisuke Miyako
2017-02-08 09:39:50 UTC
Permalink
I would expect the MSC to repair only what it can report.

if you already know the name of the offending method
(for example, you record the crashing sequence and play back in slow motion)
you might be able to extract, save and replace the code with METHOD SET CODE.

for example, you might be able to take advantage of the On Host Database event to do that without going to Design,
or even do so directly by pasting a one-liner in the debugger's expression pane.

2017/02/08 17:45、Douglas Cryer <***@telekinetix.com<mailto:***@telekinetix.com>> のメール:
I did this for verifying and repairing both of which reported the structure was good. Am I missing something? Is there some way of looking deeper at the structure in MSC?



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
*********************************
ernie hilgers
2017-02-09 02:36:08 UTC
Permalink
Hi Ronald Rosell,
This link is very interesting and for this situation looks like I can handle this :-)
I will certainly make efforts to try this out.

Great link, thank you.

ernie hilgers (aruba)
Post by Ronald Rosell
Hi Ernie,
1) Instead of going to an entirely new page, leaving the current one, load the new page in an overlay. There are several “ibox” javascript libraries that will do this. Then, the confirmation page displays in the same overlay, and they can close the overlay using a close button, returning to the original form (which they actually never left). One of my favorite scripts for this is tinybox.http://sandbox.scriptiny.com/tinybox2/ <http://sandbox.scriptiny.com/tinybox2/>.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
**********************************************************

Loading...