Ask a Question related to PHP Development, Design and Development.
-
Kevin Bilbee #1
Submit Button
I have a web form with a few text fields some validataion and a submit
button.
When I click the submit bittin the serverside event does not fire?????
Why!!!! I have tried Changing the EnableViewState I have tried removing
CausesValidataion.
I am using VisualStudio 2003/.net 1.1
<asp:Button id="submit" runat="server" Text="Update" EnableViewState="True"
CausesValidation="true"></asp:Button>
private void InitializeComponent()
{
this.submit.Click += new System.EventHandler(this.submit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void submit_Click(object sender, System.EventArgs e)
{
Response.Write("This is the button clicked");
// Update the users file here
userRec.Replace(txtName.Text,14,0,0);
userRec.Replace(txtEmail.Text,13,0,0);
userRec.Replace(txtFax.Text,21,0,0);
userRec.Replace(txtVoice.Text,19,0,0);
tblEUsers.Write(userId,userRec);
if (txtPass.Text != "") // save the password
{
}
}
Kevin Bilbee
Kevin Bilbee Guest
-
Submit button style
Hi, I am trying to change the style of a submit button ('<input type="submit" value="Update">') using stylesheets but everytime I use something... -
[PHP] using submit button and PHP-HELP
thanx for your help, Ive got flu and all these small things seem to be escaping my eyes. I just want to ask you a small question: If i want this... -
using submit button and PHP-HELP
Hi, I have a form that has a submit button in it, when the button is pressed I want it to reload the same page, with the same URL, however when I... -
value submit button
You can get the button value use code below: <?php echo $_POST;?> <form method="post"> <input type="submit" name="submit" value="submit1">... -
Help with Submit button...
Hi, I have a graphic, I wanted to use it for a submit button. For some reason it does not work.. it acts more of a link. The problem with... -
bruce barker #2
Re: Submit Button
the property Page.IsValid is what fires the validation event. you must
check in you page somewhere.
"Kevin Bilbee" <kbilbee@standardabrasives.com> wrote in message
news:O$p#onySDHA.2148@TK2MSFTNGP12.phx.gbl...EnableViewState="True"> I have a web form with a few text fields some validataion and a submit
> button.
>
> When I click the submit bittin the serverside event does not fire?????
> Why!!!! I have tried Changing the EnableViewState I have tried removing
> CausesValidataion.
> I am using VisualStudio 2003/.net 1.1
>
> <asp:Button id="submit" runat="server" Text="Update"> CausesValidation="true"></asp:Button>
>
>
> private void InitializeComponent()
> {
> this.submit.Click += new System.EventHandler(this.submit_Click);
> this.Load += new System.EventHandler(this.Page_Load);
> }
> #endregion
> private void submit_Click(object sender, System.EventArgs e)
> {
> Response.Write("This is the button clicked");
> // Update the users file here
> userRec.Replace(txtName.Text,14,0,0);
> userRec.Replace(txtEmail.Text,13,0,0);
> userRec.Replace(txtFax.Text,21,0,0);
> userRec.Replace(txtVoice.Text,19,0,0);
> tblEUsers.Write(userId,userRec);
> if (txtPass.Text != "") // save the password
> {
> }
> }
>
> Kevin Bilbee
>
>
bruce barker Guest
-
AlanW99 webforumsuser@macromedia.com #3
Submit Button
Using Dreamweaver MX.
I may be being rather stupid, but where and how do I apply an E-Mail Address to a Submit Button.
I have a number of Submit Buttons on Forms - all of which I want sent to an E-Mail Address.
I am lost as to where to indicate the destination e-mail Address
AlanW99 webforumsuser@macromedia.com Guest
-
MLangner-MMTS #4
Re: Submit Button
Try adding a "mailto" action. I would recommend using a server-side
script, however. This may help more:
How to get data from a form into an e-mail
[url]http://www.macromedia.com/support/dreamweaver/ts/documents/form_email.htm[/url]
-- Mike
"AlanW99" [email]webforumsuser@macromedia.com[/email] wrote:
> Using Dreamweaver MX.
>
> I may be being rather stupid, but where and how do I apply an E-Mail
> Address to a Submit Button.
>
> I have a number of Submit Buttons on Forms - all of which I want sent
> to an E-Mail Address.
>
> I am lost as to where to indicate the destination e-mail Address
>
>
>MLangner-MMTS Guest
-
Jimbo #5
Submit button
I am trying to right a script so that the "submit button" only appears when
certain criteria has been met. I have tried putting it in an IF statement,
without any luck. Maybe a function would allow me to do this?
<input type="Submit" value="Update">
Any help would be greatly appreciated
TIA
Jim
Jimbo Guest
-
Jimbo #6
Submit Button
I am trying to right a script so that the "submit button" only appears when
certain criteria has been met. I have tried putting it in an IF statement,
without any luck. Maybe a function would allow me to do this?
<input type="Submit" value="Update">
Any help would be greatly appreciated
TIA
Jim
Jimbo Guest
-
PenguinsAnonymous #7
Re: Submit Button
Jimbo <Jim@garner21.freeserve.co.uk> wrote:
<?php> I am trying to right a script so that the "submit button" only appears when
> certain criteria has been met. I have tried putting it in an IF statement,
> without any luck. Maybe a function would allow me to do this?
// this way no button
if(criteria) echo "<input type=\"Submit\" value=\"Update\">";
?>
<?php
// this way grey button
if(criteria) $xtra="disabled";
echo "<input type=\"Submit\" {$xtra} value=\"Update\">";
?>
> Any help would be greatly appreciated> TIAThere is a disable parameter for I think 'input'> Jim
that would grey the button rather than it not
be there. A clear indication in UI terms of
incompletion.
Does that sound like what you want?
Otherwise don't output that part of the form and
it won't appear at all.
(ie the input line you show above as I have mod it)
That's not nice though :)
Hope this helps you.
-Walt
--
Reply to innkeepATcapitalDOTnet to email questions.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
[url]http://www.newsfeeds.com[/url] - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
PenguinsAnonymous Guest
-
Pedro Graca #8
Re: Submit Button
Jimbo wrote:
Why didn't the IF work?> I am trying to right a script so that the "submit button" only appears when
> certain criteria has been met. I have tried putting it in an IF statement,
> without any luck. Maybe a function would allow me to do this?
>
><input type="Submit" value="Update">
>
> Any help would be greatly appreciated
What was the error (if it was an error)?
<?php
// ...
if ($ok_to_output_the_submit_button) {
echo '<input type="submit" value="Update"/>';
}
// ...
?>
--
..sig
Pedro Graca Guest
-
PenguinsAnonymous #9
Re: Submit Button
Pedro Graca <hexkid@hotpop.com> wrote:
> Jimbo wrote:>> I am trying to right a script so that the "submit button" only appears when
>> certain criteria has been met. I have tried putting it in an IF statement,
>> without any luck. Maybe a function would allow me to do this?
>>
>><input type="Submit" value="Update">
>>
>> Any help would be greatly appreciated> Why didn't the IF work?
> What was the error (if it was an error)?> <?php
> // ...
> if ($ok_to_output_the_submit_button) {
> echo '<input type="submit" value="Update"/>';
> }
> // ...
> ?>I get the idea he might not understand the concept> --
> .sig
of server side and what echo is doing yet. ie that
you are dynamically emitting the html that client
side will see inside the <?php ... ?>
hopefully these are lightbulbs :)
-Walt
--
Reply to innkeepATcapitalDOTnet to email questions.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
[url]http://www.newsfeeds.com[/url] - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
PenguinsAnonymous Guest
-
Andy Hassall #10
Re: Submit Button
On Wed, 12 Nov 2003 21:53:40 -0000, "Jimbo" <Jim@garner21.freeserve.co.uk>
wrote:
Not enough information really; it sounds to me like you're not after a PHP>I am trying to right a script so that the "submit button" only appears when
>certain criteria has been met. I have tried putting it in an IF statement,
>without any luck. Maybe a function would allow me to do this?
>
><input type="Submit" value="Update">
>
>Any help would be greatly appreciated
solution though.
Since the only way to make PHP aware of new information is to at least do a
page request, and probably as a result of submitting a form, then you can't
change any conditions if you don't have a submit button in the first place.
Are you looking for something that can reveal a submit button when certain
fields have all been filled in on the client browser? If so, you need to ask in
a JavaScript group.
--
Andy Hassall (andy@andyh.co.uk) icq(5747695) ([url]http://www.andyh.co.uk[/url])
Space: disk usage analysis tool ([url]http://www.andyhsoftware.co.uk/space[/url])
Andy Hassall Guest
-
Jedi121 #11
Re: Submit Button
(supersedes <mesnews.65977d3b.a2a60f12.127.2689@free.fr.Remove this>)
"Jimbo" a écrit le 12/11/2003 :You'll do that with Javascript not with PHP which is server-side> I am trying to right a script so that the "submit button" only appears when
> certain criteria has been met. I have tried putting it in an IF statement,
> without any luck. Maybe a function would allow me to do this?
>
> <input type="Submit" value="Update">
>
> Any help would be greatly appreciated
>
> TIA
>
> Jim
executed.
PS : Please don't multi-post FU2 comp.lang.php
Jedi121 Guest
-
PenguinsAnonymous #12
Re: Submit Button
> You'll do that with Javascript not with PHP which is server-side
> executed.This 'can' be handled server side if he wants to.> PS : Please don't multi-post FU2 comp.lang.php
Are you saying he can't emit the html for the form
server side? (which is presented client side)
-Walt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
[url]http://www.newsfeeds.com[/url] - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
PenguinsAnonymous Guest
-
Filth #13
Re: Submit button
when> I am trying to right a script so that the "submit button" only appearsmaybe give a bit more info on what you need, remember tho that php is a> certain criteria has been met. I have tried putting it in an IF statement,
> without any luck. Maybe a function would allow me to do this?
>
> <input type="Submit" value="Update">
>
> Any help would be greatly appreciated
server side language so if for example you wish the submit button only to
display or be active when a certain field is filled in on a form then that
is a job for javascript, php would only know if it is filled in when the
person has submitted it.
Filth Guest
-
Alvaro G Vicario #14
Re: Submit button
*** Jimbo wrote/escribió (Wed, 12 Nov 2003 21:49:59 -0000):
PHP is executed *before* sending page to client, I can't figure out a way> I am trying to right a script so that the "submit button" only appears when
> certain criteria has been met. I have tried putting it in an IF statement,
> without any luck. Maybe a function would allow me to do this?
to use it for your purpose. However, you could try some good old
client-side JavaScript. Give your submit button the DISABLED attribute and
enable it once the requirements are met.
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Alvaro G Vicario Guest
-
Michel #15
Re: Submit Button
Of course you can:
<?php
if($criteria){
echo "<input type='submit' blahblahblah>";
}
?>
"Jedi121" <jedi121news@free.fr.Removethis> wrote in message
news:mesnews.68357d3b.1ee8d502.128.2689@free.fr.Re movethis...when> (supersedes <mesnews.65977d3b.a2a60f12.127.2689@free.fr.Remove this>)
>
> "Jimbo" a écrit le 12/11/2003 :> > I am trying to right a script so that the "submit button" only appearsstatement,> > certain criteria has been met. I have tried putting it in an IF>> > without any luck. Maybe a function would allow me to do this?
> >
> > <input type="Submit" value="Update">
> >
> > Any help would be greatly appreciated
> >
> > TIA
> >
> > Jim
> You'll do that with Javascript not with PHP which is server-side
> executed.
>
> PS : Please don't multi-post FU2 comp.lang.php
>
>
Michel Guest
-
Savut #16
Re: Submit Button
No you can't he said he wanted the submit button to appear when the form
meat a criteria, this is only done with JS, not php
Savut
"Michel" <please_no@spam.nl> a écrit dans le message de
news:bovgv0$9io$1@news.cistron.nl...> Of course you can:
>
> <?php
> if($criteria){
> echo "<input type='submit' blahblahblah>";
> }
> ?>
>
>
> "Jedi121" <jedi121news@free.fr.Removethis> wrote in message
> news:mesnews.68357d3b.1ee8d502.128.2689@free.fr.Re movethis...> when> > (supersedes <mesnews.65977d3b.a2a60f12.127.2689@free.fr.Remove this>)
> >
> > "Jimbo" a écrit le 12/11/2003 :> > > I am trying to right a script so that the "submit button" only appears> statement,> > > certain criteria has been met. I have tried putting it in an IF>> >> > > without any luck. Maybe a function would allow me to do this?
> > >
> > > <input type="Submit" value="Update">
> > >
> > > Any help would be greatly appreciated
> > >
> > > TIA
> > >
> > > Jim
> > You'll do that with Javascript not with PHP which is server-side
> > executed.
> >
> > PS : Please don't multi-post FU2 comp.lang.php
> >
> >
>
Savut Guest
-
PenguinsAnonymous #17
Re: Submit Button
Warren Oates <Warren@inhell.com> wrote:
> In article <3fb2d071$1_7@corp.newsgroups.com>, PenguinsAnonymous wrote:> :This 'can' be handled server side if he wants to.
> :Are you saying he can't emit the html for the form
> :server side? (which is presented client side)
> :-Walt> I'm assuming that he wants to make sure all the fields are filled in
> before allowing a submit to happen. With JS this can be very easily done
> (out on Highway 61),> if(blahBlah) {document.write "<blah>";}DOH of course ..... you must be right.> or something, my JS syntax is rusty.
>
> As Andy H. pointed out, to do it on the server, he'll have to submit the
> form to be validated first. And probably have a session running too, if
> he's using the same page. I've got some examples of this, but my coding
> is a bit sloppy.
> --
> Looks like more of Texas to me.
> ... Arizona, where the nights are warm and the roads are straight.
funny thing, he probably gave up reading the thread :)
-Walt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
[url]http://www.newsfeeds.com[/url] - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
PenguinsAnonymous Guest
-
Eric Kincl #18
Re: Submit Button
Jimbo wrote:
You definatly want JavaScript here. Even though this is a PHP group, I'll> I am trying to right a script so that the "submit button" only appears
> when certain criteria has been met. I have tried putting it in an IF
> statement, without any luck. Maybe a function would allow me to do this?
>
> <input type="Submit" value="Update">
>
> Any help would be greatly appreciated
>
> TIA
>
> Jim
give you the JS for free
<form name="inputform">
<input type="text" name="field1" value="" onblur="javascript:validate();" />
<input type="text" name="field2" value="" onblur="javascript:validate();" />
<input type="submit" name="submit" value="Submit" disabled
onclick="javascript:disable();" />
</form>
<script language="JavaScript">
function validate(){
if(document.inputform.field1.value != ""){
if(document.inputform.field2.value != ""){
document.inputform.submit.disabled = false;
}
}
}
function disable(){
document.inputform.submit.disabled = true;
document.inputform.submit.value = "Please wait... Form is being
submitted.";
}
</script>
Obviously you will have to edit your form/javascript validation for your
page, but this is the basic idea of what you need to do. With this, it
will be impossible for the user to push the submit button until everything
is validated. It will also disable the submit button after the user clicks
it to prevent double submitting by impatient users.
Eric Kincl Guest
-
Paolo #19
Re: Submit button
You can try with the following, I hope it can help you.
Regards,
Paolo
<?
$my_condition = getValueFromSomewhere();
?>
<html>
<body>
<? if ( $my_condition == true ) { ?>
<input type="Submit" value="Update">
<? } ?>
</body>
</html>
Il Wed, 12 Nov 2003 21:49:59 -0000, "Jimbo"
<Jim@garner21.freeserve.co.uk> ha scritto:
>I am trying to right a script so that the "submit button" only appears when
>certain criteria has been met. I have tried putting it in an IF statement,
>without any luck. Maybe a function would allow me to do this?
>
><input type="Submit" value="Update">
>
>Any help would be greatly appreciated
>
>TIA
>
>Jim
>
>Paolo Guest
-
alauts #20
Re: Submit button
If you refresh the page after a user performs an action, you can check to
see if fields are updated and your button will show. Because PHP is executed
before sending the page to the client, the conditions of change have to be
detected on a page refresh.
Albert
"Jimbo" <Jim@garner21.freeserve.co.uk> wrote in message
news:bou9rj$d0$1@newsg3.svr.pol.co.uk...when> I am trying to right a script so that the "submit button" only appears> certain criteria has been met. I have tried putting it in an IF statement,
> without any luck. Maybe a function would allow me to do this?
>
> <input type="Submit" value="Update">
>
> Any help would be greatly appreciated
>
> TIA
>
> Jim
>
>
>
alauts Guest



Reply With Quote

