Re: [PHP] could i get a clue?

2001-08-16 Thread Renze Munnik

Robert V. Zwink wrote:
 This particular application is designed to assist someone working on data
 entry, and is currently in production.  She inputs 100's of mail-in reply
 cards into a database using a php webpage.  The first field of the form is
 for the email address listed on the reply card.  If the email address is
 already in the database, the person doing data entry will see an image of a
 red light, if the email address is not in the database the person doing data
 entry will see an image of a green light.  Kind of weird, true, but exactly
 what she wanted.  Why should the person doing data entry have to type in
 email address, mailing address, first name, last name, etc. just to get an
 error saying duplicate entry found?  This way she can choose to replace the
 record or just skip it depending on the results (red or green).  The
 changing image increases her productivty by decreasing time spent inputing
 duplicate data.

 And also is one possible answer to the question, How do I access php from
 JavaScript.

 I fail to see how this is a horrible construction.  Solves a problem with
 minimal input from user, quickly, and completely.  How is this horrible?
 Its a functional tool, that is used ever day with 0 complaints.

 Horrible?
 Inigo: You keep using that word. I do not think it means what you think it
 means.



Michael Geier wrote:
 No it's not.
 First one is changing the address of the current window.
 Second one is a popup window leaving the first one intact.

 Just semantics.


A question for the both a you: Did either one of you actually _READ_
my message completely? No.

Michael... I said same _KIND_OF_ construction. I didn't say it's
exactly the same. Kind of you to tell me thing I already know, but
it doesn't change anything. It still is the same _kind_of_
construction. Like I wrote before; you redirect someone to a
different page. And whether you do that in the same window or in a
window that pops up makes no change to that. The user still goes to
a different page for the result of the referenced PHP-script.

And Robert... Seems like a pretty cool application you got there and
for what you're doing there, the images _are_ a good solution. You
want the 'light' to switch from green to red depending on a db-query
in a different PHP-script. And it does, without the user having to
leave the page. Smart!
But like a wrote before; if you're not using any images on your
page, it's not a nice solution. Then one should put images on a page
where he/she doesn't want any images. And, like I wrote, then you
get the Sitestat/Nedstat kind of constructions where you have to put
a transparent image from 1x1 pixel on the page. That's not the way
to do it.
And why wouldn't I know what horrible means? Because I keep using
that word? Wow... then you must have absolutely no clue of what
words like 'is' and 'the' mean. Yes, I know... this doesn't make
sense... Neither does your remark (...)

--

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
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] could i get a clue?

2001-08-15 Thread Robert V. Zwink

I don't think this is the only possible way.  I have used an html IMG tag,
then created something like a rollover effect that called a php file for the
image.  It was kind of like a stop light, the light was off until focus came
off of a particular form element, javascript then updated the image href
with a few extra arguments, then the light turned green or red.

You can also use a javascript popup window to call a php script.  I'm sure
there are a few ways to do this too.

Here's the javascript

input type=text size=45 name=1_1_email value= tabindex=1
onChange='validate_email()'IMG SRC=./trans.gif NAME=animation width=10
height=10 align=middle
SCRIPT
function validate_email(){
document.animation.src = ./image.phtml?email= +
document.forms[0].elements[1].value ;
return true;
}
/SCRIPT

here's the php

?php
include(get_connected.func);

 // This script checks for the existence of an image file, and outputs it,
 // if the image is not found than it will output a generic image

$yes_image = ./green.gif;
$no_image = ./red.gif;


header(Content-type: image/gif);

$mysqlconn = new MySQL_class;
$mysqlconn-Create($db);

$select = SELECT COUNT(item_id) FROM mkt_question_response WHERE item_id =
'.$HTTP_GET_VARS[email].' GROUP BY item_id;

$mysqlconn-Query($select);

if($mysqlconn-rows  0){
readfile($no_image);
}else{
readfile($yes_image);
}
?

Robert Zwink
http://www.zwink.net/daid.php

-Original Message-
From: Renze Munnik [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 11:30 AM
To: marilyn manson; [EMAIL PROTECTED]
Subject: Re: [PHP] could i get a clue?


On Tue, Aug 14, 2001 at 10:18:18AM -0500, marilyn manson wrote:
 ok a basic question. perhaps I dont know enough about javascript but
 anyway..

 I want to call a php script from javascript. Anybody have any hints for
me?
 A link to a useful website would work as well. thanks mates

 -student of computer science

FAIK the only possibility is to redirect to the PHP script. Then
you'll get something like:

window.location.href=myscript.php;

--

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] could i get a clue?

2001-08-15 Thread Renze Munnik

On Wed, Aug 15, 2001 at 09:44:58AM -0400, Robert V. Zwink wrote:
 I don't think this is the only possible way.  I have used an html IMG tag,
 then created something like a rollover effect that called a php file for the
 image.  It was kind of like a stop light, the light was off until focus came
 off of a particular form element, javascript then updated the image href
 with a few extra arguments, then the light turned green or red.
 
 You can also use a javascript popup window to call a php script.  I'm sure
 there are a few ways to do this too.


Hmmm, yeah... Way-2-go!

The popup is the same thing as I said. You just redirect to a
different (PHP-)page. So... nothing new!

And for your other solution. Very usefull. Especialy when you don't
have images on your page! What are you gonna do then? Create an
image from 1x1 that's transparent or something? Can't get any worse.
That's the SiteStat/Nedstat style. Awful!
Besides that... what if I want to do some _serious_ processing
instead of 'drawing' an image? Then, if I use your solution, I
always have to create (or redirect to) an image. Not to way to do
it!

