veerumits
Jan 8 2009, 07:05 AM
| | Good Morning to all of u , frnds , i have a problem to convert javascript variable to php session variable, actually i have a registration page on which user filled there form and then he click on a hyperlink suppose(add more appliances) a pop will appear on the screen on that pop-up should have username which the user filled in the begining of the form. and i have used onBlur as javascript event , and want to use session variable to transfer variable from main window to pop window. your suggessions and responses are welcome i am suffering from this problem since last 2 days and unable to solve ,the problem with me is javascript , tell me if u have any complete solution in php only.
thanx in advance |
Comment/Reply (w/o sign-up)
truefusion
Jan 9 2009, 01:45 AM
It's easier to interact with PHP with AJAX. But why not send the username through the URL and retrieve the value using the _GET variable in PHP? If the script requires JavaScript enabled to work, then just go all out AJAX.
Comment/Reply (w/o sign-up)
(G)Author Name - e.g. John, Mike
Mar 1 2009, 09:35 AM
yes wehave same problem as above.
we have a image and we have to put src of that img in session of php through onclick() event of img in javascript.
Rajesh & Girish
Comment/Reply (w/o sign-up)
(G)Quasimodo
Sep 24 2009, 01:00 PM
Problem To Convert Javascript Variable To Php Variable
Problem To Convert Javascript Variable To Php Variable
Java is run on the client, Php on the Server...Accordingly the only way to do that interaction, is to use something which both client and server do understand ... Cookies...
Just convert Java variables into cookies and let php read them or viceversa convert php variables in Cookies and let java read them.
One problem arising... Time ;-( , the conversion from Cookie to Java and Cookie to php requires that the cookie is posted, or by pressing a hyperlink or by submitting a POST / GET.
So beware in that coding you'll loose the actual cycle and get it only the next one after the post.
-reply by Quasimodo
Comment/Reply (w/o sign-up)
Raidation
Oct 24 2009, 11:11 PM
The only true way to get php to understand javascript is with ajax. You make javascript send an ajax request to your php script. Your problem is because php is a server-sided code. Javascript is client-sided. So php will act the same way on all computers. Javascript won't.
Comment/Reply (w/o sign-up)
Similar Topics
Keywords :
- Unexpected T_variable...
Help! (3)
Script Help Required: Undefined Variable
A fault I cannot spot in PHP (3) Hi, when running a PHP script I keep getting the error: QUOTE Notice: Undefined variable: bret
in c:\program files\easyphp1-8\home\poll.php on line 294 Notice: Undefined variable: bret in
c:\program files\easyphp1-8\home\poll.php on line 294 (And, yes, I get it twice). The code
related to the variable is as follows: CODE function LogString($string,$type) {
$t_log = "\n"; $t_log .= $this->globaldata->server_vars ."|";
$t_log .= date("Y-m-d h:i:s A|"); $t_log .= "$type| "; $string =
str_replace("\n","\\n",$s....
Getting An Array Value Of A Dynamic Variable
(9) Ok i can't believe I need help in php but I can't figure this out... If i have an array,
lets say called test, how do i get a certain value from that array when referencing it dynamically
by either a string or another variable? Example: CODE $test=array(1,2,5); $name="test";
//Doesn't work: echo $$name ; /Doesn't work: echo ${$name} ; ....
Can I Make Dynamic Menu In Php
is it posible to make dynamic menu in php without javascript (7) As there are many java script by which we can have event based interaction like,message on mouse
over etc,that we can create dynamic menu in javascripts to make navigation bar ,but is it possible
in php to have this acomplished without javascripts,i am new to php,is it possible?. Thanks....
Building A Chat Using Javascript, Php, And Ajax
(2) I have heard that you can build a chat for a website that would display the username, etc, using
PHP, Javascript, and AJAX. So Im wondering how this can be done and if there are any tutorials on
how to do it, or tutorials on AJAX. Thank you.....
Convert Md5
question (6) hi all i write login and register system , my password is convert to md5 and then save in sql . but
i want to write c password for this script ! but i can not convert md5 password to text password
for example my user register at my script but can not recover his password in forget password ap , i
search at php.net but i can not find any sample or function if you know about that plz help me to
complete thi script, thanks all /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
alt="smile.gif" /> ....
Php Form Help!
Parse error T_LNUMBER - expecting T_VARIABLE (3) Hello, I am trying to make an employee application. I was just wondering if anyone knows how to spot
a php code error, when the code directly around the line with the error looks the same. below is
some of my process.php code. I beleive the error is on line 41. QUOTE PHP parse error: PHP
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in
/home/wwwange/public_html/FORMS/forms/process.php on line 41 Process.php code: CODE
include("global.inc.php"); $errors=0; $error="The following errors occured while processing your f....
Converting Characters In A Variable To Individual Values In An Array
turning variables into arrays (2) Say I have a variable such as $nav_item and it had to contents Home . IE: CODE
$nav_item = 'Home'; How would I make so that $nav_item was an array and had the
following contents? CODE $nav_item = array ('h', 'o', 'm',
'e'); With the case changing (ie H would become h and U would become
u ) EDIT: Okay found out that I could change the case with array_change_key_case ($nav_item,
CASE_LOWER); ....
<textarea> Tag Is Not Accepting Php Variable
for display, although <Input> tag does accept it (2) I have a single page template which has a Form on it. Logic is to check for a valid Querystring and
place the variables accepted from a form back into the form and re-display this form with error or
acceptance messages. I'm sure everyone here has done this a million times. The Form accepts
data from a user for First name, Last name, email address, and message-body named
'note_wide' then re-displays the values into the Form, but for some reason, I can't get
the value to display into a Textarea. Sample of the php code is as follows: first the good one:....
Javascript And Php
(6) i am designing a poll in which i use javascript, and i need to pass the selected answer in my poll
to php variables so how can i do that, any help will be appricated....
Javascript To Php - A Few Questions
(1) I am rewriting a Javascript into PHP, but I have two questions: How can I write these functions in
PHP? Math.floor Math.ceil I'm sure the answer is obvious, but I really can't find it...
/laugh.gif' border='0' style='vertical-align:middle' alt='laugh.gif' /> ....
Php Menus Without Javascript
Has PHP possibility to do it without JS (7) I have many PHP Books, PHP Bible among others, but no clear description how to build menus (dynamic)
Javascript like. Is PHP enough strong to do this? I also have Javascript Bible, many possibilities
are usable within PHP pages. Anybody has experience in creating dynamic menus in PHP? ....
Convert Gif & Png To Jpeg
(10) how can i convert gifs and pngs to jpeg using php ??....
Determining Whether A Phrase Is In A Variable
deciding whether a string is a url (2) I have a input box in a form called "button" and when the user clicks Submit! I want php to
determine whether or not this is a url or just text. All urls have "http://" in them so I have
decided I need a script which can determine whether or not "http://" is in a variable or a string.
The problem with using strings is that I've never needed to use them before (and thus have no
knowledge about them). When I was using asp, I knew there was a function called instr() but I
can't find php's equivalent. Does anybody know? Thanks in advance!....
Calling A False Variable...
like $count . $val (6) Okay I'm very new to PHP still, although you may recognize me from the threa before, just go
finished finals so now back to PHP! On one page I accept an input which will tell the next page how
many form lines to generate, that part I have worked out, or so I think. Because the number of
forum fields could vary I need to have a number of forum variables, so I used this code: CODE
echo " "; where $appendval is a variable what goes up one at a time, so at the end of this
block of code it would say $appendval++ This appears to work quite well, however when....
Php Parse Error
Including Variable in post (2) ok this is my config script that runs my site: CODE # Set up info for left column on the top
page: # It should begin with html tag and finish with tag $top_leftcol="
MMORPG Trade Center Welcome to MMORPG Trade Center. Please post your in game item only
in the correct game section. News News Goes Here
Other Other Links Goes Here "; ?> acutally i didnt
write this but heres my problem CODE News Goes Here where is says "News....
Stored Or Global Variable?
(1) I've created a form, nothing special, that uses a php script as a form action to input data into
mysql. Nothing special at all about this scenario. One thing I'd like to do is have the php
script redirect the user back to the html page that has the form the user just completed. I
don't want to have to hard code the url into the header function because I use this php script
with a bunch of other pages. Does PHP store the value of this page into some variable that the php
script can use? Thanks. kvarnerexpress....
Whould I Use Php To Make A Game Like The Army System?
Or javascript? (4) I want to make a game similar to the army system or on Omega Gateway, like a text game. Would I use
php or javascript? I know very little coding, and I plan on learning more before I start doing
anything. I just want to know what to 'study...'....
Calling A Variable From A Dynamic List In A Sql Statement
(2) I would be greatful if anyone could help me out, I have been stuck on this for a while. The problem
is that I have a drop down menu which I get the contents of from a database. Then when I press the
get details button I want to use the value selected in my drop down menu and pass it into an SQL
statement to recieve all te relevent info. Everything works if I specify a known variable, but the
problem seems to be passing a variable in which is part of the array. Below is the code for the drop
down menu and the Sql statement i'm trying to execute. drop down menu: $qu....
Possible To Put An If Statement Inside A Variable?
(2) Ok, so I'm using the include() function on my website. Problem is I'm trying to include a
search engine form into the layout which is stored in a variable, except the form has an if
statement in it and I can't seem to get it working. Here's the code I'm trying to
include... CODE Search: > Just wondering if it is possible for me to put this
form with the if statement into a variable, or if there's another way that I could go about
doing this. Thanks.....
Looking for Problem, To, Convert, Javascript, Variable, To, Php, Variable
|
Searching Video's for Problem, To, Convert, Javascript, Variable, To, Php, Variable
See Also,
|
advertisement
|
|