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 stripslashes() call doesn't really change the
basic idea, so:

   print a href=\#\ onClick=\window.opener.document.order[' .
stripslashes($HTTP_GET_VARS['name']) . ].value='$y-$m-$d';\$d/a;

  I now use ' in 
 the brakets as
 well, if that helps any...

I'm not sure I quite understand this, but if you're saying that the value of
$HTTP_GET_VARS['name'] may itself include ' characters, then I think the
answer to that is *not* to stripslashes() it -- JavaScript will understand
the backslashed notations and convert them to the correct result.  If that's
not what you were getting at, please try explaining it again in a bit more
detail (adding an example might help).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



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 a href=\#\ 
 onClick=\window.opener.document..$HTTP_GET_VARS['name']..da
 te.value='$y-$m-$d';\$d/a;
 
 $HTTP_GET_VARS['name'] holds the text field name, ie 
 delivery[3322ffds]. If I replace the name either order in the 
 text field and as the variable I pass in the URL it works fine.

You need to make use of the JavaScript ['id'] identity with .id (see any good 
JavaScript book for more on this), thus:

  print a href=\#\ 
  onClick=\window.opener.document[' . $HTTP_GET_VARS['name'] . 
'].date.value='$y-$m-$d';\$d/a;


Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] PHP/Javascript Help

2003-06-06 Thread Stephen
Thanks for your reply. I had actually made a mistake in the code. It looks
like this now:

print a href=\#\
onClick=\window.opener.document.order..stripslashes($HTTP_GET_VARS['name']
)..value='$y-$m-$d';\$d/a;

How could I still use the id thing on this? I now use ' in the brakets as
well, if that helps any...

I'm not yours, so why should I be sincere about it,
Stephen Craton
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


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

 $HTTP_GET_VARS['name'] holds the text field name, ie
 delivery[3322ffds]. If I replace the name either order in the
 text field and as the variable I pass in the URL it works fine.

You need to make use of the JavaScript ['id'] identity with .id (see any
good JavaScript book for more on this), thus:

  print a href=\#\
  onClick=\window.opener.document[' . $HTTP_GET_VARS['name'] .
'].date.value='$y-$m-$d';\$d/a;


Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

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