n2cardio — 2012-03-08T11:24:01-05:00 — #1
PHP page workout_now.php
<div id="playworkout"><button onClick="playWorkout()">Play Workout</button></div>
function playWorkout() will build an array of values that will be passed as a parameter, but for now I simply want to know the best way to
open "play_workout.php" and close "workout_now.php" when function playWorkout() is called?
Thanks so much!
n2cardio — 2012-03-08T11:47:40-05:00 — #2
So this seems to do the trick. Not sure which one is better to use:
window.location = 'http://localhost/RealCardio/play_workout.php';
document.location = 'http://localhost/RealCardio/play_workout.php';
paul_wilkins — 2012-03-08T15:44:27-05:00 — #3
[window.location is the more correct usage - [URL="https://developer.mozilla.org/en/document.location"]document.location](https://developer.mozilla.org/en/DOM/window.location) even though it is supported, is not part of any standard.