JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 17th, 2012, 12:29 PM
dano2 dano2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 113 dano2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 33 m 30 sec
Reputation Power: 9
How to execute javascript from a bookmark

In Firefox, if you put "alert('what is up');" as a path to a bookmark, then that js will execute when you "go to" that bookmark. But how do you do this in other browsers? I doesn't work in IE. I honestly haven't checked the others. But if you have, and it's not the same as above, could you please share your wisdom?
__________________
Thanks,
Dan

Operating system ubuntu 9.04 Jaunty

Reply With Quote
  #2  
Old October 17th, 2012, 02:08 PM
Kravvitz's Avatar
Kravvitz Kravvitz is online now
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,835 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 22 h 11 m
Reputation Power: 4192
They're called "bookmarklets" and they work fine for me in FF, IE, and other browsers.

However, I'm surprised that this would work:
Code:
alert('what is up');

Usually you need to use the "javascript:" pseudo-protocol:
Code:
javascript:alert('what is up');
__________________
Spreading knowledge, one newbie at a time. I'm available for hire at Dynamic Site Solutions.

Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

Remember people spend most of their time on other people's sites (so don't violate web design conventions).

Reply With Quote
  #3  
Old October 18th, 2012, 12:27 AM
dano2 dano2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 113 dano2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 33 m 30 sec
Reputation Power: 9
Yup. Forgot the "javascript:" I didn't realize there is a name for this, bookmarklets. Funny, I thought I was pretty clever using it. I see here I'm only about 15 years late on the bandwagon
http://www.bookmarklets.com/tools/data/index.phtml

Thanks Kravvitz

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > How to execute javascript from a bookmark

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap