473,568 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to redirect to other page when press ok on alert message

52 New Member
Hi all. How to redirect to other page when press ok button on alert message
Expand|Select|Wrap|Line Numbers
  1. function checkstatus()
  2.     {  
  3.     var status = document.getElementById("status").value;
  4.  
  5.     alert(status);
Expand|Select|Wrap|Line Numbers
  1. <input type="submit" name="Submit" value="Submit" onClick="checkstatus()">
Jul 4 '07 #1
10 2866
kovik
1,044 Recognized Expert Top Contributor
Directly after the alert, write window.location = whatever.
Jul 4 '07 #2
chaos
52 New Member
Directly after the alert, write window.location = whatever.
Volectricity thx for your code but it cant be used as error occur
Jul 4 '07 #3
pbmods
5,821 Recognized Expert Expert
Heya, chaos.

Volectricity thx for your code but it cant be used as error occur
What error?
Jul 4 '07 #4
chaos
52 New Member
Heya, chaos.



What error?
when i press the submit button , bottom of the web page occur a exclamation sign
Jul 4 '07 #5
chaos
52 New Member
Even though i redirect to other page like www.yahoo.com . The page still remain the same.
Jul 4 '07 #6
kovik
1,044 Recognized Expert Top Contributor
Check the console for the error and tell us what it is.
Jul 4 '07 #7
chaos
52 New Member
Check the console for the error and tell us what it is.
i using dreamweaver 8 but there is not error occur . But on the web page , the error occur on the button

Jul 4 '07 #8
kovik
1,044 Recognized Expert Top Contributor
The exclamation mark means there's an error (Internet Explorer, right?) I think you bring up the console in IE by either double clicking the exclamation mark, or right clicking it.
Jul 4 '07 #9
chaos
52 New Member
The exclamation mark means there's an error (Internet Explorer, right?) I think you bring up the console in IE by either double clicking the exclamation mark, or right clicking it.
i cant click on the exclamation mark as it appear too fast and gone.
Jul 4 '07 #10

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

Similar topics

6
5898
by: iceking | last post by:
Hi, I have a php script that checks whether the user is allowed to perform an action. If he is not allowed; I display a warning; using the alert function. After clicking away this function, I want to redirect the user to the original page using the header function. However, I get the normal message " headers already sent"... I know what the...
1
1758
by: krian | last post by:
Hi, I need a help from anybody. My problem is here I wrote two WebApplication in ASP.net Using C#. The name of the applications are (Journal.aspx and Payment.aspx). These Two pages have DataGrids in each page and links to the other page(Journal.aspx contain Payment.aspx link and Payment.aspx contain Journal.aspx link) Suppose we added...
0
1956
by: neeraj | last post by:
Hi Everybody I have one problem in my asp.net web application. The problem is that I check the date validation in code behind; if user not gives the valid data and press save button then I fire my own exception by JavaScript alert message Through register startup script Like RegisterStartupScript("Startup", "<script language=javascript>
1
2070
by: rockdale | last post by:
Hi, all I am coding a asp.net application as user data entry and report interface. We also have another C#.net appplication (a server) does some other stuff, my webserver can send and receive message with the C#.net server application. Now the C#.net server application group want me to refresh my webpage to show the real time status when I...
5
3134
by: arizal | last post by:
Hello everyone, i just saw the same thread below but was not able to get from it. Well the problem is in the userlist page i have a list of users on the database which i get from simple sql queries. On the same page on the side of each User i have delete link. Also inside the while Loop that runs sql and prints User Names i have some variable...
4
1807
by: apking | last post by:
Hi Friends, iam newbie,This is my form Authentication script.i need to redirect another page when user correctly authenticated.how to redirect anothe rpage? <?php // Include the database connection file. include("db.php"); // Check if a person has clicked on submit. if(isset($_POST)) {
3
1754
by: gussi | last post by:
when i used <?php @header("Location:google.co.in"); ?> .. the page is not redirecting to that page,, if i remove @ sign then it is showing worning session already started(...)in...
2
2401
by: PrasathPalani | last post by:
Dear Experts, I have a Datagrid with delete options. I use to confirm from users and delete record from data grid. I give confrimation after each record has deleted when a DataGridCommandEventArgs event occured. protected void SetDeleteButton(Object sender, DataGridCommandEventArgs e) { try { ...
0
2407
by: Anupam Jana | last post by:
Hello All, I want to redirect to some other directory page after displaying JavaScript alert message in ASP.net in a page. For that I tried bellow code in our application ~/Profile/MyProfile.aspx.cs file string redirectTo = "~/Logins/Login.aspx"; //The page I wish to redirect to. string script = "<script>"; ...
0
7693
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
7604
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
7962
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
6275
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
5217
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
3651
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
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
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
1207
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.