Solved

Can i write a "select" statement in a function..........VERY URGENT...........

Posted on 2003-12-02
48
387 Views
Last Modified: 2008-02-01
I have a Html table that is displayed on the webpage which contains the information of the parent companies The "name" field has an hyper link.This parent companies has many subsidiary companies. So when i click on the "name" which is a hyperlink it should display the record of the subsidiary companies in the form of a table which is stored in the database. So will i be able to write a function to fetch a record from the database? and how is it done...

VERYYYY URGENT.........
0
Comment
Question by:superusers
  • 22
  • 20
  • 2
  • +3
48 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9862431
Can you use a server-side language? That is what you will need to connect to the database.

Fritz the Blank
0
 
LVL 10

Expert Comment

by:NetGroove
ID: 9862446
You have a html page.
On that page is a table of companies.
One column of that table is the name column.
Every name is a link, like this:

<td><a href="thispage.asp?company=IBM">IBM</a></td>

Clicking on the name IBM should reload the asp page and display the clicked name, right?

Ok, in asp part of that page you have to look whether there is a query string and fetch the company with that name.
If company is found, then you display the company record values in form fields or in a <textarea>


0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9862450
So, on your link, you would have something like this:

< a href="showSubsidiary?CompanyID=3">Coke</a>
< a href="showSubsidiary?CompanyID=4">Pepsi</a>

and then you would use the server-side code to grab the company ID as a paremeter to query your database. If you tell me what sort of database it is, and if you can use Active Server Pages, I can provide an example for you.

Fritz the Blank
0
 

Author Comment

by:superusers
ID: 9862955
On my link i have something like this


<td onClick = "Pos_getTableRows()"><a href="#"><%=Pos_RSSelectOrg.fields("Name")%></a></td>

Pos_getTableRows() is a function which get entire row values when clicked on the name
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9863128
Okay, we need to keep clear what happens client-side and server side. So, does  Pos_getTableRows()  accept parameters to limit what rows are returned?

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9863134
We can't do it the way that you have it because the onClick is a client-side event but the Pos_getTableRows() is server-side code.


FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9863142
So what has to happen instead is to see if Pos_getTableRows() can take a parameter to filter the recordset and to change your url so that it passes the proper paramter. The link will then call a new page with results that are returned from the function.

FtB
0
 
LVL 17

Expert Comment

by:Tacobell777
ID: 9863269
Have a look at openwddx.org
I think that will allow you to do what you want.
If you download the package and run the example files it will explain to you how to use it.

It also allows you to pass variables from one programming language to another.
0
 
LVL 7

Expert Comment

by:gam3r_3xtr3m3
ID: 9866309
you can save all data (gotten from database) into a JavaScript Array then building a function to view necessary info immediately. what's your goal on doing your tasks?
0
 

Author Comment

by:superusers
ID: 9867724
how do i get the data from the database. how do i write the select statement using ASP and Javascript. Is it server-side?

As you have told how do i build an JavaScript Arry of the data?

My goal is the retreive the data from the database. and display it in the Text boxes. When i click a hyperlink field in the html talbe i should be able to access the database and and get the recordset of that row and display it in the text fields......

PLease urgent...help me out
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9867812
No matter what approach you take, you have to get the data with server-side code.

One approach is to have your link open a new window. The code on this window will query the database and then display your code.

The other approach is to dump all of your data into a javascript array. Then when you click on the different links, you can query that array to get your values. If you have a lot of data, this will not be a good approach.

Fritz the Blank

0
 

Author Comment

by:superusers
ID: 9868009
can u just send some sample code..plssssss
0
 

Author Comment

by:superusers
ID: 9868318
how do i dump all the data into a javascript array...any sample code.pls
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9868369
What server-side language are you using? ASP with VBScript?

FtB
0
 

Author Comment

