Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect after submit

Status
Not open for further replies.

davmold

IS-IT--Management
Jul 16, 2007
29
US
I have a form that gets processed with an asp script.

and I have another page where you can update the entered data(this form also has asp code.)
Is there a way to redirect the input form to the updateform

I have tried
Code:
 MM_editRedirectUrl = "view1.asp?id=Recordset1.Fields.Item("id")"
but I keep on getting "Expected end of statement line 47, column 59

the above code is line 47
 
It's your use of "'s

Assuming this is VBScript ASP do this:

Code:
MM_editRedirectUrl = "view1.asp?id=Recordset1.Fields.Item([!]""id""[/!])"


[monkey][snake] <.
 
Try this:
Code:
MM_editRedirectUrl = "view1.asp?id=" & Recordset1.Fields.Item("id")

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Chopstik,
I am afraid that did not work either

I get this

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
insert.asp, line 47


 
Is Recordset1.Fields.Item("id") supposed to a recordset object in your page? Or what is it supposed to be? I think your problem lies in that you are trying to use a value from a recordset that doesn't exist but without more information it's hard to gauge.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
On the face of it?
>MM_editRedirectUrl = "view1.asp?id=Recordset1.Fields.Item("id")"
[tt]MM_editRedirectUrl = "view1.asp?id=" & Recordset1.Fields.Item("id")[/tt]
 
I repeated Chopstik's, sorry! But there is not many different alternative readings possible apart from further taking care of the need of encoding.
[tt] MM_editRedirectUrl = "view1.asp?id=" & server.urlencode(Recordset1.Fields.Item("id"))
[/tt]
 
tsuji,
That's ok. I just thought it was Memorex. [lol]

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top