[PHP] php and javascript

2002-03-25 Thread Scott

I have some image urls that I have stored in a mysql database.  I want to be 
able to display the images in a popup window using javascript.  But I haven't 
been able to figure out how to get the get the info to mysql so that the 
image loads when the popup window appears.  Below is an example of the form 
without any javascript.



">


Any help appreciated.
Thanks, 
SW

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




[PHP] PHP and JavaScript

2002-05-26 Thread mp

Hi, php-general,

 I make this kind of PHP script(script.php):
 script.php
 

 And in HTML (other.html) file I write:
 

 But there is some mistake. Does anybody can help me?
 Thanks...


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




[PHP] php and javascript

2001-02-20 Thread Carl Natale

I need some help passing a variable to a popup window. The following form 
collects input from the user and stores it in the variable $summary.

";
$summary = "Hellow universe";
print " ";
print "";
print "";
?>

When you click on the "Try This" button, hint.php opens up in another, 
smaller window just like I wanted. But the variable $summary doesn't show 
up 

";
//BUT NOT THIS ONE
print $summary;
?>

If I take JavaScript out of the submit coding, the browser window moves 
to hint.php and prints the $summary variable. 

I'm much more comfortable with PHP than JavaScript. How can I deliver the 
text in $summary to a second, smaller window?

Thank you.

-- 
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] php and javascript

2001-03-01 Thread Dan Harrington

Hello,

Are there any good examples of producing embedded javascript code in a php
file?

I am having a weird problem with some javascript that simply will not
execute, even
though I've properly used slashes to prefix quote marks etc.

I don't get javascript errors, it simply doesn't run like it should.

Me thinks this is simple, but I can't seem to figure it out.
Thanks


-- 
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] php and javascript

2001-07-27 Thread Karl Phillipson


Does anyone know how to pass php variables to a javascript for processing.

I have a DHTML menu system that requires variables be attached to the url
contained within it. Using echo does not print the variable to the url.

Is there another way?

Thx in advance.

Karl
==
Karl Phillipson
PHP SQL Programmer

Saffron Hill Ventures
67 Clerkenwell Road
London   
EC1R 5BL
==




Re: [PHP] php and javascript

2002-03-25 Thread Dennis Moore

Your popup window should be an normal PHP page calling your images in the
database.   You can then setup your form to call the popup windows via
javascript using the window.open() method.

/dkm



- Original Message -
From: "Scott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 6:13 PM
Subject: [PHP] php and javascript


> I have some image urls that I have stored in a mysql database.  I want to
be
> able to display the images in a popup window using javascript.  But I
haven't
> been able to figure out how to get the get the info to mysql so that the
> image loads when the popup window appears.  Below is an example of the
form
> without any javascript.
>
> 
> 
> ">
> 
>
> Any help appreciated.
> Thanks,
> SW
>
> --
> 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




[PHP] php and javascript problem

2002-04-08 Thread bob

i use php to produce a javascript code,which enable the password and
level change as the username changes.it did.
but now i cannot select level.
what's wrong?how can i select level?

thanks in advance.






super

 
function updatelist(){

whichSelected = document.adduser.list.selectedIndex;
if (document.adduser.list.options[whichSelected].value == '0')
{
document.adduser.password.value = 'lfyk';
document.adduser.level.options[0].selected = 'true';
}
if (document.adduser.list.options[whichSelected].value == '1')
{
document.adduser.password.value = '1971';
document.adduser.level.options[1].selected = 'true';
}
if (document.adduser.list.options[whichSelected].value == '2')
{
document.adduser.password.value = '1972';
document.adduser.level.options[2].selected = 'true';
}
if (document.adduser.list.options[whichSelected].value == '3')
{
document.adduser.password.value = '1973';
document.adduser.level.options[3].selected = 'true';
}
return true;
}
 





   
 
  
  

   
 
  info

  
   
username
  

lfyk
other
yk
y


  
  
   
password
  

  

   
level
  
  
4
1
2
3



   
  

   
 
   

 
 



  

  

   

   
  
 
  

  
  

  

 
 
 
 
 
 
 
 
 

 
updatelist();
 
 

document.adduser.list.focus();
 




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




RE: [PHP] PHP and JavaScript

2002-05-26 Thread SP

It worked for me, what error are you getting?

In the other.html, did you have this?











