|
|
|
|
![]() ![]() |
Jan 27 2006, 02:06 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
I have been wrestling with this issue some time now and can't figure it out.
I have a dropdownmenu with some data (pulled from a database using php, but that's unimportant). Now when one selects a item form that menu I want the page to which that item links to be opened in a layer. There are 2 things Going on: 1. I use javascripts include('layer','content.php'); function to load a page in a layer. Works like a charme. 2. the dropdown menu CAN open the page to which the items link in the same page using: <SELECT NAME="SelectURL" onChange="document.location.href= document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value"> Works great too. WHAT I DID TO COMBINE THIS: <SELECT NAME="albums" id="albums" class="table" onChange=" include('thumbnaillayer', 'document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value '); "> seemed logical to me. only what happens in real is this error: Not Found The requested URL /ghbstoernooi/document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value was not found on this server. -------------------------------------------------------------------------------- Apache/1.3.29 Server at localhost Port 80 What is going on here? I can't be too far away form the solution since steps 1 and 2 work great. But I need a little push in the right direction.... Please, any help would be awesome! Thanks a lot in advance! |
|
|
|
Feb 5 2006, 06:17 AM
Post
#2
|
|
|
Newbie [Level 3] ![]() ![]() ![]() Group: Members Posts: 40 Joined: 29-January 06 Member No.: 17,841 |
What you are trying to do is run a server side code in the client. "include" is server side (php) code. Whatever is executed on "onchange" of dropdown *has* to be client side code since your browser doesn't know about server code. That doesn't work. if you want to include something, you can redirect browser to a pageinclude.php script with a parameter (depending on the selection of dropdown) and in your php, depending on parameter, you can include respective file.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 26th July 2008 - 06:29 AM |