View Full Version : ServerVariables Request.WhereFrom
Morgoth
11-30-2002, 09:31 PM
What is the Server Variable to find out where a person came from. What URL it was.
I looked in the list posted (I have it on my server so I can look back to it) but I don't see it there.
Can you help me?
oracleguy
11-30-2002, 10:17 PM
The server variable is HTTP_REFERER
Morgoth
12-01-2002, 01:05 AM
Thank you.
P.S. I don't know why I didn't know that, I am stupid...
:(
Mhtml
12-01-2002, 02:21 AM
I wouldn't go that far, we all forget things from time to time.
:)
whammy
12-01-2002, 03:14 AM
Yup... sometimes I will write pretty elegant code, and then overlook something extremely basic (and once I realize what I overlooked, after pulling my hair out for half an hour, the code works perfectly, lol). Everyone does it. I've seen most of my colleagues do it, too - and for the one's I haven't seen do it, they admit to it as well.
;)
Nobody can possibly know everything about ASP, SQL, JavaScript, or even HTML for that matter (these forums are a great example, I've seen the most knowledgeable people here make basic mistakes on occasion, or lack knowledge in certain areas where others were able to help) - where I work, if I am not totally sure about something, or I need help, I ask questions, and I get asked questions quite a bit as well.
Welcome to the club. :)
oracleguy
12-01-2002, 03:58 AM
I always hate it when I write this huge 'Do While Not rs.EOF' loop and then forget to put before 'Loop', 'rs.MoveNext' and then have the server freeze up.
It's easy to overlook some error and not be able figure out what/where it is because it's just like how you want someone else to proof read something you write for errors; if you write it, you know what it's supposed to say and it's easier to overlook little errors.
whammy
12-01-2002, 04:02 AM
Hehe... I totally agree... although this doesn't solve the "overlooking things you forgot about" problem, I have developed the habit of typing this first:
Do While NOT rs.EOF
rs.MoveNext
Loop
before I put anything in a Do...While loop. :) Actually I do that with everything, even javascript.. i.e. the first thing I do is this:
<script type="text/javascript">
<!--
// -->
</script>
The second thing I do (inside of that) is this:
function () {
}
That might seem silly, but when you can program something like TextPad Clip Libraries, or HTML-KIT plugins, etc. to write all that stuff for you with a click of the mouse the way YOU want it, in YOUR coding style, it really does cut down on errors (not to mention saving time, and beating the heck out of any WYSYWYG editor!). :)
Morgoth
12-01-2002, 04:23 AM
whammy, I do that to, even on the basic if statement:
If (dunno what goes here yet, so...) 0 = 1 Then
Else
End If
And don't get me started on how much tabing and indenting code works! It's beutiful when you use html (just today)
And you write out:
<table>
<tr>
<td>asdasd</td>
</tr>
<tr>
<table>
<tr>
<td>asdfasdf</td>
</tr>
</table>
</tr>
<tr>
<td>asdasd</td>
</tr>
</table>
^^^ See my problem? It took me 10 minutes to figure out I left out the <td> tags for the middle <tr> tags...
whammy
12-01-2002, 04:26 AM
Yeah, see if you had a simple TextPad snippet or something to write out the basic table format, you can't forget that stuff. :) i.e. (straight from textpad with one click!):
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr align="left" valign="top">
<td> </td>
</tr>
</table>
Mhtml
12-01-2002, 04:42 AM
I have snippets and templates in DW mx for everything repetetive.
My database connections if I'm going to create a page when I will be looping I have a template specifcally for that and snippets I just select the snippets and insert it so it's all nice and neat not to mention perfectly coded.:)
forgetting rs.movenext was one of my most frequent stuff-ups.
lol, sometimes I would have my script timeout set heaps high open my page walk off to get a drink or a snack and come back press stop and have thousands of repeating entries and a angry PC. lol
Also in dw mx as soon as you put and ending on a tag it puts in the end tag eg; <table
as soon as you put > you get <table></table>
auto complete is great. And it gives you code suggestions which you just say write half of a connection string and you will get the option to put in the rest.
whammy
12-01-2002, 06:14 AM
That's one thing that annoys me... auto-complete. :)
Some editors (like HTML-KIT) allow you to turn it on and off, and I assume DW MX does as well. I personally prefer to open and complete a tag (if that's what I want to do) with one click. I don't doubt that DW does that as well... but I still have an innate dislike for anything macromedia that's HTML-related at all, probably due to javascript code that looks something like:
function MM_SDOoin78(df,_f5RDs89){
r45y['897d'].MM_ff8789(MM_fyu.56(9f_8));
}
function MM_D3foi0jf3(dw,_rd5f18Es){
f4t7['234r'].MM_d489fd(MM_awe.23(9f_8));
}
:D
Boy, I'm opinionated tonight, huh? :rolleyes:
Morgoth
12-01-2002, 06:55 AM
Auto complete is not the best way to do it..
But I know what is!
In VB 6.0 the editor to make the applications has a drop down box for your objects, and you can choose right there what the auto complete text is or isn't.
Mhtml
12-01-2002, 07:08 AM
That's what I meant.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.