Forums / Setup & design / Action button and dropdown list

Action button and dropdown list

Author Message

Sandra Parente

Wednesday 06 April 2005 3:26:17 am

I want to let users to select an article in a folder from a dropdown list and then click an action button to go to the selected article. I have tried in many ways, but the action button dosn't work: I find myself always in the folder node. This is my (last) code:

<form method="post" action={$node.url_alias|ezurl}>
            <div class="content-view-children">
		<select name="ChildrenList[{$node.node_id}]">
                {section var=child loop=$list_items sequence=array}
                    <option value="{$node.node_id}">{node_view_gui view=line content_node=$child}</option>
                {/section}
		</select>
<input class="button" type="submit" name="ChildSelect" value="Go" />
            </div>
</form>

Which is the right "action" code?

Sandra Parente
www.netbliss.it

Sandra Parente

Wednesday 06 April 2005 8:23:19 am

I've seen that actions are set in browse.ini
Maybe we must before set some kind of action here?

Sandra Parente
www.netbliss.it

Eivind Marienborg

Wednesday 06 April 2005 8:38:52 am

the "action" code tells the browser where to send the form values. So unless there is something at the adress you specify that handles your form, it won't do anything.

you could try this:

<script language="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>



<form name="form1" width=30>

<select name="menu2" size="20" style="font-size:9px" onChange="MM_jumpMenu('parent',this,0)">

                {section var=child loop=$list_items sequence=array}
                    <option value="{$node.node_id}">{$node.name}</option>
                {/section}

</select>
</form>

Sandra Parente

Thursday 07 April 2005 2:37:55 am

Thanks Eivind, but javascript creates many problems to pagelayout and children loop in folder.tpl...
I think I need another solution.

Sandra Parente
www.netbliss.it

Sandra Parente

Friday 08 April 2005 12:52:09 am

Any advice from eZ staff? Perhaps there is no solution?

Sandra Parente
www.netbliss.it

eZ debug

Timing: Jan 20 2025 18:16:37
Script start
Timing: Jan 20 2025 18:16:37
Module start 'content'
Timing: Jan 20 2025 18:16:37
Module end 'content'
Timing: Jan 20 2025 18:16:37
Script end

Main resources:

Total runtime0.1342 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 587.7266180.8359
Module start 'content' 0.00520.0072 768.562597.9922
Module end 'content' 0.01240.1217 866.5547526.8047
Script end 0.1341  1,393.3594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00332.4375200.0002
Check MTime0.00130.9956200.0001
Mysql Total
Database connection0.00070.506810.0007
Mysqli_queries0.089166.39631410.0006
Looping result0.00110.85311390.0000
Template Total0.121390.410.1213
Template load0.00090.676810.0009
Template processing0.120489.753210.1204
Override
Cache load0.00060.451010.0006
Sytem overhead
Fetch class attribute can translate value0.00060.457610.0006
XML
Image XML parsing0.00020.158010.0002
General
dbfile0.00785.8024200.0004
String conversion0.00000.004430.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