Re: [PHP] PHP Javascript header

2009-01-15 Thread Shawn McKenzie
Applejus wrote: > Hello there, > > Kind of newbie to PHP and javascript... I have this problem: > > I want to pass a javascript variable to a PHP code. > I am inside a javascript function that is creating HTML elements > dynamically. After creating a tag, I want to populate it with a > list of v

Re: [PHP] php & javascript interaction

2007-01-27 Thread Jochem Maas
William Stokes wrote: > Hello, > > I need some advice on how to learn Javascript and PHP interaction. Any good > tutorials on the web would be most welcome. I particulary need to learn how > to pass JS user input/choices to PHP. > > My current problem is how to ask user confirmation over his ac

Re: [PHP] php & javascript interaction

2007-01-26 Thread Scripter47
Myron Turner skrev: William Stokes wrote: Hello, I need some advice on how to learn Javascript and PHP interaction. Any good tutorials on the web would be most welcome. I particulary need to learn how to pass JS user input/choices to PHP. My current problem is how to ask user confirmation o

Re: [PHP] php & javascript interaction

2007-01-26 Thread Myron Turner
William Stokes wrote: Hello, I need some advice on how to learn Javascript and PHP interaction. Any good tutorials on the web would be most welcome. I particulary need to learn how to pass JS user input/choices to PHP. My current problem is how to ask user confirmation over his actions on a

Re: [PHP] PHP, Javascript, and Forms

2006-05-30 Thread tedd
At 10:03 PM -0400 5/30/06, Beauford wrote: >Hi, > >I have a form with about 20 fields in it and have two drop down menus in >which the second one changes depending on the previous one. This is done >with a javascript which reloads the page. > >The problem with this is that everything the user has p

Re: [PHP] PHP, Javascript, and Forms

2006-05-30 Thread David Tulloh
Beauford wrote: > Hi, > > I have a form with about 20 fields in it and have two drop down menus in > which the second one changes depending on the previous one. This is done > with a javascript which reloads the page. > > The problem with this is that everything the user has put in so far gets >

Re: [PHP] PHP, Javascript, and Forms

