Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6957437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:00:07+00:00 2026-05-27T15:00:07+00:00

How do I redirect the user to another page withing the same website? In

  • 0

How do I redirect the user to another page withing the same website?

In my case, I have a form where a user fills in some information. so, for cancellation they should have options. When a user hits that button, he/she will get a dialog box. If hits ok, they will be redirected to the index page.

I don’t want the user to see the address of my website. Why? I developed an android app where I managed to hide the address bar of my browser.

I’m using Jquery Mobile in this case. I have already written something like this in JavaScript but I still have the problem with the address showing up in the dialog box. I was told I could do this in Jquery, so I started to learn it. Cancel button:

<div data-role="fieldcontain">
    <button data-theme="b" id="canc" onclick="cancelMe()"   dataicon="delete">cancel</button>
</div>

Here’s my JavaScript:

<script>
      function cancelMe() {
  var answer = confirm("Are You sure?")
  if (answer){
  alert("No information saved!")
    window.location = "http://www.stackovrflow.com";
    }
    else{
    alert("You may hit save to submit information")
    }
    }
</script>

And I started Jquery here, but I’m not sure yet:

$(document).delegate('#canc', 'click', function() {
  $(this).simpledialog({
   'mode' : 'string',
   'prompt' : 'Are you sure?',
   'buttons' : {
   'OK': {
     click: function () {

     // Here's the issue
      window.location.href = 'http://www.stackovrflow.com';
    }
  },
  'Cancel': {
    click: function () { },
    icon: "delete",
    theme: "b"
    }
   }
  })
})

I know this could be done in Ajax somehow, but don’t know how? I might have to know a little about Ajax. If you know any other way of doing this, please enlighten me.

Thanks,
YahyaOtaif

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:00:08+00:00Added an answer on May 27, 2026 at 3:00 pm

    you cannot change the title of the confirm dialog. the only way is simulate the confirmation box. this is a good article how to do it using jQuery

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I redirect the user from one page to another using jQuery or
I need to redirect a user to a different page if they visit a
atm I'm using the following four lines to redirect the user to another page
I have a function that directs a user to another page if the user
I have form inputs to send to another page to check on and validate
I redirect the user to the login page when user click log out however
I need to redirect the user to page not found page if the url
I have a method that where I want to redirect the user back to
I need to permanent redirect some pages, and redirect the user to the new
I have some mod_rewrite rewrites that correctly redirect the URLs to a script. From

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.