-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
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] could i get a clue?

2001-08-15 Thread Robert V. Zwink


// Besides that... what if I want to do some _serious_ processing
// instead of 'drawing' an image?

Actually you just readfile an existing image, how much processing does that
involve?  Not too much.

// The popup is the same thing as I said. You just redirect to a
// different (PHP-)page. So... nothing new!

For future reference:

window.location.href=myscript.php

!=

window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes
')

No offense intended, just wanted to show some alternatives.  I'm sure there
are more.

Robert V. Zwink
http://www.zwink.net/daid.php




-Original Message-
From: Renze Munnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 9:54 AM
To: Robert V. Zwink; marilyn manson; [EMAIL PROTECTED]
Subject: Re: [PHP] could i get a clue?


On Wed, Aug 15, 2001 at 09:44:58AM -0400, Robert V. Zwink wrote:
 I don't think this is the only possible way.  I have used an html IMG
tag,
 then created something like a rollover effect that called a php file for
the
 image.  It was kind of like a stop light, the light was off until focus
came
 off of a particular form element, javascript then updated the image href
 with a few extra arguments, then the light turned green or red.

 You can also use a javascript popup window to call a php script.  I'm sure
 there are a few ways to do this too.


Hmmm, yeah... Way-2-go!

The popup is the same thing as I said. You just redirect to a
different (PHP-)page. So... nothing new!

And for your other solution. Very usefull. Especialy when you don't
have images on your page! What are you gonna do then? Create an
image from 1x1 that's transparent or something? Can't get any worse.
That's the SiteStat/Nedstat style. Awful!
Besides that... what if I want to do some _serious_ processing
instead of 'drawing' an image? Then, if I use your solution, I
always have to create (or redirect to) an image. Not to way to do
it!

--

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] could i get a clue?

2001-08-15 Thread Renze Munnik

On Wed, Aug 15, 2001 at 10:20:39AM -0400, Robert V. Zwink wrote:
 
 // Besides that... what if I want to do some _serious_ processing
 // instead of 'drawing' an image?
 
 Actually you just readfile an existing image, how much processing does that
 involve?  Not too much.

I didn't say that your construction doesn't work, but it's not the
way to develop your sites. By using horrible constructions you can
make 'good-working' site, but that doesn't make it a good site. You
should always avoid using such terrible constructions. I mean... why
creating an image if you never intended to do anything with images?
Just because you want to have some weird construction on your site
and you can't think of anything else, soon enough?

 
 // The popup is the same thing as I said. You just redirect to a
 // different (PHP-)page. So... nothing new!
 
 For future reference:
 
 window.location.href=myscript.php
 
 !=
 
 window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes
 ')

It's the same kind of construction. You redirect the user to a completely
different page.


 
 No offense intended,

None taken... and none intended...


-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
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] could i get a clue?

2001-08-15 Thread Robert V. Zwink

This particular application is designed to assist someone working on data
entry, and is currently in production.  She inputs 100's of mail-in reply
cards into a database using a php webpage.  The first field of the form is
for the email address listed on the reply card.  If the email address is
already in the database, the person doing data entry will see an image of a
red light, if the email address is not in the database the person doing data
entry will see an image of a green light.  Kind of weird, true, but exactly
what she wanted.  Why should the person doing data entry have to type in
email address, mailing address, first name, last name, etc. just to get an
error saying duplicate entry found?  This way she can choose to replace the
record or just skip it depending on the results (red or green).  The
changing image increases her productivty by decreasing time spent inputing
duplicate data.

And also is one possible answer to the question, How do I access php from
JavaScript.

I fail to see how this is a horrible construction.  Solves a problem with
minimal input from user, quickly, and completely.  How is this horrible?
Its a functional tool, that is used ever day with 0 complaints.

Horrible?
Inigo: You keep using that word. I do not think it means what you think it
means.

Robert Zwink
http://www.zwink.net/daid.php



-Original Message-
From: Renze Munnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 10:30 AM
To: Robert V. Zwink
Cc: marilyn manson; [EMAIL PROTECTED]
Subject: Re: [PHP] could i get a clue?


On Wed, Aug 15, 2001 at 10:20:39AM -0400, Robert V. Zwink wrote:

 // Besides that... what if I want to do some _serious_ processing
 // instead of 'drawing' an image?

 Actually you just readfile an existing image, how much processing does
that
 involve?  Not too much.

I didn't say that your construction doesn't work, but it's not the
way to develop your sites. By using horrible constructions you can
make 'good-working' site, but that doesn't make it a good site. You
should always avoid using such terrible constructions. I mean... why
creating an image if you never intended to do anything with images?
Just because you want to have some weird construction on your site
and you can't think of anything else, soon enough?


 // The popup is the same thing as I said. You just redirect to a
 // different (PHP-)page. So... nothing new!

 For future reference:

 window.location.href=myscript.php

 !=


window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes
 ')

It's the same kind of construction. You redirect the user to a completely
different page.



 No offense intended,

None taken... and none intended...


--

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 


--
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] could i get a clue?

2001-08-14 Thread Renze Munnik

On Tue, Aug 14, 2001 at 10:18:18AM -0500, marilyn manson wrote:
 ok a basic question. perhaps I dont know enough about javascript but
 anyway..
 
 I want to call a php script from javascript. Anybody have any hints for me?
 A link to a useful website would work as well. thanks mates
 
 -student of computer science

FAIK the only possibility is to redirect to the PHP script. Then
you'll get something like:

window.location.href=myscript.php;

-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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