Search engine

Question by :
Javascript WITHOUT HTML?

I’m trying to make a JSS code that you can copy+paste into your browser bar. I already have this code:

javascript:function reverse() { var inp = “.tset a si siht”;
var outp=”";for (i = 0; i <= inp.length; i++)
{ outp =inp.charAt (i) + outp;}alert(outp) ;}; reverse();

Which makes a popup box appear when you paste it into your browser bar (I know it's not necessary to reverse the plaintext, I am just doing it so I can learn as much as possible). I am trying to make TWO clickable buttons, one that states ok, and one that states cancel, both of which lead to different sites. I know how to do it in HTML JSS, but I cannot seem to make it work without being embedded in HTML. The HTML code for what I am looking for is as such:






If anyone could tell me how to integrate the options of the second script into the first, I’d be much appreciative! :D Thanks guys!

(P.S. If you could tell me how to get rid of that pesky “Message From Webpage” text in the top of the box, that is extra credit ;)
@ Robert: But if it’s possible to make the popup box by typing it into the address bar, why would the text of the buttons not be editable? I can change the text of the message… Why would I not be able to change the text of the buttons and the upper salutation?
@ Steve: That works wonderfully! :D Thank you! But how would I incorporate the same reversed text in the boxes? I am still scratching my head on how to add that in…


——————————————

Answer by Robert
Don’t think its possible unless its already on a page which has assigned arrays/booleans;

function makeArray(arg1, arg2){
return [ this, arg1, arg2 ];
}

——————————————
Give your own answer to this question below!