Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 17th, 2004, 11:25 AM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP with Javascript

If you have a spare minute, I have a problem I thought you might be able to find out how to fix, seeing as you know people that know things.

I am working on my multi-lingual website and I have a content menu that I want to display in a separate window when a certain page loads. I can display the window with no problems using an onLoad event, but I need to pass a couple of PHP GET variables to it, but, understandably I get errors. This is probably due to the fact that I am passing PHP variables with Javascript commands.

The reason I am wanting to do this is is that the expandable menu that I have created goes of the bottom of the screen and you have to scroll down to select one of the later sections.

This is not a requirement of the site, but it I think it would be a nice touch, but then again I could be talking garbage. Not sure what effect this would have on accessibility.

Any help would be very much appreciated.

Thanks:(
 
Old February 17th, 2004, 03:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This isn't a problem at all, if I understand you properly.

The onLoad event of the main page opens a new window for the context menu. You can pass variables to PHP in the onLoad event as GET variables (in the URL).

A PHP script generates the context menu based on the value of the GET variables passed to the page.

If the user clicks something in the main window that should modify the context window, just refresh the context window with new GET variables.


Take care,

Nik
http://www.bigaction.org/





Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and Javascript davidhayter Beginning PHP 5 May 6th, 2005 05:33 AM
javascript with php kuehhc Beginning PHP 8 February 1st, 2005 10:59 PM
How to use javascript with php? raichand_ray PHP How-To 2 November 12th, 2004 06:41 AM
javascript and php? Ashleek007 Beginning PHP 21 September 23rd, 2004 01:40 PM
JavaScript and php Bandy PHP How-To 2 February 10th, 2004 04:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.