2006-05-30 Thread Minuk Choi
I think a better way for you to go(it may be a little bit more difficult, but it won't have any annoying "flickering" from the reloading of page) is to use AJAX. But if you insist on going on a PHP form + Javascript validation -> submit form ->PHP form + Javascript validation, that can be done

Re: [PHP] PHP & JavaScript

2006-05-19 Thread jekillen
On May 19, 2006, at 8:20 AM, Jay Blanchard wrote: [snip] http://us2.php.net/variables.external [/snip] BINGO! We have a winner! It can be as simple as adding an id to each checkbox; By doing this I did not have to change the function or the function calls. JS recognizes the boxes by id, PH

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Scott Hurring
Yeah, i guess it all depends what you're doing what works for you. Another avenue to try (depending on your application) is: Group all your checkboxes together inside of a uniquely-named DIV and then use javascript to get all of the "checkbox" elements inside the DIV. That way, you dont really n

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Jay Blanchard
[snip] For grouped checkboxes that have numerical keys, why not give them an ID that's simply a concatenation of NAME and the VALUE, so it's unique? [/snip] Because JavaScript loops through all the like ID'ed checkboxes to check or uncheck groups. It could be done the other way, but then JavaScrip

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Scott Hurring
For grouped checkboxes that have numerical keys, why not give them an ID that's simply a concatenation of NAME and the VALUE, so it's unique? Run the NAME though a preg_replace to replace non alphanum chars (\W+) with an underscore first to make sure it's a valid ID. i.e. I've used this with

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Richard Lynch
Simplest solution is to use id="whatever" for JS. It *is* possible to get [] into the name of a box in JS, but I never succeeded in any useful way myself. On Fri, May 19, 2006 9:33 am, Jay Blanchard wrote: > Can they play nicely together? > > For instance I have a small JavaScript sniplet that wi

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Jef Sullivan
I use document.getElementById().value. The only change that would need to be made with the input example is add an id="list['.$x.']" Jef -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Friday, May 19, 2006 8:47 AM To: php-general@lists.php.n

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Jay Blanchard
[snip] So, using the same ID produces non-valid documents if you ask me. [/snip] This is correct, and in order to properly validate I changed it to transitional instead of strict. This is an internal appif it were external I would do this differently for sure -- PHP General Mailing List (http

Re: [PHP] PHP & JavaScript

2006-05-19 Thread php
Dave Goodchild wrote: > I think it's a case of using id for javascript, not for css... Call me a purist, but quoting http://www.w3.org/TR/xhtml1/ (and you can probably find likewise paragraphs in other xhtml specs, all stemming from the basic XML property that id's are unique): "4.10. The element

Re: [PHP] PHP & JavaScript

2006-05-19 Thread John Nichel
Jay Blanchard wrote: [snip] http://us2.php.net/variables.external [/snip] BINGO! We have a winner! It can be as simple as adding an id to each checkbox; By doing this I did not have to change the function or the function calls. JS recognizes the boxes by id, PHP recognizes the array. There

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Dave Goodchild
I think it's a case of using id for javascript, not for css... -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon!

Re: [PHP] PHP & JavaScript

2006-05-19 Thread php
Jay Blanchard wrote: > [snip] > http://us2.php.net/variables.external > [/snip] > > BINGO! We have a winner! > > It can be as simple as adding an id to each checkbox; > > > > By doing this I did not have to change the function or the function > calls. JS recognizes the boxes by id, PHP recogni

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Jochem Maas
John Nichel wrote: Jay Blanchard wrote: Can they play nicely together? For instance I have a small JavaScript sniplet that will check certain checkboxes if a radio button is selected. Since I have a fair amount of checkboxes I want to put them in an array all their own so I use the XHTML synta

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Jay Blanchard
[snip] http://us2.php.net/variables.external [/snip] BINGO! We have a winner! It can be as simple as adding an id to each checkbox; By doing this I did not have to change the function or the function calls. JS recognizes the boxes by id, PHP recognizes the array. There were some other more co

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Kristen G. Thorson
> -Original Message- > From: Jay Blanchard [mailto:[EMAIL PROTECTED] > Sent: Friday, May 19, 2006 10:34 AM > To: php-general@lists.php.net > Subject: [PHP] PHP & JavaScript > > > Suddenly JavaScript doesn't care for the object and throws an error > (take the brackets out and it works

Re: [PHP] PHP & JavaScript

2006-05-19 Thread John Nichel
Jay Blanchard wrote: Can they play nicely together? For instance I have a small JavaScript sniplet that will check certain checkboxes if a radio button is selected. Since I have a fair amount of checkboxes I want to put them in an array all their own so I use the XHTML syntax w/brackets; Sudd

Re: [PHP] PHP / JavaScript integration

2005-03-09 Thread Richard Lynch
> Hi, > > I'm trying to integrate some JavaScript functions in PHP, but so far, no > good :( > > I want to have a js.php file that has the JavaScript functions i want to > use. This file, albeit its extension, has no PHP code or even tag. > > It's just like this: > > js.php > -- > > > function de

[Fwd: Re: [PHP] PHP / JavaScript integration]

2005-03-09 Thread Jochem Maas
this post was meant for the OP - I sent it to Chris W. (only) by mistake. oops Original Message From: - Wed Mar 09 19:50:29 2005 Chris W. Parker wrote: Mário Gamito on Tuesday, March 08, 2005 4:28 PM said: I'm trying to integrate some JavaScript

RE: [PHP] PHP / JavaScript integration

2005-03-08 Thread Chris W. Parker
Mário Gamito on Tuesday, March 08, 2005 4:28 PM said: > I'm trying to integrate some JavaScript functions in PHP, but so far, > no good :( [snip] > Now... i want to call this JavaScript function from the regular PHP > files. In particular, before the HTML code. > L

Re: [PHP] PHP / JavaScript integration

2005-03-08 Thread Gabe Guzman
On Wed, Mar 09, 2005 at 12:27:39AM +, M?rio Gamito wrote: > Hi, > > I'm trying to integrate some JavaScript functions in PHP, but so far, no > good :( > > I want to have a js.php file that has the JavaScript functions i want to > use. This file, albeit its extension, has no PHP code or even

Re: [PHP] PHP + Javascript, immediate database update

2004-10-27 Thread Matt M.
> I have a webform which my users are expecting to act like a Windows program, > they only need to check the box and it is automatically written to the > database. you could try this http://developer.apple.com/internet/webcontent/iframe.html or this http://jibbering.com/2002/4/httprequest.html

Re: [PHP] PHP & JavaScript

2003-10-22 Thread jsWalter
"Martin Towell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi everybody! > > > > Have somebody any idea how I could do something like that? > > > > > settype($phpScreenWidth, "string"); > > settype($phpScreenHeight, "string"); > > ?> This is a servers

[PHP] RE: [PHP-WIN] Re: [PHP] PHP & JavaScript

2003-10-22 Thread BQ777
[PHP-WIN] Re: [PHP] PHP & JavaScript >Have somebody any idea how I could do something like that? You're somewhat out of luck, as the chain of events in your typical HTTP transaction looks something like this... >[time]-> clien

Re: [PHP] PHP & JavaScript

2003-10-22 Thread Mike Migurski
>Have somebody any idea how I could do something like that? You're somewhat out of luck, as the chain of events in your typical HTTP transaction looks something like this... >[time]-> client request received from browser | +-

RE: [PHP] PHP & JavaScript

2003-10-22 Thread BQ777
Exactly. but it should be only with one step. That means, just running the file once and get the vars. cbq -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 23. Oktober 2003 03:00 To: 'BQ777'; [EMAIL PROTECTED] Subject: RE: [PHP] PHP & Ja

RE: [PHP] PHP & JavaScript

2003-10-22 Thread Martin Towell
> Hi everybody! > > Have somebody any idea how I could do something like that? > > settype($phpScreenWidth, "string"); > settype($phpScreenHeight, "string"); > ?> > > > var phpScreenWidth, phpScreenHight; > > phpScreenWidt

Re: [PHP] php&javascript live-clock

2003-10-07 Thread Eugene Lee
On Tue, Oct 07, 2003 at 03:48:27PM +0200, Alex Ciurea wrote: : : is it possible to show the live-clock from the server machine, using : php and javascript, without having to make refresh of that page? AFAIK, no. PHP scripts get their time information from the server. JavaScript can get its time

Re: [PHP] php&javascript live-clock

2003-10-07 Thread Chris Hayes
At 15:48 7-10-03, you wrote: hello, is it possible to show the live-clock from the server machine, using php and javascript, without having to make refresh of that page? That would be a 99% javascript job. Find an existing javascript that works. When the page is loaded let PHP feed the javascript

Re: [PHP] PHP/JavaScript/HTML

2003-08-14 Thread Mauricio
- From: "CPT John W. Holmes" <[EMAIL PROTECTED]> To: "Mauricio" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, August 05, 2003 10:05 AM Subject: Re: [PHP] PHP/JavaScript/HTML > From: "Mauricio" <[EMAIL PROTECTED]> > >

Re: [PHP] PHP/JavaScript/HTML

2003-08-05 Thread CPT John W. Holmes
From: "Mauricio" <[EMAIL PROTECTED]> > On the Address Bar I can see: index.php?slcAdd=1&slcAdd=2&slcAdd=3 > But when I get the value using $HTTP_GET_VARS['slcAdd']; it returns just the > last value. What can I do to get them all? Name your select box as "slcAdd[]" and you'll have all of the values

Re: [PHP] PHP/JavaScript/HTML

2003-08-05 Thread CPT John W. Holmes
From: "Mauricio" <[EMAIL PROTECTED]> > I wrote a JavaScript to set the values of a Select html object by client > side. The values are copied from another Select that I create getting the > values from the database. After the user set the values he/she wants to add > it in another form, for example

RE: [PHP] PHP, JavaScript and populating DropDowns

2003-07-30 Thread Creative Solutions New Media
: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Php. Net Subject: Re: [PHP] PHP, JavaScript and populating DropDowns assuming you have a table with colors, and each color has car associated with it (yes, there might be dup color entries). This should work (check spellings and case, etc..etc...) $query

Re: [PHP] PHP, JavaScript and populating DropDowns

2003-07-29 Thread John Manko
assuming you have a table with colors, and each color has car associated with it (yes, there might be dup color entries). This should work (check spellings and case, etc..etc...) $query="SELECT * from colors"; $results = mysql_query($query) or die ("DB ERROR:" . mysql_error()); $num = mysql_numro

Re: [PHP] php - javascript together prob?

2003-07-09 Thread Ray Hunter
U need to quote it with double quotes and escape them with like so: \" that should work for you. If not then you will need to start separating the string out and joining it with the "." . -- BigDog On Wed, 2003-07-09 at 15:51, Micah Montoy wrote: > Anyone have an idea of how to get this to wo

RE: [PHP] php - javascript together prob?

2003-07-09 Thread Jennifer Goodie
Since you had problems with quotes yesterday too, I would suggest reading the manual page on strings so you do not continue to have the same problems day after day. http://www.php.net/manual/en/language.types.string.php > -Original Message- > From: Micah Montoy [mailto:[EMAIL PROTECTED]

RE: [PHP] PHP/Javascript Help

2003-06-10 Thread Ford, Mike [LSS]
> -Original Message- > From: Stephen [mailto:[EMAIL PROTECTED] > Sent: 06 June 2003 15:48 > > > Thanks for your reply. I had actually made a mistake in the > code. It looks > like this now: > > > > How could I still use the id thing on this? Well, the addition of the stripsla

Re: [PHP] PHP/Javascript Help

2003-06-06 Thread Stephen
ton Senior Executive Web Developer Mophus.com, Inc. - Original Message - From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> To: "'Stephen'" <[EMAIL PROTECTED]>; "PHP List" <[EMAIL PROTECTED]> Sent: Friday, June 06, 2003 4:22 AM Subject

RE: [PHP] PHP/Javascript Help

2003-06-06 Thread Ford, Mike [LSS]
> -Original Message- > From: Stephen [mailto:[EMAIL PROTECTED] > Sent: 05 June 2003 19:15 > > Here's my javascript link code for each day of the month in > the calendar script: > > print " onClick=\"window.opener.document.".$HTTP_GET_VARS['name'].".da > te.value='$y-$m-$d';\">$d"

Re: [PHP] PHP & JavaScript

2003-02-12 Thread Greg
Thank you so much, that worked perfectly...I know it's off topic, but do you know how to automatically select all elements of a select multiple box and then submit the form using a submit button? Thanks! -Greg "John Nichel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTE

Re: [PHP] php & javascript drop down menu???

2003-02-12 Thread Jeff Bluemel
thanks Jason, between this & the other suggestions I was emailed I believe I can make this all work like I need to. Jeff "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wednesday 12 February 2003 08:47, Jeff Bluemel wrote: > > OK... I have a dy

Re: [PHP] PHP & JavaScript

2003-02-12 Thread John Nichel
document.forms[0].elements['select1[]'] Assuming the form is your first form on the page, reference the element in JavaScript as above. Greg wrote: I have a problem with 2 select multiple boxes in my PHP pages. In order for PHP to pass multiple values to a page that it is posted to, the name o

Re: [PHP] php & javascript drop down menu???

2003-02-11 Thread Jason Wong
On Wednesday 12 February 2003 08:47, Jeff Bluemel wrote: > OK... I have a dynamic menu system, and I have to maintain a dynamic menu. > however, the amount of content I need in my menu is going to be rapidly > outgrown. I believe my only solution is to deploy a javascript drop down > menu (users

RE: [PHP] php + javascript hard day together ?

2002-07-16 Thread Ford, Mike [LSS]
> -Original Message- > From: David D [mailto:[EMAIL PROTECTED]] > Sent: 13 July 2002 16:38 > > I can manage this script to work. > Js warn about listid[], he doesnt like [] in a var name ! > Php needs them to collect an array from form checkboxes. > > > > > onClick="this.value=check(

Re: [PHP] php + javascript hard day together ?

2002-07-13 Thread David D
I hack js no need to change in php :