?
Solved

How do I define the size of a new window using vbscript?

Posted on 2004-11-03
6
Medium Priority
?
1,920 Views
Last Modified: 2012-05-05
Hi, I'm using the following code to open a new window in my web page.

Does anyone know how I can define the window size to say 600 * 500 ?

======================================================
<SCRIPT Language="VBSCRIPT">
function openLink(strURL)
     window.open strURL
End function
</SCRIPT>

<a href="#" onClick="openLink('http://experts-exchange.com')">My Link</a>
======================================================

Thanks in advance,

JK
0
Comment
Question by:jakekula
  • 4
  • 2
6 Comments
 
LVL 5

Accepted Solution

by:
cristy56 earned 2000 total points
ID: 12489299
<SCRIPT Language="VBSCRIPT">
function openLink(strURL)
     win = window.open(strURL,"myWin","height=400,width=400")
End function
</SCRIPT>
<a href="#" onClick="openLink('http://experts-exchange.com')">My Link</a>


==========
Cristy
0
 
LVL 5

Expert Comment

by:cristy56
ID: 12489308
Some more additional info for you about open new window :
http://www.pageresource.com/jscript/jwinopen.htm

Cheers,
Cristy
0
 

Author Comment

by:jakekula
ID: 12489333
Thanks for that, can you define co-ordinates as well in the vbscript?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 5

Expert Comment

by:cristy56
ID: 12489374
Must be able to do that in Javascript, but not sure if that can be done as well with VBscript.

Cristy
0
 
LVL 5

Expert Comment

by:cristy56
ID: 12489384
Give u an example on how to position an image using Javascript :

<html>
<script language = JavaScript>
function changeXY(x, y)
{
     document.images("testimage").style.left = x;
     document.images("testimage").style.top = y;
}
</script>
<body>
     <img name = testimage src = "test.gif" style = "position : absolute; top = 0; left = 0">

     <form name = test>
     <input name = userX type = text>
     <input name = userY type = text>

     <input type = button value = Change! onClick = "changeXY(document.forms('test').userX.value, document.forms('test').userY.value)">
     </form>
</body>
</html>

=====================
Cheers,
Cristy
0
 

Author Comment

by:jakekula
ID: 12489617
Thank you, I will keep researching
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question