Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > bubble sort!?

Thread Tools

bubble sort!?
Posts: n/a
So heres the deal...
I work for a company in which numbers are dropping. The owners created
a game where calling potential clients racks up points for crap like
basketball ticekts and such. The owners called upon me to develop a
system where users could enter information to list user name, data
stamp it, and then add form data such as the person they called and if
it was a cold call or not. All that was pretty easy. Oh, by the by, I
had never programmed anything prior to this. I was strictly html. So I
made the game... Users enter data, gets dropped into a csv in our
_private folder. Then I made it so that the data can be read in html
format, simple fso... Well not for me, but I got it to work... So now,
the owner wants this list to be sortable by the last name of the
This is where I have the problem.
You see, I have a boss, a programmer. He is in Canada where as I am in
California. He is far to busy to assist me, and his teaching methods
consist of telling me one key word, and leaving me to google the hell
out of it. So his key work was bubble sort.
Now I have been playing with this for,,, well over a week now (a few
days past deadline) and I cannot get it to work properly.
I can get bubble sort to work on an array of pre-defined data...
My problem( which I have taken forever to get to, sorry) is that I need
to get it to look at the whole csv, find out where the eof is, then
read up from there...
I have no idea how to do this, and no jedi like mentor to ask
assistance. I ask for help and either get harped at or a "lol"... Its
getting old...

Here is the code for the game
<script language="vbscript">
sub referrals_onchange()
DIM intCounter
for intCounter = 1 to 5
if CInt(document.all.item("referrals").value) >= intCounter

document.all.item("referral_"&intCounter).style.di splay="block"
end if
end sub

<table border="1" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111"
id="AutoNumber1" bgcolor="#C0C0C0">
<td width="100%" colspan="3">

<img src="../images/1newbanner.jpg" width="513" height="57"><form
method="POST" name="FrontPage_Form1" action="--WEBBOT-SELF--"
<!--webbot bot="SaveResults" u-file="../_private/game.csv"
s-format="TEXT/CSV" s-label-fields="TRUE" b-reverse-chronology="FALSE"
s-date-format="%d-%m-%Y" s-time-format="%I:%M:%S %p"
s-builtin-fields="Date Time" startspan --><input TYPE="hidden"
NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan
i-checksum="43374" --><p>
<font face="Arial" size="2" color="#000066">Welcome
<!--webbot bot="HTMLMarkup" startspan --><span
id="lblCurrentUserName"></span><!--webbot bot="HTMLMarkup" endspan
<font face="Arial"><font size="2" color="#000066">Please enter
the name of the agent with whom you made contact:<br>
First Name: </font><font color="#000066">
<!--webbot bot="Validation" s-data-type="String"
b-allow-letters="TRUE" i-maximum-length="15" --><input type="text"
name="agentFname" size="20" maxlength="15"></font><font size="2"
Last Name: </font><font color="#000066">
<!--webbot bot="Validation" s-data-type="String"
b-allow-letters="TRUE" i-maximum-length="20" --><input type="text"
name="agentLname" size="20" maxlength="20"></font></font></p>
<font face="Arial"><font size="2" color="#000066">Please enter
the agents phone number:<br>
</font><font color="#000066">
<!--webbot bot="Validation" s-data-type="Number"
s-number-separators="x." b-value-required="TRUE" i-minimum-length="10"
i-maximum-length="10" --><input type="text" name="agentNumber"
size="20" maxlength="10"></font><font size="2" color="#000066">
( </font><font size="1" color="#FF0000">must have 10 digits
</font><font size="2" color="#000066">
<font face="Arial"><font size="2" color="#000066">What is the
agents e-mail address:<br>
</font><font color="#000066">
<input type="text" name="agentEmail" size="40"></font></font></p>
<font face="Arial"><font size="2" color="#000066">Please select a
category which best describes the agent with whom you made
Active Agent </font><font color="#000066"> <input type="radio"
value="active" checked name="agentType"></font><font size="2"
Inactive Agent </font><font color="#000066"> <input type="radio"
name="agentType" value="inactive"></font><font size="2"
Call</font><font color="#000066"><input type="radio"
name="agentType" value="cold"></font></font></p>
<font face="Arial" color="#000066" size="2">How many referrals
this agent
give you?<br>
<select size="1" name="referrals">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<input type="text" name="referral_1" size="20"
<input type="text" name="referral_2" size="20"
<input type="text" name="referral_3" size="20"
<input type="text" name="referral_4" size="20"
<input type="text" name="referral_5" size="20"
<font color="#000066" face="Arial"><input type="submit"
value="Submit" name="B1"><input type="reset" value="Reset"
<input type="hidden" name="uname" value="hidden">


<iframe src="date_user.asp" width="80%" height=100 frameborder=0
scrolling=no name="date_time" styke="display: none">


this is the code for data_user.asp
<script language="vbscript">

dim txtUserName
txtUserName = "<% = (Session("UserName")) %>"

Sub window_onload()
window.parent.document.all.item("uname").value = txtUserName
window.parent.document.all.item("lblCurrentUserNam e").InnerText =
end sub


this is the admin page i am trying to create

<b><font color="#000066" face="Arial">Marketing Contest Results
set fso = createobject("scripting.filesystemobject")
set act = fso.opentextfile(server.mappath(csv_to_read))
imported_text = act.readline
imported_text = replace(imported_text,chr(13),",")
imported_text = replace(imported_text,chr(34),"")
total_imported_text = act.readall
total_imported_text = replace(total_imported_text,chr(13),",")
total_imported_text = replace(total_imported_text,chr(34),"")
<table width="100%"border="1" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" >

for table = 0 to num_imported -1

<td width="<% response.write 100/(num_imported) 'make the cell widths
even %>%"bgcolor="#C0C0C0">
<font face="Arial" size="1" color="#000066">
<b><%= split_text(count) %></b>
<font face="Arial" size="1" color="#000066">
'Reset the counter
for tablea = 0 to (total_num_imported/ (num_imported)-1)
for table = 0 to num_imported -1

<td width="<%= 100/(num_imported) %>%">

<font face="Arial" size="1" color="#000066">
<%= total_split_text(count)


next ' end of the observation
<% next 'end of the csv %>

so there it is...
I no Im lame...
I have no idea how to do any of this, but do not remember it being in
my job description either.
Either way, I have to learn or Im gone...
All advice will be appreciated.
Thanks very much,
- joe

Reply With Quote

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: C++ priority queue with bubble-up and bubble-down? mlimber C++ 0 08-05-2008 06:53 PM
Connectivity Bubble =?Utf-8?B?QnJpYW4=?= Wireless Networking 4 01-08-2006 10:17 PM
Obnoxiouis bubble telling me I'm connected itemyar Wireless Networking 0 12-20-2005 09:42 PM
How do you check the value of a datalist item within the Daalist bubble. Mark Sandfox ASP .Net 0 03-04-2004 07:44 PM
tool to draw FSM bubble diagram Ingmar Seifert VHDL 5 08-01-2003 06:13 PM