Is there any way to create prompt with two input fields?
This is not possible with an OS or native browser window popping up. You will have to create a custom overlay dialog. I would advise using a library like jQuery UI to do this. You can then customize whatever is in the popup. You can view a demo of the dialog here