PDA

View Full Version : Script Prompt - Window / Text adjustment


zamen
08-22-03, 09:55 AM
hi

Im trying to find out if theres a way I can modify the Script Prompt Window size and text..

http://jsm.zynch.com/javascript_examples/password2.html

Please click the link above so you can undertstand what im asking about

Two things that I really want to change

-Is it possible to remove that "script prompt" text thats in the window?

-How do I resize the window prompt so that I can put more text in there? (the reason is, when I add more text and break lines "\n" .. the window doesnt automatically adjust to the text, so you cant see it.


Your help is greatly appreciated, and Thank you in advance for your time and efforts

Zamen

greeny
08-22-03, 02:32 PM
i may be wrong but i don't think it's possible to alter the JavaScript prompt box the way you want however it is possible to do using VBScript maybe not the best way but it works :).


<script language="VBScript">
PromptTxt = "Enter Your Password" & Chr(13) & _
"A second Line" & Chr(13) & _
"And a third"
ReturnTxt = InputBox(PromptTxt, "Title")

Select Case ReturnTxt
Case "LETMEIN!!"
window.location.href = "correct.html"
Case Else
window.location.href = "wrong.html"
End Select
</script>

zamen
08-25-03, 10:05 AM
Thanks Greeny, I will try that..

Another question i have for you or anyone.. is that most importantly, I know that these type of scripts are not high security, which is fine..

but what about compatibility?? In other words, what settings on IE browsers need to be enabled?

I initially thought that just the SCRIPTING : ACTIVE SCRIPTING needed to be enabled for the Javascript, but some people told me it still doesnt work for them?

What other settings need to be checked??

Im not too famiiar with VB settings... is it the same?

Thanks again for all your help

greeny
08-25-03, 10:48 AM
as far as i'm aware vb settings should be the same. but to enable / disable javascript i'm not sure, although with about 90%+ of all browsers having javascript enabled you shouldn't have many compatibility issue's.

zamen
08-25-03, 03:51 PM
Ok I will look forther into this

We noticed that users with pop up blockers tend to disable these type of script prompts, but then we figure if a user has a pop up blocker, his securities are high and most other scripts wouldnt work as well..

Thanks again for your kind help

Z

greeny
08-25-03, 04:37 PM
no problem ;)