Solved

location

Posted on 2002-04-13
4
232 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
Comment Utility
Do you mean Javascripts "location" object?
----------------------------------------------
Set a new location of current page:

location.href='newPage.html';



0
 
LVL 4

Expert Comment

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

Marian
0
 

Expert Comment

by:campione
Comment Utility
<?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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

762 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

11 Experts available now in Live!

Get 1:1 Help Now