Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Navigate command

Posted on 2004-08-04
8
Medium Priority
?
170 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 33

Accepted Solution

by:
sajuks earned 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

824 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