by:superusers
ID: 9868488
I am using ASP
0
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 500 total points
ID: 9868756
Okay, without knowing more, it is hard to give you exactly what you need. However, you asked for an example of how I grabbed recordset data and created a client-side javascript array. Here it is:

Response.Write("<SCRIPT LANGUAGE=javascript>" & vbcrlf & "<!--" & vbcrlf)
dim strJavaSQL, numRecordCount, i

strJavaSQL = "select numRecordID, strDescription, strState from lu_FineRegion order by strState, strDescription"
objRSJavaScript.Open strJavaSQL,ojbConnectionJavaScript,adOpenKeyset,adLockOptimistic
numRecordCount = objRSJavaScript.RecordCount
Response.write("arrFine = new Array(" & numRecordCount*3 & ")" & vbcrlf)
for i =0 to numRecordCount - 1
      Response.Write("arrFine[" & i & ".1] = '" & objRSJavaScript("strState") & "'" & vbcrlf)
      Response.Write("arrFine[" & i & ".2] = '" & objRSJavaScript("numRecordID") & "'"  & vbcrlf)
      Response.Write("arrFine[" & i & ".3] = '" & objRSJavaScript("strDescription") & "'"  & vbcrlf)
      objRSJavaScript.movenext
next
objRSJavaScript.close

strJavaSQL = "select numRecordID, strDescription, strState from lu_CoarseRegion order by strState, strDescription"
objRSJavaScript.Open strJavaSQL,ojbConnectionJavaScript,adOpenKeyset,adLockOptimistic
numRecordCount = objRSJavaScript.RecordCount
Response.write("arrCoarse = new Array(" & numRecordCount*3 & ")" & vbcrlf)
for i =0 to numRecordCount - 1
      Response.Write("arrCoarse[" & i & ".1] = '" & objRSJavaScript("strState") & "'" & vbcrlf)
      Response.Write("arrCoarse[" & i & ".2] = '" & objRSJavaScript("numRecordID") & "'"  & vbcrlf)
      Response.Write("arrCoarse[" & i & ".3] = '" & objRSJavaScript("strDescription") & "'"  & vbcrlf)
      objRSJavaScript.movenext
next

if IsObject("objRSJavaScript") then
      if objRSJavaScript.state <> 0 then
            objRSJavaScript.close
      end if
      set objRSJavaScript = Nothing
end if
if IsObject("ojbConnectionJavaScript") then
      if ojbConnectionJavaScript.state <> 0 then
             ojbConnectionJavaScript.close
      end if
      set ojbConnectionJavaScript = Nothing
end if

Response.Write("//-->" & vbcrlf & "</SCRIPT>")
0
 

Author Comment

by:superusers
ID: 9869044
objRSJavaScript.Open strJavaSQL,ojbConnectionJavaScript,adOpenKeyset,adLockOptimistic
what are these?
0
 

Author Comment

by:superusers
ID: 9869070
I am using JavaScript and ASP
0
 

Author Comment

by:superusers
ID: 9869087
I am using JavaScript and ASP so how do i write the code ......i have written one can u just check whether it is correct
<title>ORGANISATION</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="Styles.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">

var arr = new Array()
var arr1 = new Array()
var arr2 = new Array()
var arr3 = new Array()

<% dim sql,rec11 %>
<% sql = "select Name,Address,Phone,Fax from Ecm_Organization" %>
<% set rec11 = ObjConn.execute(sql)%>
<%counter1=0%>
<%while not rec11.eof%>
<% response.write "arr" & "[" & counter1 & "]" & "=" & rec11.fields(0)& ";" %>
<% response.write "arr1" & "[" & counter1 & "]" "=" & rec11.fields(1)& ";" %>
<% response.write "arr2" & "[" & counter1 & "]" "=" & rec11.fields(2)& ";" %>
<% response.write "arr3" & "[" & counter1 & "]" "=" & rec11.fields(3)& ";" %>
<%counter1=counter1+1%>
<%rec11.movenext%>
<%wend%>
<%set rec11= nothing%>
</script>
</head>
0
 

