[PHP] Submit button as image

2004-05-12 Thread Sam

What do you do with this?
Submit.x=22Submit.y=13

if($_GET['Submit.x']  0) ???

Is there some smarter way of dealing with an image as a submit button?

input name=Submit type=image value=doesNOTseemTOmatter

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Submit button as image

2004-05-12 Thread Chris W. Parker
Sam mailto:[EMAIL PROTECTED]
on Wednesday, May 12, 2004 10:10 AM said:

 What do you do with this?

nothing. i usually don't give my image buttons a name value so that
never shows up. what it's meant for is server side image maps. the
browser is telling the server where on the image the user clicked. then
you as the programmer decide where the user be taken depending on where
they clicked.

 Is there some smarter way of dealing with an image as a submit button?
 
 input name=Submit type=image value=doesNOTseemTOmatter

maybe the following will suffice?

input type=image src=path/to/file.jpg /


hth,
chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit button as image

2004-05-12 Thread Curt Zirzow
* Thus wrote Sam ([EMAIL PROTECTED]):
 
 What do you do with this?
 Submit.x=22Submit.y=13
 
 if($_GET['Submit.x']  0) ???

$_GET['Submit_x']; 

php converts .x to _x to be compatible accross browser versions.

 
 Is there some smarter way of dealing with an image as a submit button?
 
 input name=Submit type=image value=doesNOTseemTOmatter

mozilla/firefox is the only browser that I know of that will pass
the value.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Submit Button Refresh Problem?

2004-01-05 Thread wknit
I have a php file that contains all the functions that I run on the page
that is displayed, self-contained.

The main function is ? makeArrays(); ?

I am invoking that function with a Submit button OnClick event.

Whenever I click the button, the page refreshes and the function runs just
fine displaying a dynamically generated random sequence of numbers.

The problem is the page refresh itself.

When the page first loads the function runs and it shouldn't, the display
should be blank until the button is clicked.

This is a problem because I have another button that will be coded to write
the data generated to a database, at present that function is empty, however
when I click that button the page refreshes again and the number data
changes.

How do I keep the page from refreshing on load and apparently self clicking
the form button, and how do I keep the page from refreshing and running the
'makearrays' function when I click the 'writedata' function?  When the
'writedata' function is invoked from a button click only that function
should be called and the data from the previous page should be returned to
the page again (same).. i.e. the random number sequence does not change.

Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Submit Button Refresh Problem?

2004-01-05 Thread Larry Brown
we need more code than ? makeArrays(); ?...

By the looks of that alone, it appears that you have that inserted into the
html somewhere around the submit button.  If that is the case, the function
will run every time you load the page.  You have to set a trigger to
determine whether it should run or not.  For instance, the form in which the
submit button is in can have a variable such as input type=hidden
name=executeRand value=1 so that when you hit submit, that value is sent to
the target of the form, (which I take it is this same page).  The code
around the function in php could be...

if($executeRand == 1){ makeArrays(); }

You'll need a second form around your other submit along with a variable for
it to send etc.

Hope that helps

Larry

-Original Message-
From: wknit [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 8:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Submit Button Refresh Problem?


I have a php file that contains all the functions that I run on the page
that is displayed, self-contained.

The main function is ? makeArrays(); ?

I am invoking that function with a Submit button OnClick event.

Whenever I click the button, the page refreshes and the function runs just
fine displaying a dynamically generated random sequence of numbers.

The problem is the page refresh itself.

When the page first loads the function runs and it shouldn't, the display
should be blank until the button is clicked.

This is a problem because I have another button that will be coded to write
the data generated to a database, at present that function is empty, however
when I click that button the page refreshes again and the number data
changes.

How do I keep the page from refreshing on load and apparently self clicking
the form button, and how do I keep the page from refreshing and running the
'makearrays' function when I click the 'writedata' function?  When the
'writedata' function is invoked from a button click only that function
should be called and the data from the previous page should be returned to
the page again (same).. i.e. the random number sequence does not change.

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit Button Refresh Problem?

2004-01-05 Thread Chris Shiflett
--- wknit [EMAIL PROTECTED] wrote:
 I have a php file that contains all the functions that I run on the
 page that is displayed, self-contained.
 
 The main function is ? makeArrays(); ?
 
 I am invoking that function with a Submit button OnClick event.

[snip]

 How do I keep the page from refreshing on load and apparently self
 clicking the form button, and how do I keep the page from ...

This appears to be a client-side scripting and/or markup question. PHP is
server-side and unrelated, so you should direct your question to another
list (suggestions, anyone?).

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
 Coming mid-2004
HTTP Developer's Handbook
 http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Fwd: Re: [PHP] Submit Button Refresh Problem?]

