Solved

After submit and redirect to another page I am not getting to get the values from my fields??

Posted on 2006-07-04
5
259 Views
Last Modified: 2008-03-17
Hello Guys,
as you can see in my code, after a submit I am directed to this page "10400.asp", in this page I need to get the value from my fields. When in my page 10400.asp I call the command Request.Form("pedido") or Request.form("consulta") I always get null value, why?


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
      <xsl:template match="/">
      <html>
            <head>
                  <script language="JavaScript1.2" src="js/htlink.js"></script>
                  <link rel="stylesheet" href="css/htlink.css"></link>
                  <title>HT Link - Hidrau Torque</title>
            </head>
            <body onmousemove="overhere()">
            <div id="ToolTip"></div>
            <div id="tudo">
                  <div id="header1">
                        <h1>Consultar Pedidos</h1>
                              <div id="formorcamento">
                              <form name="frm" id="frm" method="post" action="10400.asp" class="orcamento">
                                    <label>Pesquisar Pedido</label>
                                    <input type="text" name="consulta" id="consulta" size="21" tabindex="1" maxlength="14" value="digite o nº da consulta" onFocus="limpa_consulta()" class="campos" />
                                    <label>Ultímas Solicitações</label>
                                    <select name="pedidos" id="pedidos" size="1" tabindex="2" class="select" >
                                          <xsl:for-each select="//pedidos">
                                                <option value="{@pedido}" selected=""><xsl:value-of select="@pedido"/> - <xsl:value-of select="@data"/></option>
                                          </xsl:for-each>
                                    </select>
                                    <input type="submit" name="Submit" value="OK" tabindex="3" class="botao" />
                              </form>
                  </div>
                        <div id="generico">
0
Comment
Question by:hidrau
  • 3
  • 2
5 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 17036664
Hi hidrau,

do you get the option list OK?
Does the element <pedidos> ahve an atttribute pedido
I would not put the selected="" in the loop, since you select all the values that way (which then in turn will not happen)




Cheers!
0
 
LVL 1

Author Comment

by:hidrau
ID: 17037214
Yeah pedidos has an attribute named pedido.
Gertone, Yeah, I identified the problem, it is not in this code but in 10400.asp.

Even though I need your help, when you told me that you wouldn't put the selected="", so, I would like to know what
would you put?
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 17037309
hidrau,
> Even though I need your help, when you told me that you wouldn't put
> the selected="", so, I would like to know what
> would you put?

I would only put that there for the first option in the optionlist
something like this

           <xsl:for-each select="//pedidos">
                <option value="{@pedido}">
                    <xsl:if test="position() = 1">
                        <xsl:attribute name="selected">selected</xsl:attribute>
                    </xsl:if>
                    <xsl:value-of select="@pedido"/> - <xsl:value-of select="@data"/>
                </option>
            </xsl:for-each>
0
 
LVL 1

Author Comment

by:hidrau
ID: 17037448
Thanks Very much
Alex
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 17040337
welcome
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now