Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I build quite a lot of bookmarklets to automate my every day's work. Now I faced a problem: I would like (by clicking on a bookmarklet) to open a page in web browser (I use Internet Explorer) and apply some specific operation on its interface.

The web application is old and does not provide some advanced option like table filtering. I have this functionality already written, now I would like to open a web app and apply my JS code by one click on bookmarklet.

So I would like 3 steps to by done by one click:

  1. Open some webpage.
  2. Wait for webpage to be fully loaded.
  3. Run some JS command, let say alert('test');

I tried few times, but it seems impossible to me. So I would like to be sure: is it do-able?

share|improve this question

migrated from webapps.stackexchange.com Jan 10 at 16:20

This question came from our site for power users of web applications.

    
Which browser are you using? –  Sathya Jan 10 at 14:37
    
@Sathya - Internet Explorer 8, unfortunately :) –  boleslaw.smialy Jan 10 at 15:47
    
Might be possible if you load the page in a frame. –  Daniel Beck Jan 11 at 9:38
    
@DanielBeck - interesting idea, I've never thought about it. I will check and let you know! Cheers! –  boleslaw.smialy Jan 13 at 7:51
    
@DanielBeck - totally forgot about SOP policy. I am not allowed to run JS action in iframe because of different origin of "bookmarklet scope" and the iframe I've created. –  boleslaw.smialy Jan 14 at 9:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.