Skip to main content
Participant
December 11, 2012
Answered

Using onChange behavior

  • December 11, 2012
  • 1 reply
  • 1939 views

Hi,

I am working in Dreamweaver 5.5 on a php file.

I have a variable $username = $_SESSION['MM_Username'] and another variable: $user_asking. I want to assign the value $username to $user_asking when a Select (List/Menu) is changed, using onChange Behavior. It is possible? Thank you!

This topic has been closed for replies.
Correct answer sudarshan.t

On a sidenote, I doubt this possibility. PHP is server-side, Javascript is client-side. Unless you actually submit the form to PHP for processing and get a return value, I doubt if you can use the value within an onChange behavior.

Anyway, post your code in full so we can offer more suggestions.

-ST

1 reply

sudarshan.t
Inspiring
December 11, 2012

Can we see your full code?

-ST

sudarshan.t
sudarshan.tCorrect answer
Inspiring
December 11, 2012

On a sidenote, I doubt this possibility. PHP is server-side, Javascript is client-side. Unless you actually submit the form to PHP for processing and get a return value, I doubt if you can use the value within an onChange behavior.

Anyway, post your code in full so we can offer more suggestions.

-ST