Solved

location

Posted on 2002-04-13
4
234 Views
Last Modified: 2006-11-17
i need the syntax for the location statement! i am not sure if this is a php or js :S
0
Comment
Question by:almaha
4 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 10 total points
ID: 6939080
Do you mean Javascripts "location" object?
----------------------------------------------
Set a new location of current page:

location.href='newPage.html';



0
 
LVL 4

Expert Comment

by:heddesheimer
ID: 6939772
maybe you need:
<?php
header("Location: http://www.mydomain.com/mypage.php");
?>

Marian
0
 

Expert Comment

by:campione
ID: 6944013
<?php
 
 header("Location: http://whatever");

?>


But just make sure of the syntax. Only double quotes, and another thing "DO NOT" send any output request before the header call. That's an error.

For eg.

<?php

 print "I just messed up the program.";
 header("Location: http://whatever");

?>

This one's gonna create an error. Just remove the print and its fine.

Hope this'll solve your problem if its for PHP.
0
 

Author Comment

by:almaha
ID: 6946612
noo :( you didn't get what i really need.
i don't want a header!
okay, i have a cancel button that i want it to link to another php file. but i don't wana do it as a usual html form!
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

825 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