Javascript Pop-Up

They have: 82 posts

Joined: Oct 2001

OK Guys,
I am a Javascript novice, actually worse than that.

1. How do I set the width and height to screen.width and height to screen.height.

2. How do I set the page variable to == a .ASP query string that is generated by user input(username and password)?

3. The form is validated using VBscript. Can VBScript call the Javascript function after the form is validated?

<script language="JavaScript">

</script>

example
//input box username
//input box password

Thanks so much!

- Mike

Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

1) something like this:
"height=" . screen.height . ", width=" . screen.width . ", blah=blah, blah blah"

2) ?? I'm corn-fuzed ??

3) I don't believe you can cross languages like that. So no, I don't believe VBScript can trigger a JS function.

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 82 posts

Joined: Oct 2001

2. ?? I'm corn-fuzed ??

2. How do I set the page variable to == a .ASP query string that is generated by user input(username and password)?

I need to make the URL be a QueryString containing UserName
and Password.
Something like:

"Mypage.asp?username="&username&"&password="&password&""
"Mypage.asp?username=mike&password=password"

This is not a problem in VBScript I just do not know how to do it with javascript.

<script language="JavaScript">

Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

Using VBScript client-side? Must be for an Intranet or a controlled environment.

1) Mark addressed this.
2) Check out the following:

function WindowOpen(username,password)
{
var ThePage = "page.asp?username=" + username + "&password=" + password

window.open(ThePage)
}
So however you call WindowOpen you should pass the username and password to it.

3) You can call JavaScript from VBScript, just call the function. Example:

Sub PassControl
Call SomeFunction
End Sub

function SomeFunction()
{
alert("Whassup!")
}

You should probably be writing all your client-side code in Javascript, for compatibility.

PJ | Are we there yet?
pjboettcher.com

They have: 82 posts

Joined: Oct 2001

Using VBScript client-side? Must be for an Intranet or a controlled environment.

"Man that aint right!" Smiling

There will be a browser check to see if they are using I.E.

Thanks for the code that should have been a no brainer!!!

- Mike

Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Quote: Originally posted by Peter J. Boettcher
3) You can call JavaScript from VBScript, just call the function. Example:

Sub PassControl
Call SomeFunction
End Sub

function SomeFunction()
{
alert("Whassup!")
}

I never knew that, and I never tried that. Now I know... thx!

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.