Ask Experts Questions for FREE Help !
Ask
    t_muffazal's Avatar
    t_muffazal Posts: 2, Reputation: 1
    New Member
     
    #1

    Dec 6, 2002, 06:27 AM
    Opening a new page in the same window
    Hi
    I have a simple problem. The script given below works fine but the problem is that it doesn't open the pages "success.htm" and "failure.htm" depending upon the conditions. The problem is in the script lines given:

    Document.location.href = "success.htm"
    Document.location.href = "failure.htm"

    What should I write so that "success.htm" and "failure.htm" pages should be opened according to the condition satisfied and in the same window. Thanks in advance.

    The Script :

    <script language = JavaScript>
    Function validate()
    {
    Var staticuid = "demouid"
    Var staticpwd = "demopwd"

    Var extractuid = document.form.username.value
    Var extractpwd = document.form.password.value

    If(staticuid == extractuid)
    {
    Document.location.href = "success.htm"
    }
    Else
    {
    Document.location.href = "failure.htm"
    }
    }
    </script>

    Muffazal
    zylstra's Avatar
    zylstra Posts: n/a, Reputation:
    Guest
     
    #2

    Dec 9, 2002, 05:34 AM
    Opening a new page in the same window
    I'm not much of a Javascript guru, but have you tried the following?

    {
    Window.location = "success.htm"
    }
    Else
    {
    Window.location = "failure.htm"
    }

    Also, be sure to check out http://developer.irt.org/script/redirect.htm .

    -zylstra
    t_muffazal's Avatar
    t_muffazal Posts: 2, Reputation: 1
    New Member
     
    #3

    Dec 10, 2002, 07:35 AM
    Opening a new page in the same window
    Hi
    Thanks for the reply. I have tried what you have written but still it doesn't work. If possible please give me a solution as soon as possible.

    Muffazal
    zylstra's Avatar
    zylstra Posts: n/a, Reputation:
    Guest
     
    #4

    Dec 13, 2002, 01:04 PM
    Opening a new page in the same window
    Sorry I can't help more.

    -zylstra

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

About vaginal opening [ 2 Answers ]

Hi, I have a question whether the menstrual fluid comes through the vaginal opening or any other?. Whether the urethral opening present above the vaginal opening? Thanks

Opening to a New Window [ 1 Answers ]

Hello! I don't know if there's a way to do this, but I am trying to write an E-mail with a "link" on it. That link obviously leads to another webpage, and what I would like to happen is to manipulate that webpage's appearance; taking out the address bar, menu bar, tool bar, scrollbar, and...

Opening for a refrigerator [ 2 Answers ]

How wide should be the niche for a 29.5 inch refrigerator to allow the door to open? I have barely 30 inch wide niche. Is 0.5 inch enough?

Opening .fox files [ 3 Answers ]

I have a whole bunch of .fox file that I want to view. Can anybody tell me what I need to do that? Thanks.


View more questions Search