[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Return to predefined URL after submit

Posted on 2001-07-04
Medium Priority
Last Modified: 2013-12-18
R507; webapplication:

In a document or a view, a user clicks on an action, trigering an agent, passing the users current url through the new url:
The reason is that -later in- I want to return there.

The agent creates a document in a different database, sets a few fields and saves. Then an new url is composed to open that new documention editmode and -again- passing the original url:

After filling out some additional fields, the user presses a submit action. The authornames field is now given a different value (the user is not allowed to re-edit the document) and the document is actually submitted.

All this happens in javascript. The annoying thing is that I can't both save the docuemnt and return to the original url (preferably using location.assign()). It's no problem isolating originalURL but when I address it, the doc appears unsaved -even after adressing is AFTER submitting!-. When I only submit (save) the document, the form's action is triggered: the ?EditDocument, logically resulting in an error.

$$Return seems to have no effect on the forms action or what happens.
The onSubmit-event is added to the <FORM>-tag, but has no effect either.

I have done this before. What am I doing wrong this time?
Question by:CRAK
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
LVL 24

Expert Comment

ID: 6252862
At the end of the agent after everything is executed and doc is saved, Execute a print statement like this

Print "[www.Domain.com]"

This will open the page domain.com, this url can be relative too.

LVL 13

Author Comment

ID: 6253060
Sorry Hemanth, I know the technique (used it to open the doc in edit mode), but it does not work here....
As I said: I've done it before; there must be something really weird going on here!

In my keyboard as well.... so many typing errors in my question. Can't be me! ;-))

I'll try to involve WebQuerySave: that's the only LOGICAL thing that I haven tried yet. Will let you know tomorrow.
LVL 10

Expert Comment

ID: 6253128
Hello CRAK,

perhaps you mess this: the correct action for storing a document is not ?EditDocument ;-))
The correct one is: ?ComposeDocument

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 24

Expert Comment

ID: 6253704
LVL 13

Author Comment

ID: 6254534
The document was already created and saved in the back-end. The user only has to fill out one or two additional fields. ?ComposeDocument would create ANOTHER new document.

But I've worked thinks out last night. That URL that is supposed to bring back my original page is retrieved (in javascript) from the URL, using Query_String. In e.g. http://newdocUrl?EditDocument&SourceUrl=originalUrl I locate "&Source=", keep everything trailing it and discard the rest. Then I add "&" at the end, locate the first "&" (more parameters MAY be entered) and isolate everything preceding it, using myUrl.substring(start, end).

The error I made resulted in end=0.

Simple stupidity....

Sorry guys.... mind if I delete this question?
LVL 10

Expert Comment

ID: 6254588
hey, from my side, I do not mind at all <|;-)

Allow me only one joke: the most errors sit in front of the keyboard :-))
LVL 13

Author Comment

ID: 6254878
I'll check with my parents.... see if they can get my bugs fixed ;-o
LVL 13

Author Comment

ID: 6254888
Why did you change your name?
LVL 10

Expert Comment

ID: 6255387
this name change was a bug fix ;-)

when I was creating my EE account in 1998 I was checking only the account "Zvonko" (my FirstName). It was in use, so I choose this stupid synonym (stamp, ha ha).
Now I have to pay for this ;-)
The Proppercase name was registered by an Croatian who newer posted nor asked for eneything. But the EE comunity support told me: it is not a problem; take the first letter lowercase and it will work. So, I start now from scratch. Transfering expert points and history is still not possible in EE (I meen: renaming stamp to zvonko). Only offer from EE was to give me question points from stamp...
LVL 13

Author Comment

ID: 6392246
I found solution myself. The problem wasn't caused by some unexpected program behaviour, but by a simple typing error.

I don't think others will learn a great deal from a silly thing like that.

I can't reward points to either of the participants: I am sure that they both know how to solve a problem as described, but:
- neither mentioned "typing error", and
- rewarding one would be unfair to the other


Accepted Solution

Netminder earned 0 total points
ID: 6809796
Points refunded and question closed per user request (user resolved question).

Community Support Moderator
Experts Exchange

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question