Randy Maulana
Randy Maulana

Reputation: 21

Displaying a Promt on New Tab or Blank Page on Bookmarklet Chrome

I am unable to get the prompt to display from New Tab or Blank Page. Is there a way to do this?

Bookmarklet:

javascript:
(function() { 
    var val= prompt("Enter Phone Number",""); 
    if (val) 
        location="https://officesite.com/phonenumber/value="+escape(val);
})()

Thank in advance!

Upvotes: 2

Views: 202

Answers (1)

Kitis
Kitis

Reputation: 1

Try using window.open("Bookmarklet", "_blank")

Upvotes: -1

Related Questions