473,508 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

declare variable to pass to php

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
4 1988
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
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
677
by: David T. Ashley | last post by:
Hi, In my project, I typically declare and define variables in the .H file, i.e. DECMOD_MAIN UINT8 can_message_201_status_global #ifdef MODULE_MAIN = HAS_NEVER_BEEN_RECEIVED #endif ;
10
4362
by: Simon | last post by:
I'm a js newbie trying to use some very simple js to call an ActiveX object's methods. I need to use a pointer to call an embedded ActiveX object's method to receive a number. As I understand it,...
6
19048
by: rick | last post by:
Noob problem. I prefer to keep all my scripts in an external '.js' file. I am currently loading the external '.js' file from the header. Problem is I would like to declare a global variable in the...
5
33067
by: MMSJED | last post by:
I am beginner in using C#, actually I am trying to move from VB6 to C# I need very small help in programming problem my be you will laugh when you get it That simply I have to form let’s say...
41
10632
by: Miguel Dias Moura | last post by:
Hello, I am working on an ASP.NET / VB page and I created a variable "query": Sub Page_Load(sender As Object, e As System.EventArgs) Dim query as String = String.Empty ... query =...
8
10145
by: redefined.horizons | last post by:
I would like to have an array declaration where the size of the array is dependent on a variable. Something like this: /* Store the desired size of the array in a variable named "array_size". */...
1
2767
by: ares.lagae | last post by:
- I have a typelist and I want to declare a member variable for each of the types. How can I do that? E.g. I have the typelist "typedef boost::mpl::vector<int, float> types;" and I want to declare...
0
8291
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
4
2725
by: macneed | last post by:
how can i declare a variable inside a if case? if(today != recordday) { string NewRecordOfToday; } .. other work... .. .. if(today != recordday)
1
8272
by: Tony M | last post by:
vs 2005 - vb .net - web forms - xp pro Can't figure out why I keep getting the error Must declare the scalar variable "@CheckUser". The error happens on SqlDA.Fill(SqlDS). Just trying to make...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.