Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-13-2003, 08:01 AM   #1 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
PHP / JS problem

Having a problem with javascript using a PHP var, code follows:

Page that inits the JS window.open:
PHP Code:
// segment from one page
echo "\t<td align=center valign=middle><form method=\"get\" action=\"test.php\">\n";
    echo 
"<input type=\"button\" value=\"Details\" onclick=\"window.open('test.php?row_id=" $row_id "','detailsWin','width=200,height=200,MENUBAR')\"></input></form></td>"
Child window that opens from window.open (and it opens, it just doesn't get the var $_GET['row_id'].
PHP Code:
<?php
// child window - should display the value of $row_id
    
$row_id $_GET['row_id'];
    echo 
$row_id;    
?>
bdl is offline   Reply With Quote
Old 03-13-2003, 08:30 AM   #2 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
well, what javascript is returning to the browser after PHP parses it?
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 03-13-2003, 08:53 AM   #3 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
I figured it out, I made a typo further up in my script where $row_id is initialized. Works great now. Thanks. =)
bdl is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
php 5 problem Amaranthine PHP 4 06-29-2004 10:25 PM
PHP Comes of Age sde Code Newbie News 0 04-14-2004 11:41 AM
Zope or PHP Hrqls PHP 9 09-01-2003 11:03 PM
I need to learn PHP Nitro PHP 9 06-28-2003 11:24 AM
PHP as CGI?? bdl PHP 8 05-08-2003 08:29 AM


All times are GMT -8. The time now is 01:18 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting