Solved

Return to predefined URL after submit

Posted on 2001-07-04
11
331 Views
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:
http://agentUrl?OpenAgent&SourceUrl=originalUrl
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:
http://newdocUrl?EditDocument&SourceUrl=originalUrl

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?
0
Comment
Question by:CRAK
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
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.

Goodluck
~Hemanth
0
 
LVL 13

Author Comment

by:CRAK
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! ;-))


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

Expert Comment

by:zvonko
ID: 6253128
Hello CRAK,

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

Regards,
zvonko
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6253704
0
 
LVL 13

Author Comment

by:CRAK
ID: 6254534
zvonko,
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?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Expert Comment

by:zvonko
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 :-))
0
 
LVL 13

Author Comment

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

Author Comment

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

Expert Comment

by:zvonko
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...
0
 
LVL 13

Author Comment

by:CRAK
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

Thanks
0
 
LVL 5

Accepted Solution

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

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now