2004-01-05 Thread Asegu
oops, should have double checked the 'to'. Sorry.

 Original Message 
Subject: Re: [PHP] Submit Button Refresh Problem?
From:Andrew Séguin [EMAIL PROTECTED]
Date:Mon, January 5, 2004 12:26
To:___
--

...
 This appears to be a client-side scripting and/or markup question. PHP
is server-side and unrelated, so you should direct your question to
another list (suggestions, anyone?).
...

Evolt.org 'thelist' is my recommendation (and subscription) for general
web development.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit button

2003-09-30 Thread - Edwin -
Hi,

Nitin [EMAIL PROTECTED] wrote:

 Never mind, but could you state the reason?

Just guessing here...

...[snip]...

 
  --- Nitin [EMAIL PROTECTED] wrote:
   img src=image.gif alt=Submit onClick=document.entry.submit()
  
  This is a great example of what not to do.

...because it relies on Javascript (so it's unreliable because of some Javascript 
issues)...

  Use input type=image...

...and this one doesn't...

- E -
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit button

2003-09-29 Thread Nitin
Never mind, but could you state the reason?

Nitin


- Original Message - 
From: Chris Shiflett [EMAIL PROTECTED]
To: Nitin [EMAIL PROTECTED]; Karina S [EMAIL PROTECTED]
Cc: PHP-General [EMAIL PROTECTED]
Sent: Monday, September 29, 2003 3:34 AM
Subject: Re: [PHP] Submit button


 --- Nitin [EMAIL PROTECTED] wrote:
  img src=image.gif alt=Submit onClick=document.entry.submit()
 
 This is a great example of what not to do.
 
 Use input type=image...
 
 Chris
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Submit button

2003-09-28 Thread Karina S
Hello,

I want to use an image as submit button on my form. Now I use the following
code with button:

  if (!(isset($_Post['SubmitForm'])))
  {
...
.
 input type=submit name=SubmitForm value=Submit
}
else
{
.
}

Is it possible to change the Submit button with an image?

Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit button

2003-09-28 Thread Eugene Lee
On Sun, Sep 28, 2003 at 12:49:27PM +0200, Karina S wrote:
: 
: I want to use an image as submit button on my form. Now I use the following
: code with button:
: 
:   if (!(isset($_Post['SubmitForm'])))
:   {
: ...
: .
:  input type=submit name=SubmitForm value=Submit
: }
: else
: {
: .
: }
: 
: Is it possible to change the Submit button with an image?

Yep.  It's a feature of HTML.

input name=SubmitForm type=image src=image.gif alt=SubmitForm

Note that the x,y coordinates of where you clicked on the image gets
submitted as SubmitForm.x and SubmitForm.y, so watch out for the
existence of these variables.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit button

2003-09-28 Thread Karina S
I have changed the code, but it doesn't work.

 if (!(isset($_Post['SubmitForm_x'])))
  {
...
.
 input name=SubmitForm type=image src=image.gif alt=SubmitForm
}
else
{
.
}


Eugene Lee [EMAIL PROTECTED] az alábbiakat írta a következo üzenetben
news:[EMAIL PROTECTED]
 On Sun, Sep 28, 2003 at 12:49:27PM +0200, Karina S wrote:
 :
 : I want to use an image as submit button on my form. Now I use the
following
 : code with button:
 :
 :   if (!(isset($_Post['SubmitForm'])))
 :   {
 : ...
 : .
 :  input type=submit name=SubmitForm value=Submit
 : }
 : else
 : {
 : .
 : }
 :
 : Is it possible to change the Submit button with an image?

 Yep.  It's a feature of HTML.

 input name=SubmitForm type=image src=image.gif alt=SubmitForm

 Note that the x,y coordinates of where you clicked on the image gets
 submitted as SubmitForm.x and SubmitForm.y, so watch out for the
 existence of these variables.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit button

2003-09-28 Thread Nitin
You can always use:

img src=image.gif alt=Submit onClick=document.entry.submit()

Try it and enjoy
Nitin

Re: [PHP] Submit button