-Original Message-
From: mp [mailto:[EMAIL PROTECTED]]
Sent: May 26, 2002 3:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP and JavaScript


Hi, php-general,

 I make this kind of PHP script(script.php):
 script.php
 

 And in HTML (other.html) file I write:
 

 But there is some mistake. Does anybody can help
me?
 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] PHP and JavaScript

2002-05-26 Thread Mark

On Sun, 26 May 2002 10:05:03 +0300, mp wrote:
>Hi, php-general,
>
>I make this kind of PHP script(script.php):
>script.php
>$variable = "Some some long long Text Blah blah";
>echo "document.write(\"".$variable."\")";
>?>
>
>And in HTML (other.html) file I write:
>
>
>But there is some mistake. Does anybody can help me?
>Thanks...
>
>

make sure $variable doesn't have any newlines.


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




[PHP] php and javascript question

2002-06-05 Thread kemu

I have a page first he generates a var in javascript
my next question is
is it possible to use that var in php on the same page
first he does the javascript then the php ?




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




Re: [PHP] php and javascript

2001-02-20 Thread Simon Garner

From: "Carl Natale" <[EMAIL PROTECTED]>

> I need some help passing a variable to a popup window. The following form
> collects input from the user and stores it in the variable $summary.
>
>  print "";
> $summary = "Hellow universe";
> print " ";
> print " onClick=\"window.open('hint.php', 'remote',
> 'menubar,scrollbars,resizable,width=350,height=200,left=20,top=20');
> return false;\">";
> print "";
> ?>


Try:

window.open('hint.php?summary=" . urlencode($summary) . "', )

Realise that the pop-up window is a totally separate document, from the web
server's point of view, hence hint.php cannot magically get the value of
$summary from the form page.




>
> When you click on the "Try This" button, hint.php opens up in another,
> smaller window just like I wanted. But the variable $summary doesn't show
> up
>
>  file://hint.php script says this
>
> file://THIS LINE PRINTS
> print "Here's the hint:";
> file://BUT NOT THIS ONE
> print $summary;
> ?>
>
> If I take JavaScript out of the submit coding, the browser window moves
> to hint.php and prints the $summary variable.
>
> I'm much more comfortable with PHP than JavaScript. How can I deliver the
> text in $summary to a second, smaller window?
>
> Thank you.
>



-- 
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] php and javascript

2001-02-20 Thread Ankur Verma

try

";
$summary = "Hellow universe";
print " ";
print "";
print "";
?>

hope that helps

best regards

Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India

- Original Message -
From: "Carl Natale" <[EMAIL PROTECTED]>
To: "Php" <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 7:41 AM
Subject: [PHP] php and javascript


> I need some help passing a variable to a popup window. The following form
> collects input from the user and stores it in the variable $summary.
>
>  print "";
> $summary = "Hellow universe";
> print " ";
> print " onClick=\"window.open('hint.php', 'remote',
> 'menubar,scrollbars,resizable,width=350,height=200,left=20,top=20');
> return false;\">";
> print "";
> ?>
>
> When you click on the "Try This" button, hint.php opens up in another,
> smaller window just like I wanted. But the variable $summary doesn't show
> up
>
>  file://hint.php script says this
>
> file://THIS LINE PRINTS
> print "Here's the hint:";
> file://BUT NOT THIS ONE
> print $summary;
> ?>
>
> If I take JavaScript out of the submit coding, the browser window moves
> to hint.php and prints the $summary variable.
>
> I'm much more comfortable with PHP than JavaScript. How can I deliver the
> text in $summary to a second, smaller window?
>
> Thank you.
>
> --
> 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] php and javascript

2001-03-02 Thread Christian Reiniger

On Friday 02 March 2001 06:21, you wrote:
> Hello,
>
> Are there any good examples of producing embedded javascript code in a
> php file?



  sglfjh s



-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

The use of COBOL cripples the mind; its teaching should, therefore,
be regarded as a criminal offence.

- Edsger W. Dijkstra

--
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] php and javascript

2001-03-02 Thread John Ashton

Well not sure what ya need an example of :)
php is php and javascript is javascript.  

What excatly do you need help wiht ?

