473,516 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect twice

MarkoKlacar
296 Recognized Expert Contributor
Hi,

I'm wondering if this is possible...I'm using JS,struts and Java by the way...

I've got a call that goes to a JS function, the function takes a variable called url.
At the end of the script it does this:

Expand|Select|Wrap|Line Numbers
  1. self.location.href = url;
What that does is redirect it to the url site, right?

Well, I'm wondering if I can do something like this:

Expand|Select|Wrap|Line Numbers
  1. self.location.href = url;
  2. self.location.href = "myUrl";
That is, redirect it twice so to say...

JS is not my strongest skill, this may be way out there but I think it would solve somethings for me....

Any help is appreciated.

/MK
Sep 30 '08 #1
3 3366
Markus
6,050 Recognized Expert Expert
I can't really think of a situation that would require this. Any more info? Might be able to suggest something then.

Cheers,
Mark.
Sep 30 '08 #2
rnd me
427 Recognized Expert Contributor
no. as soon as you leave the page, script execution stops.
the second command would never fire.

you could use an iframe, form, or img tag if you are trying to talk to the server.
Sep 30 '08 #3
MarkoKlacar
296 Recognized Expert Contributor
Hey guys,

You've answered my question, I suspected it was not possible to do it anyway.

Thanks....

/MK
Oct 1 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
1905
by: Noozer | last post by:
Is it possible to redirect a user to another web page using ASP code located in page body? I have some ASP code that runs after generating some output to the browser. It checks for a condition that can only be calculated using the values produced in the output, so redirecting the user before the <html> tag isn't possible without running the...
1
3897
by: Drebin | last post by:
I posted this over at the ASP.NET group, but you guys are pretty sharp - is this an obvious answer for anyone?? I'm really jammed up!! --------------------------------------- I am retrofitting a central login application and want to be able to read the Request.ServerVariables so that when they have logged on, I can send them back to...
1
1914
by: Milan Todorovic | last post by:
I need some help with my ASP.NET application. The central part of the application is very processing intensive page that can take up to several minutes to process the complex queries and load the aspx page (processing occurs during page load). After it loads the page contains the datagrid (holding a result recordset) and a rather simple web...
2
4314
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event...
15
15390
by: Drebin | last post by:
I am retrofitting a central login application and want to be able to read the Request.ServerVariables so that when they have logged on, I can send them back to wherever they were trying to go.. If you try to load a legacy ASP app, I do this: If Len(SessionID) <> 40 Then Response.Redirect "/WAS/Default.aspx?AppCode=2400" End If
1
2334
by: Sean Wolfe | last post by:
I have this wierd bizarrre problem that I'm experienceing with the Response.Redirect() method. I have a site where the users are on a particular page in SSL. When they post the data back, and the processing is done, it then tries to redirect them back to the non-SSL site. But the site is on a non-starndard port number. I place in the...
0
1688
by: JeffM | last post by:
This seems odd, but it appears that the Page_Unload event is fired twice on a Response.Redirect or a Server.Transfer. The output below demonstrates that during the move from the first to the 2nd page, the event fires twice on the 1st page during Postback. The "var" set the first time is visible the 2nd time it fires. Anyone else notice...
15
6367
by: KBuser | last post by:
I recently developed an internal website with various queries against our SQL server. I added buttons with Response.Redirect. These buttons do not work with Internet Explorer, however when using Firefox the page works flawless. Does anyone know why this is happening or how to fix it?
0
1154
by: Stina | last post by:
I have a problem with the Page_Unload event being called twice in a row on a redirect and I just can't figure out why. I have seen other threads on this subject but not found a solution to the problem. This is what happens: When page is loaded Page_Load Page_Unload
0
7276
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7548
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5714
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4773
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3267
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
825
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.