Add to Google

Getting A Link From Dropdownmenu In A Layer ?!1

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

Getting A Link From Dropdownmenu In A Layer ?!1

kvarnerexpress
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!

 

 

 


Reply

kvkv
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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Similar Topics

Keywords : link dropdownmenu layer

  1. How To Make This Type Of Link? - Image change on mouseover (1)
  2. How Do You Make Text In A <div> Change When You Click On A Link? - something to do with jvascript (4)
    Say I have a link and some text. How would I make it so that when I clicked on the link, that text
    changed?...
  3. Link In Search Form - Open a link inside a text area... (2)
    i added a javascript search to my site Search basically i wanted to have links on there so that
    when u click the link it runs the search. instead of making ppl type it into the textarea and
    clicking go. or have it so when u click the link it enters text into the text area and then
    searchs... anyone know what im chatting about? ~thanks Please make sure that Topic title has to
    be descriptive. ...
  4. Javascript Alert On When Clicking A Link - (2)
    Basically, I want that a message box pops up when clicking on a specific link. The message box will
    ask "Are you sure you want to continue?" and then there are two buttons Yes or No / Ok or Cancel.
    Could someone give a code for it?...



Looking for link, dropdownmenu, layer, 1






*SIMILAR VIDEOS*
Searching Video's for link, dropdownmenu, layer, 1

*MORE FROM TRAP17.COM*
advertisement



Getting A Link From Dropdownmenu In A Layer ?!1



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE