Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 05-02-2010, 08:20 PM   #1
In Runtime
 
hockeygoalie5's Avatar
 
Join Date: Dec 2009
Location: United States
Posts: 297
Default JavaScript in specified URL?

Is it possible to put JavaScript in a URL. For example, you're on mysite.org and there's a link leading to mysite.org/morestuff. Is it possible to put JavaScript in the URL? (e.g. mysite.org/morestuff/javascript)
__________________

hockeygoalie5 is offline   Reply With Quote
Old 05-05-2010, 07:01 PM   #2
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: JavaScript in specified URL?

What do you mean by the URL? A URL (uniform resource locator) is used as a unique way of identifying pages - javascript doesn't come into it.

You can type javascript into the address bar and you can set javascript to run when you click a link if that's what you mean?
__________________

__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 05-05-2010, 08:16 PM   #3
In Runtime
 
hockeygoalie5's Avatar
 
Join Date: Dec 2009
Location: United States
Posts: 297
Default Re: JavaScript in specified URL?

I mean that the link goes to a whole new page and automatically runs JavaScript on it.
hockeygoalie5 is offline   Reply With Quote
Old 05-06-2010, 05:52 AM   #4
In Runtime
 
Join Date: Jan 2010
Posts: 320
Default Re: JavaScript in specified URL?

Quote:
I mean that the link goes to a whole new page and automatically runs JavaScript on it.
That just sounds like programming to be done on the actual webpage..

The URL, is just the page 'identifier', it wont change the webpage, or make things happen, as it is, in effect, just a name.

Quote:
mysite.org/morestuff/javascript
This would just take you to a different page within your site, not envoke any javascript (directly anyway)
Luke_Uk_Baggy is offline   Reply With Quote
Old 05-07-2010, 12:13 PM   #5
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: JavaScript in specified URL?

You're trying to go about it the wrong way - if you want to modify the contents of a specific webpage via JS after loading, you're much better off writing a greasemonkey script.
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



All times are GMT -5. The time now is 04:36 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0