Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asptoday_discuss thread: Alternative to Response.Redirect


Message #1 by "Tan Chye Ting" <chyeting18@h...> on Tue, 25 Dec 2001 16:38:54
I'm urgently in need of help on this one.I use Response.Redirect command 

to redirect the current page to the desired page. But how do I redirect 

the page to another frame in a window?If I'm using the anchor tag<a> in 

html, that would not be a problem because I would have set the Target 

properties. But since I'm using Response.Redirect command, this tends to 

be a problem. I have tried using Javasript command-Window.Location.href 

which solve the whole problem.But the problem with this method is that i 

can't pass any variable like Response.Redirect "Login.asp?

SecondTry=True" .And I can't seem to call the Javascript function , I get 

the error Type Mismatch.why is that?
Message #2 by "Mark Phillips" <webmaster@d...> on Tue, 25 Dec 2001 19:10:57 -0000
Use something like Response.Write "<SCRIPT

language=JavaScript>parent.frame3.location='newpage.htm?argument1=value';</S

CRIPT>"



My JavaScript isn't all that good so best check for syntax!



-----Original Message-----

From: Tan Chye Ting [mailto:chyeting18@h...]

Sent: 25 December 2001 16:39

To: ASPToday Discuss

Subject: [asptoday_discuss] Alternative to Response.Redirect





I'm urgently in need of help on this one.I use Response.Redirect command

to redirect the current page to the desired page. But how do I redirect

the page to another frame in a window?If I'm using the anchor tag<a> in

html, that would not be a problem because I would have set the Target

properties. But since I'm using Response.Redirect command, this tends to

be a problem. I have tried using Javasript command-Window.Location.href

which solve the whole problem.But the problem with this method is that i

can't pass any variable like Response.Redirect "Login.asp?

SecondTry=True" .And I can't seem to call the Javascript function , I get

the error Type Mismatch.why is that?



Message #3 by "Patrick" <patrick00@n...> on Tue, 25 Dec 2001 20:25:26 -0000
Try this one

Declare the target frame at the beginning of the page Lets say you have your

target frame is called "Main"

The first page is called test1.asp

The second page is called test2.asp



test1.asp

<%

Response.buffer=true

Response.write"<base target = main>

Response.redirect"test2.asp?var1=My&var2=Name"

%>



tst2.asp

<%

Response.buffer - True

var1 = request("var1")

var2 = request("var2")

Response.write var1 & " " & var2

%>



You will find that this will work for you so long as in test1.asp you

declare as I have done in line 2 the "Name" of the frame you wish to target.

No Java or complicated script is needed.





----- Original Message -----

From: "Tan Chye Ting" <chyeting18@h...>

To: "ASPToday Discuss" <asptoday_discuss@p...>

Sent: Tuesday, December 25, 2001 4:38 PM

Subject: [asptoday_discuss] Alternative to Response.Redirect





> I'm urgently in need of help on this one.I use Response.Redirect command

> to redirect the current page to the desired page. But how do I redirect

> the page to another frame in a window?If I'm using the anchor tag<a> in

> html, that would not be a problem because I would have set the Target

> properties. But since I'm using Response.Redirect command, this tends to

> be a problem. I have tried using Javasript command-Window.Location.href

> which solve the whole problem.But the problem with this method is that i

> can't pass any variable like Response.Redirect "Login.asp?

> SecondTry=True" .And I can't seem to call the Javascript function , I get

> the error Type Mismatch.why is that?

>



Message #4 by "N. Rajavelu" <nrajavelu@q...> on Wed, 26 Dec 2001 09:21:07 +0530
Lets assume the following is your frameset page and you have name for the

each frame too...



		<frame name="search" scrolling="no"  src=search.html>

		<frame name="contents" scrolling="auto"  src=blank.html>

//later you fill with result.asp



In Search.html, lets assume you have Form,in which ensure that your form

target should be the frame name where you wants to show the action

(redirect) and Find button through that you are redirecting to other frame:



<form name="form1" action="result.asp" method=post target="contents">

<input type="submit" name="Find" value="Search">



Hope this will help you.



:RV



-----Original Message-----

From: Mark Phillips [mailto:webmaster@d...]

Sent: Wednesday, December 26, 2001 12:41 AM

To: ASPToday Discuss

Subject: [asptoday_discuss] RE: Alternative to Response.Redirect





Use something like Response.Write "<SCRIPT

language=JavaScript>parent.frame3.location='newpage.htm?argument1=value';</S

CRIPT>"



My JavaScript isn't all that good so best check for syntax!



-----Original Message-----

From: Tan Chye Ting [mailto:chyeting18@h...]

Sent: 25 December 2001 16:39

To: ASPToday Discuss

Subject: [asptoday_discuss] Alternative to Response.Redirect





I'm urgently in need of help on this one.I use Response.Redirect command

to redirect the current page to the desired page. But how do I redirect

the page to another frame in a window?If I'm using the anchor tag<a> in

html, that would not be a problem because I would have set the Target

properties. But since I'm using Response.Redirect command, this tends to

be a problem. I have tried using Javasript command-Window.Location.href

which solve the whole problem.But the problem with this method is that i

can't pass any variable like Response.Redirect "Login.asp?

SecondTry=True" .And I can't seem to call the Javascript function , I get

the error Type Mismatch.why is that?




  Return to Index