> -Original Message-
> From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
> Sent: March 2, 2001 5:34 AM
> To: Php-General@Lists. Php. Net
> Subject: Re: [PHP] php and javascript
> 
> 
> On Friday 02 March 2001 06:21, you wrote:
> > Hello,
> >
> > Are there any good examples of producing embedded javascript code in a
> > php file?
> 
>somecode
> ?>
> 
>   sglfjh s
> 
>more code
> ?>
> 
> -- 
> Christian Reiniger
> LGDC Webmaster (http://sunsite.dk/lgdc/)
> 
> The use of COBOL cripples the mind; its teaching should, therefore,
> be regarded as a criminal offence.
> 
> - Edsger W. Dijkstra
> 
> -- 
> 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] php and javascript

2001-07-27 Thread Vitali Falileev

Hello Karl,

Publish your code, plz. We are not wizards. :)

27 July, 2001, 14:08:05, you wrote:

KP> Does anyone know how to pass php variables to a javascript for processing.

KP> I have a DHTML menu system that requires variables be attached to the url
KP> contained within it. Using echo does not print the variable to the url.

KP> Is there another way?


-- 
Best regards,
 Vitalimailto:[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] php and javascript

2001-07-27 Thread Daniel Rezny

Hello Karl,

Friday, July 27, 2001, 1:08:05 PM, you wrote:


KP> Does anyone know how to pass php variables to a javascript for processing.

KP> I have a DHTML menu system that requires variables be attached to the url
KP> contained within it. Using echo does not print the variable to the url.

KP> Is there another way?

KP> Thx in advance.


varname='';

some usage of varname;



I had a same problem some time ago. There must be a single quotes
neither is it string nor any other type.

I hope it helps

-- 
Best regards,
 Danielmailto:[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] php and javascript

2001-07-27 Thread Sheridan Saint-Michel

I am not sure exactly what you are doing, but the thing
to remember is that your PHP script is writing your HTML
and JavaScript.  As long as you keep that in mind it is
fairly easy to see how to pass variables to JS.

Here is a very simple example





var foo = "<?php echo "$foo"; ?>";
document.writeln(foo);




If you need something more specific post some code.

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: Karl Phillipson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 27, 2001 6:08 AM
Subject: [PHP] php and javascript


>
> Does anyone know how to pass php variables to a javascript for processing.
>
> I have a DHTML menu system that requires variables be attached to the url
> contained within it. Using echo does not print the variable to the url.
>
> Is there another way?
>
> Thx in advance.
>
> Karl
> ==
> Karl Phillipson
> PHP SQL Programmer
>
> Saffron Hill Ventures
> 67 Clerkenwell Road
> London
> EC1R 5BL
> ==
>
>


-- 
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] php and javascript question

2002-06-05 Thread Martin Clifford

As far as I'm aware you can't create a javascript variable and use it within PHP on 
the same page.  You can add that variable's value to a hidden form element to be 
passed to the next page, but I don't think so with the same page.

martin

>>> "kemu" <[EMAIL PROTECTED]> 06/05/02 02:30PM >>>
I have a page first he generates a var in javascript
my next question is
is it possible to use that var in php on the same page
first he does the javascript then the php ?




-- 
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] php and javascript question

2002-06-05 Thread Scott Hurring

As someone else suggested a few days ago: try using an IFRAME,
and refreshing it from javascript with the values you need.

The whole browser will not refresh, just the IFRAME, which
will give the illusion of jscript and php talking to each
other in realtime.

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -Original Message-
> From: Martin Clifford [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 4:24 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] php and javascript question
> 
> 
> As far as I'm aware you can't create a javascript variable 
> and use it within PHP on the same page.  You can add that 
> variable's value to a hidden form element to be passed to the 
> next page, but I don't think so with the same page.
> 
> martin
> 
> >>> "kemu" <[EMAIL PROTECTED]> 06/05/02 02:30PM >>>
> I have a page first he generates a var in javascript
> my next question is
> is it possible to use that var in php on the same page
> first he does the javascript then the php ?
> 
> 
> 
> 
> -- 
> 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
> 

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




Re: [PHP] php and javascript question

2002-06-05 Thread Miguel Cruz

On Wed, 5 Jun 2002, Martin Clifford wrote:
> As far as I'm aware you can't create a javascript variable and use it
> within PHP on the same page.  You can add that variable's value to a
> hidden form element to be passed to the next page, but I don't think so
> with the same page.

You're quite right; the PHP executes and terminates before the JavaScript
ever starts.

If you want to get JavaScript-calculated values back into PHP, you have to 
pass them back through new requests to the server.

miguel


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