Author Comment

by:superusers
ID: 9869089
I am using JavaScript and ASP so how do i write the code ......i have written one can u just check whether it is correct
<title>ORGANISATION</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="Styles.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">

var arr = new Array()
var arr1 = new Array()
var arr2 = new Array()
var arr3 = new Array()

<% dim sql,rec11 %>
<% sql = "select Name,Address,Phone,Fax from Ecm_Organization" %>
<% set rec11 = ObjConn.execute(sql)%>
<%counter1=0%>
<%while not rec11.eof%>
<% response.write "arr" & "[" & counter1 & "]" & "=" & rec11.fields(0)& ";" %>
<% response.write "arr1" & "[" & counter1 & "]" "=" & rec11.fields(1)& ";" %>
<% response.write "arr2" & "[" & counter1 & "]" "=" & rec11.fields(2)& ";" %>
<% response.write "arr3" & "[" & counter1 & "]" "=" & rec11.fields(3)& ";" %>
<%counter1=counter1+1%>
<%rec11.movenext%>
<%wend%>
<%set rec11= nothing%>
</script>
</head>
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9869155
Okay, so when you run this code, look at your page in the browser and view the source. Paste the result here and I will take a look.

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9869164
I had asked you a few times already what server-side language you were using, but you didn't respond until now. The code that I gave you  was server-side VBScript, and those items you asked about were the recordset parameters.

FtB
0
 

Author Comment

by:superusers
ID: 9869228
i am not able to run the code its giving some error

<title>ORGANISATION</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="Styles.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">

var arr = new Array()
var arr1 = new Array()
var arr2 = new Array()
var arr3 = new Array()

<% dim sql,rec11 %>
<% sql = "select Name,Address,Phone,Fax from Ecm_Organization" %>
<% set rec11 = ObjConn.execute(sql)%>
<%counter1=0%>
<%while not rec11.eof%>
<% response.write "arr" & "[" & counter1 & "]" & "=" & rec11.fields(0)& ";" %>
<% response.write "arr1" & "[" & counter1 & "]" "=" & rec11.fields(1)& ";" %>
<% response.write "arr2" & "[" & counter1 & "]" "=" & rec11.fields(2)& ";" %>
<% response.write "arr3" & "[" & counter1 & "]" "=" & rec11.fields(3)& ";" %>
<%counter1=counter1+1%>
<%rec11.movenext%>
<%wend%>
<%set rec11= nothing%>
</script>
</head>

function getTableRows()
{

var table = document.getElementById('showorginfo');
var allTRs = table.getElementsByTagName("tr");

for (i=0; i<allTRs.length; i++)
{   
allTRs[i].onclick = thistext
}
}


function thistext()
{
     var Testtxt =(this.innerHTML.replace(/<[^>]*>/g,''));
     alert(Testtxt);
     return;
}


function thistext_()
{
     alert(this.innerHTML.replace(/<[^>]*>/g,''));
}

 
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/Workflow_a.gif','images/RiskMgt_a.gif','images/Process_a.gif','images/RiskCon_a.gif','images/reporting_a.gif')">

<%
dim strSelectSql, RSSelectOrg
strSelectSql = "select Id,Name,Address,Phone,Fax,City,Zip,State from Ecm_Organization where LastModifiedBy = '" & session("UserId") & "'"
Set RSSelectOrg = ObjConn.Execute(strSelectSql)
%>

<%
 dim BU_SelectSql, BU_RSSelectOrg
 BU_SelectSql = "Select Org_Id,Name,Speciality,Region,Address,City,State,Zip,Phone,Fax from Ecm_BusinessEntities where LastModifiedBy = '" & session("UserId") & "'"
 set BU_RSSelectOrg = ObjConn.Execute(BU_SelectSql)
 %>
 
 
   
   
   

 
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="MenuBg">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><img src="images/InnTitle.gif" width="283" height="73"></td>
                <td width="100%">&nbsp;</td>
                <td><img src="images/Caps.gif" width="225" height="27"></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><img src="images/spacer.gif" width="10" height="10"></td>
                <td><img src="images/Org_a.gif" width="114" height="29"></td>
                <td><a href="process.htm" onMouseOver="MM_swapImage('Image1','','images/Process_a.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/Process_n.gif" name="Image1" width="114" height="29" border="0" id="Image1"></a></td>
                <td><a href="risk_control.htm" onMouseOver="MM_swapImage('Image2','','images/RiskCon_a.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/RiskCon_n.gif" name="Image2" width="114" height="29" border="0" id="Image2"></a></td>
                <td><a href="work_flow.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image18','','images/Workflow_a.gif',1)"><img src="images/Workflow_n.gif" name="Image18" width="114" height="29" border="0"></a></td>
                <td><a href="risk_manage.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image19','','images/RiskMgt_a.gif',1)"><img src="images/RiskMgt_n.gif" name="Image19" width="138" height="29" border="0"></a></td>
                <td><a href="reporting.htm" onMouseOver="MM_swapImage('Image3','','images/reporting_a.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/reporting_n.gif" name="Image3" width="114" height="29" border="0" id="Image3"></a></td>
                <td width="100%">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td bgcolor="#E9EEF3" class="WelNote"><img src="images/spacer.gif" width="10" height="21" align="absmiddle">
           
        </tr>
        <tr>
          <td bgcolor="#4D74A1" class="LaySubMenu"><span class="LaySubMenuActive"><img src="images/spacer.gif" width="10" height="21" align="absmiddle">
            ORGANIZATION</span> | <a href="Org_Positions.asp">POSITION/ROLE</a>
            | <a href="Org_bpo.asp">BPO</a> </td>
        </tr>
      </table>
     
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" valign="top" class="MainArea"> <form name="OrgForm" id="organisationForm" method="post" action="">
     
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="MainHead">Organization Entry</td>
          </tr>
          <tr>
            <td class="SubArea"><table width="100%" border="0" cellpadding="1" cellspacing="2" class="FormBg">
                <tr class="LableName">
                  <td>*Name<br> <input name="Org_name" type="text" class="TextField" size="25">
                  </td>
                  <td>City<br> <input name="Org_City" type="text" class="Field" size="25"></td>
                </tr>
                <tr class="LableName">
                  <td>Address<br> <input name="Org_Addr" type="text" class="Field" size="25"></td>
                  <td>State<br> <input name="Org_state" type="text" class="Field" size="25"></td>
                </tr>
                <tr class="LableName">
                  <td>Main Phone Number<br> <input name="Org_PhNum" type="text" class="Field" size="25"></td>
                  <td>Zip<br> <input name="Org_Zip" type="text" class="Field" size="25"></td>
                </tr>
                <tr class="LableName">
                  <td>Main Fax Number<br> <input name="Org_FaxNum" type="text" class="Field" size="25"></td>
                  <td>Country<br> <input name="Org_Country" type="text" class="Field" size="25"></td>
                </tr>
                <tr class="Row1">
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr class="Row1">
                  <td colspan="2" align="center"><input name="Button" type="button" class="MainButton" value="New" onClick="return onClickNew();">
                    <input name="Submit2" type="button" class="MainButton" value="Save">
                    <input name="Submit3" type="button" class="MainButton" value="Delete">
                    <input name="Submit4" type="reset" class="MainButton" value="Reset"></td>
                </tr>
              </table></td>
          </tr>
        </table>
        <br>
        <table id="showorginfo" width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="MainHead">Organization</td>
          </tr>
          <tr>
            <td class="SubArea"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="FormBg">
                <tr >
                  <td class="FielsName"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                      <tr class="TblHead">                      
                       <td>Name</td>
                        <td>Address<br></td>
                        <td>City<br></td>
                        <td>State<br></td>
                        <td>Zip<br></td>
                        <td>Phone </td>
                        <td>Fax</td>
                      </tr>
                  <%  While not (RSSelectOrg.EOF)%>
                      <tr class="Row1">
                       <td onClick= "getTableRows()"><a href="#"><%=RSSelectOrg.fields("Name")%> </a> </td>
                        <td><%=RSSelectOrg.fields("Address").value%></td>
                        <td><%=RSSelectOrg.fields("City")%></td>
                        <td><%=RSSelectOrg.fields("State")%></td>
                        <td><%=RSSelectOrg.fields("Zip")%></td>
                        <td><%=RSSelectOrg.fields("Phone")%></td>
                        <td><%=RSSelectOrg.fields("Fax")%></td>
                      </tr>
                                <% RSSelectOrg.MoveNext
                                wend
                                %>
                    </table>                    
                  </td>
                </tr>
              </table></td>
          </tr>
        </table>
        <br>
        <table id="BusUnit" width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="MainHead">Business Unit/Division Entry</td>
          </tr>
          <tr>
            <td class="SubArea"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="FormBg">
                <tr>
                  <td class="FielsName"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                      <tr class="TblHead">
                       
                        <td>BU Name<br></td>
                        <td>Specialty<br></td>
                        <td>Region</td>
                        <td>Address</td>
                        <td>State<br></td>
                        <td>City<br></td>
                        <td>Zip</td>
                        <td>Phone </td>
                        <td>Fax</td>
                      </tr>
                    <%
                           While not (BU_RSSelectOrg.EOF)
                                 %>
                                  <tr class="Row1">
                         <td onClick="alert (self.value);"><a href="#"><%=BU_RSSelectOrg.fields("Name")%></a></td>
                        <td><%=BU_RSSelectOrg.fields("Speciality")%></td>
                        <td><%=BU_RSSelectOrg.fields("Region")%></td>
                        <td><%=BU_RSSelectOrg.fields("Address")%></td>
                        <td><%=BU_RSSelectOrg.fields("City")%></td>
                        <td><%=BU_RSSelectOrg.fields("State")%></td>
                        <td><%=BU_RSSelectOrg.fields("Zip")%></td>
                        <td><%=BU_RSSelectOrg.fields("Phone")%></td>
                        <td><%=BU_RSSelectOrg.fields("Fax")%></td>
                      </tr>
                                <% BU_RSSelectOrg.MoveNext
                                wend
                                %>                      
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="center" class="Row1"><input name="Button2" type="button" class="MainButton" onClick="MM_openBrWindow('Business%20Unit.htm','','width=800,height=300')" value="New">
                          <input name="Submit22" type="button" class="MainButton" value="Delete">
                          <input name="Submit32" type="button" class="MainButton" value="Copy">
                          <input name="Submit42" type="reset" class="MainButton" value="Cancel"></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:superusers
ID: 9869248
can i write the server side <% %> code inside a function
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9869253
>>i am not able to run the code its giving some error<<

You might want to be more specific. I cannot run the code here since I don't have your database.

Also, I am more of a VBScript person for server-side code, so I may not be able to help you as much.

Fritz the Blank

0
 

Author Comment

by:superusers
ID: 9869294
oho! thats ok......
0
 
LVL 17

Expert Comment

by:Tacobell777
ID: 9869535
did you have a look at www.openwddx.org I thought this was urgent?
0
 

Author Comment

by:superusers
ID: 9870098
i have to.coz...there are too many files
0
 

Author Comment

by:superusers
ID: 9870125
i see that the files are XML but i want JavaScript and ASP
0
 

Author Comment

by:superusers
ID: 9870131
any idea how to fetch the records from the database and put it in an array in the Javascript and disply in the text fields
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9870199
@Superusers:

If you show me some sample code of how you would take the values from your recordset and write a table, I will help you to make it write the JavaScript array instead.

FtB
0
 

Author Comment

by:superusers
ID: 9870252
This is how i do

<%
dim strSelectSql, RSSelectOrg
strSelectSql = "select Id,Name,Address,Phone,Fax,City,Zip,State from Ecm_Organization where LastModifiedBy = '" & session("UserId") & "'"
Set RSSelectOrg = ObjConn.Execute(strSelectSql)
%>


