Hi all,
I am Bárbara Vilela and I work at Tuenti in the Human Resources
department in Madrid. Tuenti is a social application and our mission is
to improve the communication and transmission of information between
people who know each other. Already the #6 most-trafficked website in
Spain,
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 select tag, I want to populate it with a
list of variable names from
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 select tag, I want to populate it with a
list of
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
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 web
form after POST.
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
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
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
erased when the page reloads. I
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 as
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
erased
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 put in
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;
input type=checkbox
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;
input
-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
input type=checkbox name=list37[] value=7 /
Suddenly JavaScript doesn't care for the object and throws an error
[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;
input type=checkbox id=list37 name=list37[] value=4 /
By doing this I did not have to change the function or the function
calls. JS recognizes the boxes by id,
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
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;
input type=checkbox id=list37 name=list37[] value=4 /
By doing this I did not have to change the function or the function
calls.
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!
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;
input type=checkbox id=list37 name=list37[] value=4 /
By doing this I did not have to change the function or the function
calls. JS
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 elements
[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
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.net
Subject: Re: [PHP] PHP
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 will
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.
checkbox name=blah[]
[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
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
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;
input type=checkbox id=list37 name=list37[] value=4 /
By doing this I did not have to change the function or
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 mailto:[EMAIL PROTECTED]
on Tuesday, March 08, 2005 4:28 PM said:
I'm trying to integrate some JavaScript
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
--
script language=JavaScript
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
--
script language=JavaScript
function
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 tag.
Mário Gamito mailto:[EMAIL PROTECTED]
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.
Like
Hi everyone,
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.
So I'd like to use a combination of javascript, like this, but it isn't
quite elegent enough:
- Tick the box.
- Javascript
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
--
Hi everybody!
Have somebody any idea how I could do something like that?
?
settype($phpScreenWidth, string);
settype($phpScreenHeight, string);
?
script language=javascript
var phpScreenWidth, phpScreenHight;
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 JavaScript
Hi
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 serverside process
This
Hi everybody!
Have somebody any idea how I could do something like that?
?
settype($phpScreenWidth, string);
settype($phpScreenHeight, string);
?
script language=javascript
var phpScreenWidth, phpScreenHight;
phpScreenWidth
Have somebody any idea how I could do something like that?
snip javascript and PHP
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
-WIN] Re: [PHP] PHP JavaScript
Have somebody any idea how I could do something like that?
snip javascript and PHP
You're somewhat out of luck, as the chain of events in your typical HTTP
transaction looks something like this...
[time]-
client
Perfect! That's all I had to do.
Thanks!
Maurício
-Mensagem original-
De: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 5 de agosto de 2003 16:30
Para: Mauricio; [EMAIL PROTECTED]
Assunto: Re: [PHP] PHP/JavaScript/HTML
From: Mauricio [EMAIL PROTECTED
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]
I wrote a JavaScript to set the values of a Select html object by client
side. The values are copied
Hello folks
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, then press submit button, the
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, then
From: Mauricio [EMAIL PROTECTED]
On the Address Bar I can see: index.php?slcAdd=1slcAdd=2slcAdd=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 in an
To: [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
Hello,
I am using mySQL and PHP to pull some data into my page.
I have 2 dropdown boxes.
As an example lets say dropbox1 has a list of cars and dropbox2 has a list
of colours.
Here's the thing. The colours for each car vary so I won't know what
colours to populate the 2nd dropbox with until a
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 =
Anyone have an idea of how to get this to work? Its the onClick part that
wont work. I know if I pull it out of PHP it works just fine but I need it
part of the script as I have a loop that it runs under.
echo (td width=50%a href='' onClick='javascript:window.open
]
Sent: Wednesday, July 09, 2003 2:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php - javascript together prob?
Anyone have an idea of how to get this to work? Its the onClick part that
wont work. I know if I pull it out of PHP it works just fine but
I need it
part of the script as I have
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 work?
-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 stripslashes() call
Hello,
I'm trying to use a calendare script to select a date in another form. I got the
calendar working and I've got it all working except one bit of error.
I'm repeating a table field to get all these items into a table. Each row of the table
has it's own text field where the user can type
-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 a href=\#\
onClick=\window.opener.document..$HTTP_GET_VARS['name']..da
te.value='$y-$m-$d';\$d/a;
:22 AM
Subject: RE: [PHP] PHP/Javascript Help
-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 a href=\#\
onClick=\window.opener.document
Hello friends.
I need to control the users viewing from one location so that when I change the URL
string in a text file, the viewers page which has a timer automatically reads the URL
on the text pages and goes to that page.
Updating the textfile is ok. But below is the script onthe page
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 of the
select box must have [] at the end of it. My problem is that when I do that
for select1[] in my page that breaks the syntax of the JavaScript
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
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 dynamic
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
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 have to be javascript compatible anyway for some other issues in
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
Hi all,
I'm developing a WYSIWYG editor using PHP and Javascript (for COM). However, I start
having problems when I try to display the page using the .php extension. The
Javascript is not working.
However, when I save it to HTML, it worked fine.
Can anyone please help me? Why is this so?
-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.
form name=test action=check.php
input
Hi all,
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.
Here is my source :
!doctype html public -//W3C//DTD HTML 4.0 //EN
html
head
titleTitle here!/title
SCRIPT LANGUAGE=JavaScript
On Saturday 13 July 2002 23:37, David D wrote:
Hi all,
I can manage this script to work.
Js warn about listid[], he doesnt like [] in a var name !
There's nothing you can do about that.
Php needs them to collect an array from form checkboxes.
You'll just have to rename your checkboxes to
I hack js no need to change in php :
SCRIPT LANGUAGE=JavaScript
!-- Begin
var checkflag = false;
// on va se ballader parmis les elements de formualire et toucher
// au case a cocher
function check(formulaire) {
if (checkflag == false) {
for (i = 0; i formulaire.length; i++) {
if
check out the reply he sent to my last message. it had the code as an
attachment.
Jim Lucas
- Original Message -
From: David Freeman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 2:25 PM
Subject: RE: [PHP] php JavaScript
I've tried to include a simple
Hi there.
I've tried to include a simple javascript in a .php file,
but couldn't get it to work.
Actually not even the php code worked at all...
Is there any specific configuration flag that needs to be
set up in the Apache server so that the javascripts work
correctly?
Thanks in advance
Subject: [PHP] php JavaScript
Hi there.
I've tried to include a simple javascript in a .php file,
but couldn't get it to work.
Actually not even the php code worked at all...
Is there any specific configuration flag that needs to be
set up in the Apache server so that the javascripts
Message -
From: Luis Miguel N. Tavora [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 4:28 AM
Subject: [PHP] php JavaScript
Hi there.
I've tried to include a simple javascript in a .php file,
but couldn't get it to work.
Actually not even the php code worked at all
I've tried to include a simple javascript in a .php file,
but couldn't get it to work.
Actually not even the php code worked at all...
Is there any specific configuration flag that needs to be
set up in the Apache server so that the javascripts work
correctly?
Not
Just a general question. Is it possible to embed php in pure
javascript/dhtml code??
I tried but it didn't work, not sure if it was me or its not possible.
Thanks...
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/
--
PHP General Mailing List (http://www.php.net/)
To
On Friday 31 May 2002 13:18, Gerard Samuel wrote:
Just a general question. Is it possible to embed php in pure
javascript/dhtml code??
I tried but it didn't work, not sure if it was me or its not possible.
Thanks...
As long as you enclose the PHP code in script delimiters (?php ... ?) and
Here is a problem :-)
A php post form fooa.php
Submit all form fields to a page foob.php
Page foob.php do some mysql db check and in one condition I want to
Return to fooa.php without losing any field value... I made this from
foob.php with
That seems like over complicating the problem to me.
Why not just include the original query string that was passed from
fooa.php by:
header(Location:foa.php?$QUERY_STRING)
-Jackson
On Mon, 2002-04-01 at 12:28, Simos Varelakis wrote:
Here is a problem :-)
A php post form fooa.php
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP-JavaScript
In a word... No.
Well...
No.
Mårten Andersson wrote:
Is it posible to get values from javascript to PHP? Without having
to
post the variables..
Thanks
: [PHP] PHP-JavaScript
In a word... No.
Well...
No.
Mårten Andersson wrote:
Is it posible to get values from javascript to PHP? Without having
to
post the variables..
Thanks //Mårten
Ward
Cc: Mårten Andersson; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP-JavaScript
Unfortunately, that won't work if the value of the JS variable needs to
change dynamically based on user interaction; document.write() only
works as the page is loaded (well... MSIE might be different
Message-
From: Richard Crawford [SMTP:[EMAIL PROTECTED]]
Sent: 21 January 2002 15:59
To: Tim Ward
Cc: Mårten Andersson; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP-JavaScript
Unfortunately, that won't work if the value of the JS variable needs to
change dynamically based on user interaction
],
Richard Crawford [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] PHP-JavaScript
Or get the JS to rewrite a query string in a link, but personally I wouldn't
rely on JS that far.
Tim
www.chessish.com http://www.chessish.com
--
From: Richard Crawford [SMTP
Is it posible to get values from javascript to PHP? Without having to post
the variables..
Thanks //Mårten
_
Chatta med vänner online, prova MSN Messenger: http://messenger.msn.se
--
PHP General Mailing List
In a word... No.
Well...
No.
Mårten Andersson wrote:
Is it posible to get values from javascript to PHP? Without having to
post the variables..
Thanks //Mårten
_
Chatta med vänner online, prova MSN Messenger:
Hi,
A little trick I did to get the text from a textbox in a form
( for user comments ) without the user having to submit it was to
use javascript to append the textbox contents to a url ( GET METHOD )
when the user clicked on a link, which pointed to a redirect script
which extracted the
Hey all!
I'm including some javascript that enables a button in a form input
type=button name=CheckAll value=Check All
onClick=checkAll(document.myform.email)to check all the check boxes
at once. (I have an array of check boxes from a mysql db)
I use:
SCRIPT
Leave the input name as email. If you really want to call it email[],
you should be able to reference this in JavaScript as the object
document.myform[email[]]
If you leave it as email, you can then convert the email variable into an
array using explode() or split() as so:
?php
// on the
, 2001 2:47 AM
Subject: Re: [PHP] php javascript
Try document.myform.elements['email[]'] like below
script language=javascript
function func( field ) {
for ( i = 0; i field.length; i++ )
field[i].checked = true ;
}
/script
form name=myform
input type=checkbox name=email
[]
- Original Message -
From: Matthew Armsby [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 2:54 AM
Subject: Re: [PHP] php javascript
Leave the input name as email. If you really want to call it email[],
you should be able to reference this in JavaScript as the object
document.myform[email[]] seems to give me a syntax error.
Check if your already using you'll need to use single quotes as so:
input type=button name=CheckAll value=Check All
onClick=checkAll(document.myform['email[]'])
(tested on IE 5.5 and NS 4.08, works)
If you leave it as email, you can
Hi -
I want to use javascript to validate some fields on a form.
The javascript code will take the value the user typed
into the form and search for it in an array. If the value
is found in the array, then the value is ok, otherwise
an alert() message will be displayed.
The amount of data in
, a
complete reload can be forced on many browsers (NS and IE at least) by
holding shift and clicking reload.
Joseph
-Original Message-
From: Ide, Jim [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 4:36 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] PHP + javascript
Hi -
I want
91 matches
Mail list logo