Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-30-2006, 03:00 PM   PM User | #1
CstAn
Regular Coder

 
Join Date: Nov 2005
Posts: 148
Thanks: 1
Thanked 0 Times in 0 Posts
CstAn is an unknown quantity at this point
PHP, javascript n xhtml --- problem comparing variable

i got a parent window that call out the child window......

in the child window i successful get the value from the parent window by using opener.document.getElementById.


because i want show the xhtml based on the value i get, so i had using PHP to compare with the language i get.
but the problem now is i cant compare although the value same as i get.

for example:
in parent window:
<input type = "hidden" name = "text1" id = "text1" value = "abc">

in child window:
<? $getValue = "<script language = 'language'>document.write(opener.document.getElementById('text1').value);</script>";

if($getValue == "abc")
{
echo"<table><tr><td>same</td></tr></table>";
}
else
{
echo "<table><tr><td>different<td></tr></table>";
}
?>

but the problem now is, it always show "different" message. y like that de??

i try to show d $getValue 's value, it show out "abc".

anyone can help me n tell me what is the problem??


thanks
CstAn is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:45 AM.


Advertisement
Log in to turn off these ads.