2003-09-28 Thread Eugene Lee
On Sun, Sep 28, 2003 at 01:20:32PM +0200, Karina S wrote:
: 
: I have changed the code, but it doesn't work.
: 
:  if (!(isset($_Post['SubmitForm_x'])))
:   {
: ...
: .
:  input name=SubmitForm type=image src=image.gif alt=SubmitForm
: }
: else
: {
: .
: }

1. The superglobal array is $_POST (all caps), not $_Post.

2. Make sure the URL path to your image file is correct, i.e. change
image.gif to the relative or absolute URL.

3. The alt attribute is technically unneeded.

4. When in doubt:

print_r($_POST);

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submit button

2003-09-28 Thread Chris Shiflett
--- Nitin [EMAIL PROTECTED] wrote:
 img src=image.gif alt=Submit onClick=document.entry.submit()

This is a great example of what not to do.

Use input type=image...

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] submit button with attachment

2003-03-07 Thread Diksha Neel
dear all,

hi!
i have a php page by name diki.php which i have pasted below.
i have removed the irrelevant code because of the size limit of
the email.
in this page is a submit button at the end. the form in
which this button is placed is by get sent to p.php which
has only the following contents:
?php
echo hi;
?
but when i click on submit button i am not getting
connected to p.php.
strange!
any help would be greatly appreciated.
thanks!
best wishes from India.
diksha.
html
head
meta http-equiv=Content-Type content=text/html;
charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleRegistration Form/title
script language=JavaScript
function allow()
{
if(document.f1.ocity.value!=Others)
   document.f1.city1.blur();
}
function allow1()
{
if(document.f1.orcity.value!=Others)
   document.f1.rcity1.blur();
}
function rallow()
{
if(document.f1.ostate.value!=Others)
   document.f1.state1.blur();
}
function rallow1()
{
if(document.f1.orstate.value!=Others)
   document.f1.rstate1.blur();
}
function adjust()
{
pbus1=document.f1.pbus.options[document.f1.pbus.selectedIndex].value;
if(pbus1==accounting)
  {
   document.f1.interest1.checked=true;
   }
if(pbus1==advertising)
  {
   document.f1.interest2.checked=true;
   }
if(pbus1==agriculture)
  {
   document.f1.interest3.checked=true;
   }
if(pbus1==arts)
  {
   document.f1.interest4.checked=true;
   }
}
function check(na)
{
var st=na;st1=st.length;
for(i=0;ist1;i++)
   {
 if((st.charCodeAt(i)48)||(st.charCodeAt(i)57))
  { return false;
  break; }
 }
   }
