[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

01/30/2003 at 08:26AM PST, ID: 20489507
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.8

problems populating form data from database

Asked by gpyper in Active Server Pages (ASP)

Tags: objsql

I'm using the following code to pull productnames and extensions of the products into a form, and I want to submit the data back to the database later.

The problem is with this bit of code

<option value="location.href='existingRecord.asp?str=<%=objRS("ProductName")%>'" <%if request.querystring("str")=objRS("ProductName") then response.write "selected" end if%>> <%=objRS("ProductName")%></option>

in the source of the working page the Value of the string ends up apearing as a large string including "location.href='existingRecord.asp?str=<%" instead of just the ProductName.

Can anything be done to fix this?
And is there a way of getting around the page submitting to itself? can this be done in the background?

 




 <td>Product Type&nbsp;<%
Dim ConnString
ConnString = "DSN=DBSERVER;uid=dba;pwd=test"
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = ConnString
objConn.Open
%>
<%
dim objSQL, objRS
objSQL = "select ProductName from SerialRanges where Status = 'A' and PType ='x' "
set objRS = objConn.execute(objSQL)
%>
<script language="Javascript">
function doSel(obj)
{
  for (i = 0; i < obj.length; i++)
     if (obj[i].selected == true)
       eval(obj[i].value);
}
</script>
<select name="ProductName" Class="form" onchange="doSel(this)">
<%
do while not objRS.EOF
%>
<option value="location.href='existingRecord.asp?str=<%=objRS("ProductName")%>'" <%if request.querystring("str")=objRS("ProductName") then response.write "selected" end if%>> <%=objRS("ProductName")%></option>
<%
objRS.movenext
loop
%>
</select>
<%
objRS.close
set objRS = nothing
%>
</td>
    <td>Units <input type="text" name="Units" size="5" class="form"></td>
    <td>From: XX-XX-XXXX To:  XX-XX-XXXX </td>
</tr>
</table>
</td>
</tr>
<tr>
    <td colspan="2"><table class="cellborder_content3" width="100%" cellspacing="0" cellpadding="3" border="0">
     <tr><td class="cellborder_content3_purple">Extensions</td></tr></table>
     <table class="cellborder_content3" width="100%" cellspacing="0" cellpadding="3" border="0">
     <tr>
<%
if request.querystring("str") <> "" then

Dim objConn1
Set objConn1 = Server.CreateObject("ADODB.Connection")
objConn1.ConnectionString = ConnString
objConn1.Open
%>
<tr><td width="33%">Name</td><td width="33%">Units</td><td width="33%">Expiery Date</td></tr>
<%
dim objSQL1, objRS1
objSQL1 = "select ProductName from SerialRanges where PType = '" & request.querystring("str") & "'"
set objRS1 = objConn1.execute(objSQL1)
do while not objRS1.EOF
%>

 <tr>  <td><input type="checkbox" name="chkbox" value="<%=objRS1("ProductName")%>"><%=objRS1("ProductName")%></td>
   <td><input type="text" name="<%=objRS1("ProductName")%>Units" size="5" class="form"></td>
   <td><input class="form" name="<%=objRS1("ProductName")%>ExpieryDate" type="text" size="10" /> <a href="javascript:calendar_window=window.open('calendar.aspx?formname=license_activation.<%=objRS1("ProductName")%>ExpieryDate','calendar_window','width=154,height=188');calendar_window.focus()"><img src="images/calendar.gif" width="22" height="17" alt="" border="0"></a></td></tr>
<%
objRS1.movenext
loop

objRS1.close
set objRS1 = nothing
end if
%>

<%
objConn.close
set objConn  = nothing
%>
[+][-]01/30/03 08:29 AM, ID: 7846842

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 08:33 AM, ID: 7846867

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 08:36 AM, ID: 7846887

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 08:37 AM, ID: 7846898

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 08:40 AM, ID: 7846921

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 08:46 AM, ID: 7846972

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 08:48 AM, ID: 7846991

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 08:49 AM, ID: 7847001

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 09:26 AM, ID: 7847289

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 09:54 AM, ID: 7847493

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 09:57 AM, ID: 7847517

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 10:01 AM, ID: 7847543

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 10:29 AM, ID: 7847774

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 11:08 AM, ID: 7848047

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 11:09 AM, ID: 7848053

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 01:41 PM, ID: 7848982

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 01:56 PM, ID: 7849071

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/30/03 04:58 PM, ID: 7850039

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 05:07 PM, ID: 7850086

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: objsql
Sign Up Now!
Solution Provided By: gladxml
Participating Experts: 9
Solution Grade: A
 
 
[+][-]01/30/03 06:15 PM, ID: 7850341

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 07:45 PM, ID: 7850568

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 09:19 PM, ID: 7850968

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/30/03 10:20 PM, ID: 7851161

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/31/03 06:39 AM, ID: 7853350

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/31/03 06:40 AM, ID: 7853357

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/31/03 06:50 AM, ID: 7853426

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91