forced to use javascript but i dont want to? what can php do
Moderator: General Moderators
forced to use javascript but i dont want to? what can php do
i am passing variables from one page to the next. I need to use Javascript (because i want to set the height, width, etc.....) however, by using javascript, the variables from the first page dont pass onto the second. is there a way around this?
thanx
thanx
- voodoo9055
- Forum Commoner
- Posts: 51
- Joined: Sat Apr 26, 2003 3:27 pm
- Location: Montgomery, AL
- voodoo9055
- Forum Commoner
- Posts: 51
- Joined: Sat Apr 26, 2003 3:27 pm
- Location: Montgomery, AL
- voodoo9055
- Forum Commoner
- Posts: 51
- Joined: Sat Apr 26, 2003 3:27 pm
- Location: Montgomery, AL
This is a guess. I am not around any IDE to test this at the moment.
Code: Select all
<script language="JavaScript">
function MyFunction(value) {
// do something
something = newwindow(blah blah blah)
}
</script>
............
<a href="javascript:MyFunction(' . $_SERVERї'HTTP_REFERER'] . ')">My Hyperlink</a>
...........You can also pass them onto the new window with the link, and fetch the info $_GET[''].
so:
javascript on click stuff="somenewwindow.php?ref=' . $_SERVER['HTTP_REFERRER'] ...
I am not sure, but you could probably use $_POST and some hidden fields.
Then again, it all depends what you are trying to do.
My preferred, is to use sessions. I have a database of sessions, and everything is passed through the session, so that the link remains free of random stuff.
so:
javascript on click stuff="somenewwindow.php?ref=' . $_SERVER['HTTP_REFERRER'] ...
I am not sure, but you could probably use $_POST and some hidden fields.
Then again, it all depends what you are trying to do.
My preferred, is to use sessions. I have a database of sessions, and everything is passed through the session, so that the link remains free of random stuff.
- voodoo9055
- Forum Commoner
- Posts: 51
- Joined: Sat Apr 26, 2003 3:27 pm
- Location: Montgomery, AL
- Pointybeard
- Forum Commoner
- Posts: 71
- Joined: Wed Sep 03, 2003 7:23 pm
- Location: Brisbane, AUS
- Contact: