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
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

622 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