Re: [PHP-DB] Forms question..

2002-10-20 Thread .: B i g D o g :.
1. document.formname.elementname.focus();

Example: if my form has a name of testform and the first element is
fname...

then in the body tag i would do this...



2. Yeah, you need to use the select() method...

so document.testform.element.select();

Example: 

That should work...or it might have to be in a function...

3. It should do that for you with the submit button...what browser are
you using?

4. use the align attributealign="left"


On Sun, 2002-10-20 at 12:27, James Hatridge wrote:
> Hi all...
> 
> When I have an input form I must click on the first input field. Is there 
> anyway to have it active when the form loads? 
> 
> #2 When I tab down to the next input field, is there anyway to have it 
> highlight what is in the field (ie the default data) so that it will 
> overwrite it?
> 
> #3 How can I get the form to submit when I hit the return button? Right now I 
> have to click on the button with my mouse. 
> 
> #4 How can I get a column of numbers to left justify?
> 
> Thanks
> 
> JIM
> 
> -- 
> Jim Hatridge
> Linux User #88484
> --
>  BayerWulf
>  Linux System # 129656
>  The Recycled Beowulf Project
>   Looking for throw-away or obsolete computers and parts
>to recycle into a Linux super computer
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
-- 
.: B i g D o g :.



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




RE: [PHP-DB] Forms question..

2002-10-20 Thread John W. Holmes
> When I have an input form I must click on the first input field. Is
there
> anyway to have it active when the form loads?

Javascript, not PHP. Something like document.form.element.setfocus(), I
think. 

> #2 When I tab down to the next input field, is there anyway to have it
> highlight what is in the field (ie the default data) so that it will
> overwrite it?

Client side...not PHP.

> #3 How can I get the form to submit when I hit the return button?
Right
> now I
> have to click on the button with my mouse.

Client side, depends on the browser, not PHP

> #4 How can I get a column of numbers to left justify?

HTML, not PHP. Align="left"

---John Holmes...



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




[PHP-DB] Forms question..

2002-10-20 Thread James Hatridge
Hi all...

When I have an input form I must click on the first input field. Is there 
anyway to have it active when the form loads? 

#2 When I tab down to the next input field, is there anyway to have it 
highlight what is in the field (ie the default data) so that it will 
overwrite it?

#3 How can I get the form to submit when I hit the return button? Right now I 
have to click on the button with my mouse. 

#4 How can I get a column of numbers to left justify?

Thanks

JIM

-- 
Jim Hatridge
Linux User #88484
--
 BayerWulf
   Linux System # 129656
 The Recycled Beowulf Project
  Looking for throw-away or obsolete computers and parts
   to recycle into a Linux super computer


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




Re: [PHP-DB] Forms Question

2001-09-06 Thread Paul Gardiner

Hi there,

Take a look at the following snippet below. It is similar to what you're
looking for without having to bugger about duplicating loads of lines for
each store. Just add a new one to the array if required.

Best Regards,
- Paul -


";
echo "$MonthName";
  }

?>



- Original Message -
From: "Steve Cayford" <[EMAIL PROTECTED]>
To: "Jeff Grossman" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 11:36 PM
Subject: Re: [PHP-DB] Forms Question


>
> On Wednesday, September 5, 2001, at 04:50  PM, Jeff Grossman wrote:
>
> > Hello,
> > Here is the code I have:
> >
> > while ($row=mysql_fetch_array($result)) {
> >$store=$row["store"];
> >$jobdesc=$row["jobdesc"];
> > echo "";
> > echo "Store:
> >   
> >  Signal Hill
> >  Reseda
> >  Orange
> >  West Covina
> >  Riverside
> >  Norwalk
> >  Fountain Valley
> >  Pasadena
> >  Redondo Beach
> >  San Bernardino
> >  Kearny Mesa
> >  San Marcos
> >  Chino
> >  Corporate Office
> >   ";
> > echo " > VALUE=\"$jobdesc\">";
> > echo " > Changes\">";
> > }
> >
> >
> > Is want I am trying to do possible?  I want the value which is stored in
> > $store to automatically fill in on the drop down list.  But, for some
> > reason it is defaulting to the first option, and not using the value
> > that is in the database.
> >
> > Can I use a drop down menu, or should I just go to radio buttons?
> >
> > Thanks,
> > Jeff
>
> If I understand your question...
>
> In order to have your value preset in the drop down list you need
> indicate that with
> blahblah
>
> What I've been using for this is a hash like this:
>
> while ($row=mysql_fetch_array($result)) {
> $selected = array();
> $selected[$row["store"]] = "selected";
> $store=$row["store"];
> $jobdesc=$row["jobdesc"];
> echo "";
> echo "Store:";
> echo ""
> echo "   Hill"] . ">Signal Hill";
> echo "   ">Reseda";
> ...etc, etc., etc.
>
> something along those lines, anyway. So, if $row["store"] == "Signal
> Hill", then $selected["Signal Hill"] will be set to "selected", while
> $selected["Reseda"] and all the others will be blank.
>
> This is a very keen thing about php.
>
> -Steve
>
>
> --
> PHP Database 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 Database 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-DB] Forms Question

2001-09-05 Thread Michael Garvin

The solution is easier than you think.  You'll need to insert an if 
statement in your option html tag that says

echo "Signal Hill\n";
should become:

echo "Signal Hill\n";

Jeff Grossman wrote:

>Hello,
>Here is the code I have:
>
>while ($row=mysql_fetch_array($result)) {
>   $store=$row["store"];
>   $jobdesc=$row["jobdesc"];
>echo "";
>echo "Store:
>  
> Signal Hill
> Reseda
> Orange
> West Covina
> Riverside
> Norwalk
> Fountain Valley
> Pasadena
> Redondo Beach
> San Bernardino
> Kearny Mesa
> San Marcos
> Chino
> Corporate Office
>  ";
>echo "VALUE=\"$jobdesc\">";
>echo "Changes\">";
>}
>
>
>Is want I am trying to do possible?  I want the value which is stored in 
>$store to automatically fill in on the drop down list.  But, for some 
>reason it is defaulting to the first option, and not using the value 
>that is in the database.
>
>Can I use a drop down menu, or should I just go to radio buttons?
>
>Thanks,
>Jeff
>




-- 
PHP Database 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-DB] Forms Question

2001-09-05 Thread Steve Cayford


On Wednesday, September 5, 2001, at 04:50  PM, Jeff Grossman wrote:

> Hello,
> Here is the code I have:
>
> while ($row=mysql_fetch_array($result)) {
>$store=$row["store"];
>$jobdesc=$row["jobdesc"];
> echo "";
> echo "Store:
>   
>  Signal Hill
>  Reseda
>  Orange
>  West Covina
>  Riverside
>  Norwalk
>  Fountain Valley
>  Pasadena
>  Redondo Beach
>  San Bernardino
>  Kearny Mesa
>  San Marcos
>  Chino
>  Corporate Office
>   ";
> echo " VALUE=\"$jobdesc\">";
> echo " Changes\">";
> }
>
>
> Is want I am trying to do possible?  I want the value which is stored in
> $store to automatically fill in on the drop down list.  But, for some
> reason it is defaulting to the first option, and not using the value
> that is in the database.
>
> Can I use a drop down menu, or should I just go to radio buttons?
>
> Thanks,
> Jeff

If I understand your question...

In order to have your value preset in the drop down list you need 
indicate that with
blahblah

What I've been using for this is a hash like this:

while ($row=mysql_fetch_array($result)) {
$selected = array();
$selected[$row["store"]] = "selected";
$store=$row["store"];
$jobdesc=$row["jobdesc"];
echo "";
echo "Store:";
echo ""
echo "  Signal Hill";
echo "  Reseda";
...etc, etc., etc.

something along those lines, anyway. So, if $row["store"] == "Signal 
Hill", then $selected["Signal Hill"] will be set to "selected", while 
$selected["Reseda"] and all the others will be blank.

This is a very keen thing about php.

-Steve


-- 
PHP Database 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-DB] Forms Question

2001-09-05 Thread Bas Jobsen

> Hello,
> Here is the code I have:

sure, your query is something like:
select ..., store,  jobdesc .. FROM ..

why using:
>$store=$row["store"];
>$jobdesc=$row["jobdesc"];
echo"dhdhdh".$row["store"]."blabla" would also work

i should use:
while (LIST($store,$jobdesc)=mysql_fetch_row($result)) {
.

- Original Message - 
From: "Jeff Grossman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 11:50 PM
Subject: [PHP-DB] Forms Question


> Hello,
> Here is the code I have:
> 
> while ($row=mysql_fetch_array($result)) {
>$store=$row["store"];
>$jobdesc=$row["jobdesc"];
> echo "";
> echo "Store:
>   
>  Signal Hill
>  Reseda
>  Orange
>  West Covina
>  Riverside
>  Norwalk
>  Fountain Valley
>  Pasadena
>  Redondo Beach
>  San Bernardino
>  Kearny Mesa
>  San Marcos
>  Chino
>  Corporate Office
>   ";
> echo " VALUE=\"$jobdesc\">";
> echo " Changes\">";
> }
> 
> 
> Is want I am trying to do possible?  I want the value which is stored in 
> $store to automatically fill in on the drop down list.  But, for some 
> reason it is defaulting to the first option, and not using the value 
> that is in the database.
> 
> Can I use a drop down menu, or should I just go to radio buttons?
> 
> Thanks,
> Jeff
> 
> -- 
> Jeff Grossman ([EMAIL PROTECTED])
> 
> -- 
> PHP Database 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 Database 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-DB] Forms Question

2001-09-05 Thread Jeff Grossman

Hello,
Here is the code I have:

while ($row=mysql_fetch_array($result)) {
   $store=$row["store"];
   $jobdesc=$row["jobdesc"];
echo "";
echo "Store:
  
 Signal Hill
 Reseda
 Orange
 West Covina
 Riverside
 Norwalk
 Fountain Valley
 Pasadena
 Redondo Beach
 San Bernardino
 Kearny Mesa
 San Marcos
 Chino
 Corporate Office
  ";
echo "";
echo "";
}


Is want I am trying to do possible?  I want the value which is stored in 
$store to automatically fill in on the drop down list.  But, for some 
reason it is defaulting to the first option, and not using the value 
that is in the database.

Can I use a drop down menu, or should I just go to radio buttons?

Thanks,
Jeff

-- 
Jeff Grossman ([EMAIL PROTECTED])

-- 
PHP Database 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]