Solved

Navigate command

Posted on 2004-08-04
8
152 Views
Last Modified: 2010-04-07
Hi folks,

   I am used to using response.redirect to motor to a new page and writing on the server-side.With client-sdie coding,I can not do this.And I understand why.
  My problem is I have a page which is written on the client-side and need to use another method to redirect since response object is not recoginized on the client side.
I have tried this (which doesn't work :((   )

      window.navigate("FutureRpt.asp")

If I use window.open("FutureRpt.asp"), it works, but opens it as pop-up window instead of a new window. I am using client-side vbscript.
What on earth am I doing wrong?? :-(
Any help would be appreciated....
0
Comment
Question by:bearpaws
  • 4
  • 3
8 Comments
 
LVL 33

Expert Comment

by:sajuks
ID: 11722990
try,

location.href = "FutureRpt.asp"
or
window.location.href = "FutureRpt.asp"
0
 

Author Comment

by:bearpaws
ID: 11725867
nope, neither works.....:-(
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 11727020
window.location = "FutureRpt.asp";
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 33

Accepted Solution

by:
sajuks earned 125 total points
ID: 11732604
Can you post your code ?
this works
<A href="whatever" onclick="location.href='http://www.rediff.com';return false;" >Rediff</a>
0
 

Author Comment

by:bearpaws
ID: 11738589
do I have to use an absolute location, ie http://blah blah.com  ??


0
 

Author Comment

by:bearpaws
ID: 11761546
sajuks,

   Sorry so long to reply.. based on the info you gave to me, this worked:

<input type="image" name="btnreturn" onclick="location.href='FutureRpt.asp';return false;" src=images/return.jpg"


 could you be as so kind and explain why I need a return false?
I think I know the answer but....
0
 
LVL 33

Expert Comment

by:sajuks
ID: 11769452
Return keywords used within event handlers return a true or false value (boolean value) to the browser, they are generally used to interupt a natural browser behavior. In this example, the return false statement is interupting the browser's natural behavior of opening the URL contained in the href attribute's quotes. There is no convention as to when to use true or false - the various behaviors respond to true and false differently.
Chec kthis link:
http://www.evolt.org/article/JavaScript_The_Point_of_No_Return/17/8869/?format=print&rating=true&comments=false

Thanks for the points and grade
0
 

Author Comment

by:bearpaws
ID: 11770993
thnak you so much for explaining. I was pretty sure that was the reason, but didn't really find any material to support my conclsion. Good link!
thanks again. :-)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
New Website 15 30
Web Designer 5 176
About Wordpress website 3 107
Online video resource for customers 3 123
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question