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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 21:07:05
Script start
Timing: Jan 18 2025 21:07:05
Module start 'layout'
Timing: Jan 18 2025 21:07:05
Module start 'content'
Timing: Jan 18 2025 21:07:06
Module end 'content'
Timing: Jan 18 2025 21:07:06
Script end

Main resources:

Total runtime0.9488 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.9141152.6250
Module start 'layout' 0.00610.0060 740.539139.4609
Module start 'content' 0.01210.9350 780.0000565.9609
Module end 'content' 0.94710.0016 1,345.960916.1641
Script end 0.9488  1,362.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3775160.0002
Check MTime0.00150.1529160.0001
Mysql Total
Database connection0.00080.084210.0008
Mysqli_queries0.886093.3829630.0141
Looping result0.00100.1005610.0000
Template Total0.903595.220.4517
Template load0.00290.301320.0014
Template processing0.900694.918020.4503
Template load and register function0.00010.011410.0001
states
state_id_array0.00110.118810.0011
state_identifier_array0.00140.144720.0007
Override
Cache load0.00250.2620230.0001
Sytem overhead
Fetch class attribute can translate value0.00040.046420.0002
Fetch class attribute name0.00080.081470.0001
XML
Image XML parsing0.00090.098220.0005
class_abstraction
Instantiating content class attribute0.00000.0019100.0000
General
dbfile0.00100.1079220.0000
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs