Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have learned more through this forum than I did on a two day course. Thanks to everyone for their help and other postings that I have found useful..."

Geography

Where in the world do Tek-Tips members come from?
aitai (MIS)
27 Nov 01 16:53
Hi, All

I get the following error when I use the get/post method to pass information between files:

-----
HTTP POST Request: http://127.0.0.1/Development/Programming/WmlDev/Exercise/Chap
ter18/TryAgain.asp?0oc=106
Checking for URL '127.0.0.1/Development/Programming/WmlDev/Exercise/Chapter18/Tr
yAgain.asp?0oc=106' in Whitelist not found
POST Data:
UserID=a&Password=s

HTTP Error: 500
-----

This error only occurs with ASP(VBScript), and not with ASP(JScript). I am using the Phone.com's

4.1 simulator with IIS 5.0 on WIN2K. I would greatly appreciate any insight into this

problem-Thanks in advance! Below are the two files that I am using. File 1:

-----
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml";>

<!--
Name:        Login.wml
Author:        Ivan Vandermerwe
Description:    Sending data in HTTP request using WML
Type:        
Created:    11.21.01
UpDated:     FileUpdated, UpdatedByWho,UpdatedWhat
-->

<wml>
    
    <card id="login" title="Login">
        <p>
            Name=$(UserID)
            <br />
            Password=$(Password)
            <br />
            <a href="#Details" title="Edit" >Edit Details</a>
            <br />
            Send data via:
            <br />
                <anchor title="GET">
                GET
                    <go href="Login.asp" method="get">
                        <postfield name="UserID" value="$(UserID)" />
                        <postfield name="Password" value="$(Password)" />
                    </go>
                </anchor>
                <br />
                <anchor title="POST">
                POST
                    <go href="Login.asp" method="post">
                        <postfield name="UserID" value="$(UserID)" />
                        <postfield name="Password" value="$(Password)" />
                    </go>
                </anchor>        
        </p>
    </card>
    
    <card id="Details" title="Edit Details">
        <p>
            Enter Name:
                <input name="UserID" title="Name" />
                <br />
            Enter Password:
                <input name="Password" title="Password" />
            <a href="#login" title="Done">Done</a>
        </p>
    </card>
    
</wml>
-----

File 2:
-----
<%@ language="vbscript" %>
<% Response.ContentType="text/vnd.wap.wml" %>
<?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"

"http://www.wapforum.org/DTD/wml_1.1.xml";>

<!--
Name:        Login.asp
Author:        Ivan Vandermerwe
Description:    Sending data in HTTP request using WML
Type:        
Created:    11.21.01
UpDated:     FileUpdated, UpdatedByWho,UpdatedWhat
-->

<wml>
    
    <head>
        <meta forua="true" http-equiv="Pragma" content="no-cache" />
        <meta forua="true" http-equiv="Cache Control" content="no-cache,must-revalidate"

/>
    </head>

    <%         
        if (Request.QueryString("UserID").Count == 1)
            {
                UserID = Request.QueryString("UserID")
                Password = Request.QueryString("Password")
                MethodUsed = "GET"
            }
            
        if (Request.Form("UserID").Count == 1 )
            {
                UserID = Request.Form("UserID")
                Password = Request.Form("Password")
                MethodUsed = "POST"
            }
                    
        if (UserID == "")
            {
     %>
                <card id="Result" title="Error!">
                    <p>
                        You must enter a user name!
                    </p>
    <%
            }
            else
                {
                    if ((UserID == "Ivan") && (Password == "aitai"))
                        {
     %>
                            <card id="Result" title="Welcome!">
                                <p>
                                    Hello, Ivan Vandermerwe!
                                <br />
    <%
                        }
                        else
                            {    
     %>
                                 <card id="Results"

title="Sorry!">
                                    <p>
                                        <%

Response.Write(UserID) %> invalid!
                                <br />
    <%
                            }
     %>
             HTTP method used is: <% Response.Write(MethodUsed) %>
         </p>
    <%
        }
     %>
     
        <do type="prev" label="Back">
            <prev />
        </do>
    </card>
    
</wml>
-----

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close