By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,744 Members | 1,835 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,744 IT Pros & Developers. It's quick & easy.

declare variable to pass to php

P: n/a
I have a check box on page 1 of an html page with no submit button.
There is a list of links that call a php display page from page 1.

I want to check the status of the check box from the display page but I
haven't found a way to pass the value without a submit function.

I have hunted in the help and the on line turorials etc but have found
nothing that helps.

Any suggestions on how to do this or links that will help me do it
appreciated.

Bert

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
jn
"Bert" <be*********@meckcom.net> wrote in message
news:SO****************@fe07.usenetserver.com...
I have a check box on page 1 of an html page with no submit button.
There is a list of links that call a php display page from page 1.

I want to check the status of the check box from the display page but I
haven't found a way to pass the value without a submit function.

I have hunted in the help and the on line turorials etc but have found
nothing that helps.

Any suggestions on how to do this or links that will help me do it
appreciated.

Bert


One way:

Use Javascript to check the value of the checkbox. Have your links point to
a Javascript function that appends the value of the checkbox to the
querystring of your link. Then forward the user to that URL.
Jul 17 '05 #2

P: n/a
I noticed that Message-ID:
<Gw*********************@twister.tampabay.rr.com > from jn contained the
following:
One way:

Use Javascript to check the value of the checkbox. Have your links point to
a Javascript function that appends the value of the checkbox to the
querystring of your link. Then forward the user to that URL.


Another way:
Turn the links into image submit buttons
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #3

P: n/a

Uzytkownik "jn" <us********************************@jasonnorris.ne t> napisal
w wiadomosci news:Gw*********************@twister.tampabay.rr.c om...
"Bert" <be*********@meckcom.net> wrote in message
news:SO****************@fe07.usenetserver.com...
Use Javascript to check the value of the checkbox. Have your links point to a Javascript function that appends the value of the checkbox to the
querystring of your link. Then forward the user to that URL.


Another way, stick the value into the cookie:

<html>
<head>
<script>

function set_cookie_value(checked) {
document.cookie = 'umlaut=' + ((checked) ? 'uberkool!' : '');
}

</script>
</head>
<body>
<input type="checkbox" id="umlaut" onclick="set_cookie_value(this.checked)">
<label for="umlaut">Check me</label>
</body>
</html>
Jul 17 '05 #4

P: n/a
jn
"Chung Leong" <ch***********@hotmail.com> wrote in message
news:yc********************@comcast.com...

Uzytkownik "jn" <us********************************@jasonnorris.ne t> napisal w wiadomosci news:Gw*********************@twister.tampabay.rr.c om...
"Bert" <be*********@meckcom.net> wrote in message
news:SO****************@fe07.usenetserver.com...
Use Javascript to check the value of the checkbox. Have your links point to
a Javascript function that appends the value of the checkbox to the
querystring of your link. Then forward the user to that URL.


Another way, stick the value into the cookie:

<html>
<head>
<script>

function set_cookie_value(checked) {
document.cookie = 'umlaut=' + ((checked) ? 'uberkool!' : '');
}

</script>
</head>
<body>
<input type="checkbox" id="umlaut"

onclick="set_cookie_value(this.checked)"> <label for="umlaut">Check me</label>
</body>
</html>


That's a good idea.
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.