Connecting Tech Pros Worldwide Help | Site Map

How to post a url..

KPR
Guest
 
Posts: n/a
#1: Jul 27 '06
I am looking for a way to create an URL shortcut for IE that will grab
the current displayed url and post it to a remote website..

I figured out how to grab the current url, but I am having trouble
figuring out how to have the script post that data to a waiting website
without redirecting the page..

Any ideas??

Vincent van Beveren
Guest
 
Posts: n/a
#2: Jul 27 '06

re: How to post a url..


KPR wrote:
Quote:
I am looking for a way to create an URL shortcut for IE that will grab
the current displayed url and post it to a remote website..
>
I figured out how to grab the current url, but I am having trouble
figuring out how to have the script post that data to a waiting website
without redirecting the page..
>
Any ideas??
>
What are you trying to do???

Anyway, maybe you could create a HttpRequest object and send your info
that way?

Vincent
KPR
Guest
 
Posts: n/a
#3: Jul 27 '06

re: How to post a url..



Vincent van Beveren wrote:
Quote:
KPR wrote:
Quote:
I am looking for a way to create an URL shortcut for IE that will grab
the current displayed url and post it to a remote website..

I figured out how to grab the current url, but I am having trouble
figuring out how to have the script post that data to a waiting website
without redirecting the page..

Any ideas??
>
What are you trying to do???
>
Anyway, maybe you could create a HttpRequest object and send your info
that way?
>
Vincent
I am behind a firewall/proxy at work so most of the sites I goto don't
work..

So I want to be able to bookmarks URLs on my server at home for later
visits.. I am tired of doing the old email cut and paste.. I took a
look at toread.cc but it does a redirect thing and its email ( which we
all get too much of )..

So I figured a javascript embeded in a shortcut to grab a url and post
it to a php webpage to parse the data and write it to a mysql db..

Kevin

Richard Cornford
Guest
 
Posts: n/a
#4: Jul 27 '06

re: How to post a url..


KPR wrote:
<snip>
Quote:
So I want to be able to bookmarks URLs on my server at home for later
visits..
<snip>

Simplest would be to create an Image object:-

var img = new Image();

- and then put your server URL into its - src - property:-

img.src = "http:example.com/serverScript?url="+encodeURIComponent(url);

- resulting in a GET request to your server. You don't have to do
anything with the Image object after that (and cross-domain security
restrictions should be expected to prevent that anyway).

Richard.

KPR
Guest
 
Posts: n/a
#5: Jul 27 '06

re: How to post a url..


Wow.. now I didn't think of that approch.. great tip thanks..

Richard Cornford wrote:
Quote:
KPR wrote:
<snip>
Quote:
So I want to be able to bookmarks URLs on my server at home for later
visits..
<snip>
>
Simplest would be to create an Image object:-
>
var img = new Image();
>
- and then put your server URL into its - src - property:-
>
img.src = "http:example.com/serverScript?url="+encodeURIComponent(url);
>
- resulting in a GET request to your server. You don't have to do
anything with the Image object after that (and cross-domain security
restrictions should be expected to prevent that anyway).
>
Richard.
amit
Guest
 
Posts: n/a
#6: Jul 27 '06

re: How to post a url..



KPR wrote:
Quote:
Wow.. now I didn't think of that approch.. great tip thanks..
>
Richard Cornford wrote:
Quote:
KPR wrote:
<snip>
Quote:
So I want to be able to bookmarks URLs on my server at home for later
visits..
<snip>

Simplest would be to create an Image object:-

var img = new Image();

- and then put your server URL into its - src - property:-

img.src = "http:example.com/serverScript?url="+encodeURIComponent(url);

- resulting in a GET request to your server. You don't have to do
anything with the Image object after that (and cross-domain security
restrictions should be expected to prevent that anyway).

Richard.


Yes, Richard is right. That's the best solution unless you work it out
using perl or paython.

good luck

Randy Webb
Guest
 
Posts: n/a
#7: Jul 27 '06

re: How to post a url..


amit said the following on 7/27/2006 5:42 PM:
Quote:
KPR wrote:
Quote:
>Wow.. now I didn't think of that approch.. great tip thanks..
>>
>Richard Cornford wrote:
Quote:
>>KPR wrote:
>><snip>
>>>So I want to be able to bookmarks URLs on my server at home for later
>>>visits..
>><snip>
>>>
>>Simplest would be to create an Image object:-
>>>
>>var img = new Image();
>>>
>>- and then put your server URL into its - src - property:-
>>>
>>img.src = "http:example.com/serverScript?url="+encodeURIComponent(url);
>>>
>>- resulting in a GET request to your server. You don't have to do
>>anything with the Image object after that (and cross-domain security
>>restrictions should be expected to prevent that anyway).
>>>
>>Richard.
>
Yes, Richard is right.
Of course he is.
Quote:
That's the best solution unless you work it out using perl or paython.
And how do you propose to do that from the client?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
amit
Guest
 
Posts: n/a
#8: Jul 27 '06

re: How to post a url..



Randy Webb wrote:
Quote:
amit said the following on 7/27/2006 5:42 PM:
Quote:
KPR wrote:
Quote:
Wow.. now I didn't think of that approch.. great tip thanks..
>
Richard Cornford wrote:
>KPR wrote:
><snip>
>>So I want to be able to bookmarks URLs on my server at home for later
>>visits..
><snip>
>>
>Simplest would be to create an Image object:-
>>
>var img = new Image();
>>
>- and then put your server URL into its - src - property:-
>>
>img.src = "http:example.com/serverScript?url="+encodeURIComponent(url);
>>
>- resulting in a GET request to your server. You don't have to do
>anything with the Image object after that (and cross-domain security
>restrictions should be expected to prevent that anyway).
>>
>Richard.
Yes, Richard is right.
>
Of course he is.
>
Quote:
That's the best solution unless you work it out using perl or paython.
>
And how do you propose to do that from the client?
>
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

What I meant was not on client side but in general using perl you can
do that type of operations. was I wrong?

Randy Webb
Guest
 
Posts: n/a
#9: Jul 28 '06

re: How to post a url..


amit said the following on 7/27/2006 6:36 PM:
Quote:
Randy Webb wrote:
Quote:
>amit said the following on 7/27/2006 5:42 PM:
Quote:
Quote:
Quote:
>>That's the best solution unless you work it out using perl or paython.
>And how do you propose to do that from the client?
What I meant was not on client side but in general using perl you can
do that type of operations. was I wrong?
Can PERL do something like what was asked? Not by itself. Because some
way or another you have to tell PERL (Or any other server side language)
what URL to process and that has to happen on the client.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Closed Thread