|
-
Aug 26th, 2001, 08:16 PM
#1
Thread Starter
PowerPoster
there is using ASP, but i don't think so using javascript.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 27th, 2001, 02:23 AM
#2
I miss my reference, but I think you can get the whole location line (including the ?... part) and then use regular expressions to extract the url. Not sure if you can get the whole line, the rest would work.
All the buzzt
CornedBee
-
Aug 27th, 2001, 09:40 AM
#3
Frenzied Member
in javascript you can,
use the window.location
var path = new String(window.location);
-
Aug 27th, 2001, 11:15 AM
#4
Black Cat
No, HTML is not a programming language. You could map the .htm file extension to some scripting or cgi language so it get processed before it gets served.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Aug 27th, 2001, 09:28 PM
#5
PowerPoster
so how would u parse it out?
(sorry, I'm not too good with javascript.)
-
Aug 27th, 2001, 10:44 PM
#6
Thread Starter
PowerPoster
run it through a loop, going through every character with charAt() until you hit a ?. then set everything after that to a new string.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Aug 28th, 2001, 01:57 AM
#7
it's easier to use this code:
Code:
var newString = oldString.substr(indexof('?'));
not sure if you have to use substr or substring, one uses param 2 for the last character (this is the one you don't want) and one uses param 2 as the length of the substring (this is the one you want, since no second param means from param 1 to end of string)
All the buzzt
CornedBee
-
Aug 29th, 2001, 08:34 AM
#8
Frenzied Member
here's a function that i did a while ago:
Code:
function request(obj){
var position=0;
var fullLength=0;
var value='';
url=new String(location.href);
fullLength=parseInt(url.length);
position=url.indexOf(obj);
if(position==-1 || url.charAt((position+obj.length+1))=='&'){
return '';
}else{
position += obj.length;
do{
position++;
value+=url.charAt(position);
}while(url.charAt((position+1))!='&' && (position+1)!=fullLength);
return unescape(value);
}
}
-
Aug 30th, 2001, 07:08 AM
#9
Frenzied Member
for my function just do:
var returnValue;
returnValue=request("someParam");
if the url is
...?someParam=testing¶m2=nothing
request("someParam") would equal testing
request("param2") would equal nothing
-
Aug 31st, 2001, 01:50 AM
#10
-
Aug 31st, 2001, 01:51 AM
#11
just found out that a & followed by para converts to this sign: ¶
-
Aug 31st, 2001, 07:16 AM
#12
Frenzied Member
-
Aug 31st, 2001, 04:32 PM
#13
Thread Starter
PowerPoster
vbulletin has wierd things like that. i hate when it renders smilies in my code.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Sep 1st, 2001, 10:43 AM
#14
Fanatic Member
That's built into HTML. Like if you write ö you get ö (o umlaut).
Alcohol & calculus don't mix.
Never drink & derive.
-
Sep 3rd, 2001, 02:15 AM
#15
Originally posted by sail3005
vbulletin has wierd things like that. i hate when it renders smilies in my code.
You can switch that off. Just below the message text field is a checkbox that says "disable smilies in this post".
All the buzzt
CornedBee
:) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|