<%  While not (RSSelectOrg.EOF)%>
                      <tr class="Row1">
                       <td onClick= "getTableRows()"><a href="#"><%=RSSelectOrg.fields("Name")%> </a> </td>
                        <td><%=RSSelectOrg.fields("Address").value%></td>
                        <td><%=RSSelectOrg.fields("City")%></td>
                        <td><%=RSSelectOrg.fields("State")%></td>
                        <td><%=RSSelectOrg.fields("Zip")%></td>
                        <td><%=RSSelectOrg.fields("Phone")%></td>
                        <td><%=RSSelectOrg.fields("Fax")%></td>
                      </tr>

0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9870288
Okay one more thing: is there a company ID or something like that? In other words, what is the link between the company and the subsidiaries?

FtB
0
 

Author Comment

by:superusers
ID: 9870618
It is the Org_Id. that is the primary key.
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9875139
So it might look something like this:

<%
While not (RSSelectOrg.EOF)
    =("arrCompanies[" & i & ".1] = '" & RSSelectOrg("Org_Id") & ";'")
    =("arrCompanies[" & i & ".2] = '" & RSSelectOrg("Name") & ";'" )
    RSSelectOrg.MoveNext
Wend
%>


Fritz the Blank
0
 

Author Comment

by:superusers
ID: 9878308
how do i access the recordsets in the database....any idea? after getting then only i can populate it in an array...

Pleas...........help me out
0
 

Author Comment

by:superusers
ID: 9878316
what does request.QueryString() do? Any idea........can that be used to fetch the recordset when clicked on the hyperlink
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9878400
Please don't take what I am going to say the wrong way, but if you don't know what request.QueryString() does, you may not have the experience necessary to implement the suggestions posted here.

Have you considered hiring a freelancer to help you with this?

Fritz the Blank
0
 

Author Comment

by:superusers
ID: 9878445
You are right...i don't have any prior experience with this..i am very new to this...so i am finding it very tough...:)

if u know......why don't u tell me.what does that mean.
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9882507
Let's say that you have two pages, and the second page is this:

http://www.fairfieldconsulting.com/processform.asp


So, let's say that on the first page, I have a hyperlink, and it goes like this:

http://www.fairfieldconsulting.com/processform.asp?strFirst=Fritz&strMiddle=the&strLast=Blank

The querystring on the url above is ?strFirst=Fritz&strMiddle=the&strLast=Blank

So if on processform.asp page, I do this:

<%
Response.write(Request.QueryString("strFirst") & "<br />"
Response.write(Request.QueryString("strMiddle") & "<br />"
Response.write(Request.QueryString("strLast") & "<br />"
%>

That will result in:

Fritz
the
Blank


Does that make sense?
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9897625
Okay, if there is nothing else, it is time to close this question out. Please select the comment that helped you the most as an answer.

Fritz the Blank
0
 

Author Comment

by:superusers
ID: 9899094
should i select one??????
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9899271
Well, if you feel that you haven't been helped here at all, please let me know....

It just seems that you had a number of questions, and I did my best to answer as many of them as I could for you.

Fritz the Blank
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9899293
To review:

1) I explained how you were running into problems with server-side versus client-side code
2) I showed you how to write out a client-side array with server-side code
3) I answered your questions about the use of Request.QueryString

Fritz the Blank
0
 

Author Comment

by:superusers
ID: 9899522
thanks..for your help..You have answered almost many questions
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9900893
Glad to have helped. Please be sure to close out the question.

Fritz the Blank
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10394273
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: fritz_the_blank {http:#9868756}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now