This is a discussion on "Javascript in address bar" within the JavaScript Forum section. This forum, and the thread "Javascript in address bar are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Javascript in address bar
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
||||
|
||||
|
Javascript in address bar
Marc posted about using javascript straight from the address bar.
Do you think using this method you can send someone to a page with your own JS attached to it? Just a though
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|
|
#2
|
||||
|
||||
|
Re: Javascript in address bar
Well you can access a query string with javascript so technically you could run the querystring through the function eval() and run the code on it.
It would be up to the page you're visiting though not *just* what's in the address bar.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#3
|
||||
|
||||
|
Re: Javascript in address bar
Could you show me a very basic example when you have time please?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#4
|
||||
|
||||
|
Re: Javascript in address bar
Okay something like this.
I want to run this script when the new page loads: alert("Hello, you must be pretty cool for this page to say hello"); so encode it as a url passable string
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#5
|
||||
|
||||
|
Re: Javascript in address bar
Thanks, I'll try this out later, off out now!
+ rep!
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| address bar doesn't change | aflacduck | Starting Out | 10 | May 29th, 2007 22:19 |
| PHP for users IP address | djme | PHP Forum | 3 | Dec 31st, 2005 18:08 |
| how do i get the http address? | mostwanted | Flash & Multimedia Forum | 0 | Nov 11th, 2005 14:08 |