Yes!!! Great! httprequest can solve my isue! But now I am struggling to find
out how to read the toggle with javascript! I don't understand something:
I have this PHP:
while ($i<=24)
{
echo '<div class="row">
<label>Well'.$i.'</label>';
if ($row1['well'.$i]=="0") echo '<div id="well'.$i.'"
class="toggle" onClick="onChangeToggle(well'.$i.')">';
else echo '<div id="well'.$i.'" class="toggle"
onClick="onChangeToggle(well'.$i.')" toggled="true">';
echo '<span class="thumb"></span>
<span class="toggleOn">ON</span>
<span class="toggleOff">OFF</span>
</div>
</div>';
$i++;
}
that is creating 24 rows with a toggle that have the id=well1, well2.... Than
I created a javascript:
function onChangeToggle(well) {
var act = document.getElementById(well);
act.value = (act.value == "On") ? "Off" : "On";
alert(act.value);
}
And this javascript gives me the error in the console well1 not defined if
well1 pressed?? why? any ideas?
________________________________
From: Remi Grumeau <[email protected]>
To: [email protected]
Sent: Tue, December 1, 2009 6:21:03 PM
Subject: Re: Getting toggle value true/false in php
As far as i remember dealing with a for using iUI, all is done with Javascript.
So you have to give a name (example : <form name"my_form">) and put a
javascript call on the submit button.
Parsing the form object with your Javascript will then do the job (using an
httprequest to your PHP file)
Remi
Le 1 déc. 2009 à 15:43, Mark Tomlin a écrit :
> From what I can tell the current state of things does not put the
> toggle switch in a POST or GET variable. I love being wrong tho...
>
> On Tue, Dec 1, 2009 at 8:18 AM, Bontas George
> <[email protected]> wrote:
>> Hello everybody!
>>
>> I'm using iUI for my web application. I am trying to get with the help of
>> method $_POST[""] the values of toggle after being changed. This is because
>> I need to update a database so I cannot put into a file all iui forms. Or
>> any helping ideas??
>>
>> Thank you!!
>>
>> Best regards,
>> George
>>
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "iPhoneWebDev" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/iphonewebdev?hl=en.
>>
>
>
>
> --
> Thank you for your time,
> Mark 'Dygear' Tomlin;
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/iphonewebdev?hl=en.
>
>
Remi Grumeau
(+33) 663 687 206
http://www.remi-grumeau.com
--
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en.