ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 10th, 2003, 11:07 PM
sparky145 sparky145 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 3 sparky145 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Search engine posting to a form

I don' know if this is possible but hear it goes. The following is a support client that I am trying to create. What I want to do is have the search by id field find a ticket by the ticket ID and then post the information into to the form. The user will then be able to edit the existing ticket if he/she needs to or just look at an issue that is he/she is currently working on.

Is it possible to post data into a textbox? The search engine part shouldn't be to hard to create it's just getting the ticket info to post into the form on the same page that I don't know how to do.

The tables look like this

tContact
contactid
firstname
lastname

tTicket
ticketID
contactID
urgency
description
probdescription
probresolution

The support client. Thanks Sparky

<%
Option Explicit

' Let's populate a dropdown with the User Names from
' UserInfo table where UserID 3 should be selected
' in the dropdown

Dim SelectedUserID
SelecteduserID = 4

' We will make a call to Sub Routine PopulateDropDown
' which will select all users from UserInfo table and
' populate a dropdown. This sub routine will also check
' for selected user and marked as SELECTED

Call PopulateDropDown( SelectedUserID )

' *********************************
' Populate Drop Down Sub Routine
' *********************************
Sub PopulateDropDown(byVal SelectedUserID)
Dim objConn
Dim objRS
Dim strSQL
Dim contactID
Dim firstname

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1

Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")

objConn.Open "Provider=SQLOLEDB; Data Source=SPARKDLE-LPSJXL; Initial Catalog=LogIN; User Id=sa; Password=sa"

strSQL = "SELECT contactID, firstname FROM tContact"

objRS.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>:::SPARKDELICIOUS SUPPORT::: </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
<TABLE border=1 width=100% height=100%>

<tr>
<TD height=>
<table width =90% height=95% border=1 align=center>
<br>
<tr align=middle>
<td valign=middle>


<TABLE width=100% border=1>
<TR>
<TD width=15%>SEARCH BY ID</TD>
<td><INPUT TYPE="text" NAME="userID"><INPUT TYPE="submit" name="Submit"></td>
<td>SEARCH BY SUBJECT
<td align=right><INPUT TYPE="text" NAME="userID"><INPUT TYPE="submit" name="Submit"></td>
<TR>
<TD width=15%>SEARCH BY CONTACT</TD>
<td align=left><INPUT TYPE="text" NAME="userID"><INPUT TYPE="submit" name="Submit"></td>
<td> &nbsp;</td>
<td align=right><INPUT TYPE="submit" name="NEW" value="New Ticket"></td>

<form name="Search" method="Post" action="addticket.asp">
<TABLE width=100% border=1>
<TR>
<TD width=15%>TICKET ID</TD>
<TD><INPUT TYPE="text" NAME="ticketID" ></TD>
</TR>
<TR>

<%

Response.Write "<TD width=""15%"">CONTACT</td>"
Response.Write "<TD><SELECT Name=""firstname"">"
Response.Write "<OPTION Value=""""></OPTION>"

' Loop through the recordset and populate the dropdown
Do Until objRS.EOF = True
contactID = objRS("contactID").Value
firstname = objRS("firstname").Value

If contactID = SelectedUserID Then
Response.Write "<OPTION Value=""" & contactid & """ SELECTED>"
Response.Write firstname
Response.Write "</OPTION>"
Else
Response.Write "<OPTION Value=""" & contactid & """>"
Response.Write firstname
Response.Write "</OPTION>"
End If

objRS.Movenext
Loop

Response.Write "</SELECT>"

objRS.Close
Set objRS = Nothing
Set objConn = Nothing
End Sub

%>

<form>
<TD width=70% valign=top><INPUT type="button" value="New Contact" onClick="window.open('add_contact.asp','mywindow','width=400,height=200,left=350,top=200,screenX=350,screenY= 200,')">
</form>








</TR>
<TR>
<TD width=15%>VERSION</TD>
<TD><SELECT NAME="a-menu">
<OPTION> 4.0
<OPTION> 5.2
<OPTION> 6.0
</SELECT>
</TD>
</TR>
<TR>



<TD width=15%>URGENCY</TD>
<TD><SELECT NAME="urgency">
<OPTION>Low
<OPTION>Meduim
<OPTION>High</TD>

<TR>







<TD width=15%>ASSIGNED TO</TD>
<TD><INPUT TYPE="text" NAME="userID">
<TR>
<TD width=15%>COMPLETED BY</TD>
<TD><INPUT TYPE="text" NAME="userID"></td></td>

<TABLE width=100% height=50% border=1>
<TR>
<TD height=25 colspan=2>
<table width=100% height=10% border=1>


<TR>
<TD width=15%>SUBJECT</TD>
<TD><INPUT TYPE="text" NAME="description" SIZE=113></TD>

</TR>
<table width=100% height=100% border=1>
<tr>
<td height=25>PROBLEM DESCRIPTION
<td>PROBLEM RESOLUTION

<TR> <INPUT TYPE="submit">

<TD width=50% valign=top><TEXTAREA NAME="probdescription" ROWS="8" COLS="48"></TEXTAREA></TD>

<TD width=50% valign=top><TEXTAREA NAME="probresolution" ROWS="8" COLS="48"> </TEXTAREA></TD>
<tr>
</TABLE>








</BODY>
</HTML>

Reply With Quote
  #2  
Old June 11th, 2003, 09:28 PM
mohecan mohecan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 212 mohecan User rank is Private First Class (20 - 50 Reputation Level)mohecan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
You use the value property for your textbox

i.e.
Code:
<input type="textbox" name="ticket" value="<%=Request.Form("ticket")%>"

This defaults the text displayed in the textbox to the form value.
You may need to work this around a bit, but I hope gives you the general idea.
__________________
How can I soar like an eagle when
I'm flying with turkey's?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Search engine posting to a form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway