Forums / Setup & design / Sorry, back again : Is it possible to make a dynamic drop down list ?

Sorry, back again : Is it possible to make a dynamic drop down list ?

Author Message

laurent le cadet

Friday 24 October 2003 6:12:19 am

Hi (again),

I'm sorry to ask this question again, but I send a message 4 days ago without any answer.
I'm trying to make a drop down list with ez 3.1 but I just found 1 message about this.
It makes me think it's a very basic thing but I can't do it by myself.
Here's my code :

<form action="/index.php/content/view/full/" method="get">
<select name="ville" id="ville">
<option value="Villes" selected="selected">Villes</option>
{section name=top loop=fetch( content, list, hash( parent_node_id, 943 ) )}
<option value="{$:item.contentobject_id}">{$:item.name|wash}</option>
{/section}
</select>
<input name="ok" type="submit" class="button" id="ok" value="ok" />
</form>

The answer of the browser seems to be correct (...content/view/full/?ville=1008&ok=ok) but it just print "object unvailable".

Someone can tell me if it'd possible that way and what is the right code ?

Any help will be very welcome.

Laurent.

Marco Zinn

Friday 24 October 2003 12:07:49 pm

What do you want the form to do? The "action" of the above form will always give you a URL, that ez cannot understand. Is "1008" the node-ID, that you want to browse to, so you want a "drop-down-navigator"?

Marco
http://www.hyperroad-design.com

laurent le cadet

Saturday 25 October 2003 1:36:57 am

Hi Marco,

Yes 1008 is the node I want to browse to. In fact, I have a folder with about 150 nodes so I prefer to have a drop down than a long long list of items.

You have a solution to my pb ?

Laurent.

Paul Forsyth

Saturday 25 October 2003 7:49:55 am

Haven't tried this out but your code seems wrong because it refers to the contentobject_id. content/view/full expects a node id as a parameter. Instead, try:

$:item.node_id

Paul

laurent le cadet

Monday 27 October 2003 12:01:50 am

Hi Paul,

Still the same.

.../content/view/full/?ville=1008&ok=ok : "object unvailable".

Is there something to write in an ini file to convert the last part of the url in an object ID ?

Laurent.

Paul Forsyth

Monday 27 October 2003 4:39:16 am

I assume:

http://<site>/content/view/full/1008

gives you the right view as expected?

I can't see how your code will work. Have you custom
code underneath to take your 'ville' parameter and create a valid URI from it?

paul

laurent le cadet

Monday 27 October 2003 5:16:43 am

Yes, that's right, http://<site>/content/view/full/1008 is the URI I want to target.

For the custom code I just have nothing. I don't know how and where to create it.
I presume there is something to override somewhere ?

Paul Forsyth

Monday 27 October 2003 5:46:51 am

Try some javascript:

<select name="ville" id="ville" onchange="window.location=this.form.ville.options[this.form.ville.selectedIndex].value;">

Make sure you change the text i mentioned:

{$:item.contentobject_id} to {$:item.node_id}

Paul

laurent le cadet

Monday 27 October 2003 5:56:07 am

Paul,

PERFECT !

Thanks a lot.

I'm sure this will help.

Laurent.

zaxofeel .v

Tuesday 27 March 2007 1:36:25 am

I've a question that might be related to the thread,
did anyone here try to implement a dymanic drop down menu that its items depend on another list?
somthing like this:
http://www.plus2net.com/php_tutorial/dd.php

zaxofeel .v

Wednesday 04 April 2007 4:41:46 am

hi :)
didn't anyone try that b4?
actually i am in great need for it
I need to fill three select lists, the firs one has the top level objects and on selection an object, the second list is to be filled with its children, and so on for the third list
any help?

eZ debug

Timing: Jan 31 2025 00:37:58
Script start
Timing: Jan 31 2025 00:37:58
Module start 'content'
Timing: Jan 31 2025 00:37:58
Module end 'content'
Timing: Jan 31 2025 00:37:58
Script end

Main resources:

Total runtime0.2665 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 588.2031370.2578
Module start 'content' 0.00810.0312 958.46091,013.6250
Module end 'content' 0.03940.2270 1,972.08593,903.6172
Script end 0.2664  5,875.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00501.8636200.0002
Check MTime0.00170.6399200.0001
Mysql Total
Database connection0.00080.287510.0008
Mysqli_queries0.129448.57551410.0009
Looping result0.00130.49961390.0000
Template Total0.226384.910.2263
Template load0.00150.551610.0015
Template processing0.224884.363510.2248
Override
Cache load0.00110.402210.0011
Sytem overhead
Fetch class attribute can translate value0.00180.664510.0018
XML
Image XML parsing0.00030.097210.0003
General
dbfile0.033012.3995200.0017
String conversion0.00000.002230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs