Solved

Navigate command

Posted on 2004-08-04
8
151 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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
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…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now