function checke(id)
{
r1=id; r2=r1.indexOf('@',0);r3=r1.indexOf('.',0);
r4=r2+1; r6=r1.length -1;
 rlen1=r1.length;
  rcont=0;
   rstart=0;
   while(rstartrlen1)
{
  rpos=r1.indexOf(@,rstart);
  if(rpos==-1)
break;
  rcont=rcont+1;
  rstart=rpos+1;
}
  if(rcont1)
{
return false;
}
r5=r1.indexOf(null,r6);
if((r1.indexOf('@',1)==-1)||(r2r3)||(r3==r4)||(r3==r6)||(r1.indexOf(@,0)==-1)
||(r1.indexOf(.,0)==-1))
  { return false;}
}
function validation()
{
if(document.f1.yname.value==)
   {
alert(Please enter your
name);document.f1.yname.focus();return false;
   }
 if(document.f1.cname.value==)
{
 alert(Please enter company
name);document.f1.cname.focus();return false;
 }
if(document.f1.cat.value==- -Select a Category- -)
   {
alert(Please select Category );document.f1.cat.focus();
return false;
}
if(document.f1.pbus.value==- -Select Primary Business- -)
   {
alert(Please select Primary Business
);document.f1.pbus.focus();return
false;
}
 if(document.f1.bemail.value==)
 {
   alert(Please enter business
email);document.f1.bemail.focus();return
false;
 }
 else
   {
cbemail=checke(document.f1.bemail.value);
 if(cbemail==false)
 {
 alert(Enter correct Business  Email
Address);document.f1.bemail.focus();return false;
   }
}
if(document.f1.pemail.value==)
  {
  alert(Please enter personal
email);document.f1.pemail.focus();return
false;
  }
else
 {
  cpemail=checke(document.f1.pemail.value);
  if(cpemail==false)
{
alert(Enter correct Personal Email
Address);document.f1.pemail.focus();return false;
 }
}
if(document.f1.pass.value==)
  {
   alert(Please enter
password);document.f1.pass.focus();return false;
  }
  else
 {
if(document.f1.pass.value.length4)
  {
 alert(Password should contain 4
characters);document.f1.pass.focus();return false;
}
   }
if(document.f1.badd1.value==)
{
 alert(Please enter business
address);document.f1.badd1.focus(); return
false;
 }
if(document.f1.area.value==)
   {
alert(Please enter Area); document.f1.area.focus();return
false;
}
if(document.f1.ocity.value==- -Select a City- -)
   {
alert(Please select a City ); document.f1.ocity.focus();
return false;
}
if(document.f1.ostate.value==- -Select a State- -)
   {
alert(Please select a State ); 
document.f1.ostate.focus();
return false;
}

if(document.f1.ocity.value!=Others)
 document.f1.city.value=document.f1.ocity.value;
else
  document.f1.city.value=document.f1.city1.value;
if(document.f1.orcity.value!=Others)
  document.f1.rcity.value=document.f1.orcity.value;
else
  document.f1.rcity.value=document.f1.rcity1.value;
if(document.f1.ostate.value!=Others)
 document.f1.state.value=document.f1.ostate.value;
else
  document.f1.state.value=document.f1.state1.value;
if(document.f1.orstate.value!=Others)
  document.f1.rstate.value=document.f1.orstate.value;
else
  document.f1.rstate.value=document.f1.rstate1.value;
if(document.f1.pin.value==)
   {
alert(Please enter the pin no.);
 document.f1.pin.focus();
  return false;
   }
if(document.f1.pin.value!=)
   {
if(document.f1.pin.value==0)
{
 alert(Please enter correct Pin code);
  

[PHP] submit button

2003-03-06 Thread Diksha Neel
hi everybody,

i have a PHP script by name registration.php
in which i have a submit button at the bottom.
the form in this script is sent to p.php by GET.
but on clicking the submit button, nothing happens
attaching registration.php.
p.php has only the following:
?php
echo hi how are u;
?
please help,
diksha.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] submit button

2003-03-06 Thread Rich Gray
 hi everybody,
 
 i have a PHP script by name registration.php
 in which i have a submit button at the bottom.
 the form in this script is sent to p.php by GET.
 but on clicking the submit button, nothing happens
 attaching registration.php.
 
 p.php has only the following:
 ?php
 echo hi how are u;
 ?
 
 please help,
 diksha.

Can you post the form code?
Rich

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] submit button

2003-03-06 Thread Diksha Neel
dear all,

hi!
i have a php page by name diki.php which i have attached.
in this page is a submit button at the end. the form in
which this button is placed is by get sent to p.php which
has only the following contents:
?php
echo hi;
?
but when i click on submit button i am not getting
connected to p.php.
strange!
any help would be greatly appreciated.
thanks!
best wishes from India.
diksha.
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] submit button

2003-03-06 Thread Diksha Neel
dear all,

hi!
i have a php page by name diki.php which i have attached.
in this page is a submit button at the end. the form in
which this button is placed is by get sent to p.php which
has only the following contents:
?php
echo hi;
?
but when i click on submit button i am not getting
connected to p.php.
strange!
any help would be greatly appreciated.
thanks!
best wishes from India.
diksha.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] submit button

2003-03-06 Thread Diksha Neel
dear all,

hi!
i have a php page by name diki.php which i have attached.
in this page is a submit button at the end. the form in
which this button is placed is by get sent to p.php which
has only the following contents:
?php
echo hi;
?
but when i click on submit button i am not getting
connected to p.php.
strange!
any help would be greatly appreciated.
thanks!
best wishes from India.
diksha.
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] submit button

2001-03-17 Thread george

IS there a way of making sure that a submit button cant be pressed twice.I
am using a form to send an email and dont want two emails showing up.

TIA

george




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] submit button

2001-03-17 Thread Richard

You will have to use JavaScript.

Use the following:
 document.poster.action.disabled=true;   // Disable Submit  Preview
button

Or, if you aren't having it within a form, put the javascript in the end of
the page and write:

document.btnSend.disabled=true;

Note that the first code disables ALL "action" buttons...

- Richard


""george"" [EMAIL PROTECTED] wrote in message
99029b$78h$[EMAIL PROTECTED]">news:99029b$78h$[EMAIL PROTECTED]...
 IS there a way of making sure that a submit button cant be pressed twice.I
 am using a form to send an email and dont want two emails showing up.

 TIA

 george




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]