Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

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

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
hidrau
Asked:
hidrau
  • 3
  • 2
1 Solution
 
Geert BormansCommented:
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
 
hidrauAuthor Commented:
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
 
Geert BormansCommented:
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
 
hidrauAuthor Commented:
Thanks Very much
Alex
0
 
Geert BormansCommented:
welcome
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now