Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  JavaScript    getting the screensize in VETScript

Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
Hi,

simple question, but how do i find out what resolution the user has on his desktop? If possible i would prefer a VETScript- Solution.

My first idea was to call a javascript function from vetscript which returns the size of the screen. I think this should work. But i cant get it done, cause i dont know how...

How do i call a javascript function from VETScript???? I read the vmp3.3_release_notes but couldn't find anything.

The other way should work, too. Like: calling a vetscript function from javascript or úsing the setProperty method. I think its only a syntax problem, but i cant solve it. As a result i need a defined var, which i can access in my vetscript.

Another problem: the code reference site is down since yesterday or even longer!!!

I have to finish my project until Thursday. And I'm on panik right now... Could someone please help me out?

Frank
 
Posts: 48 | Registered: November 28, 2005Reply With QuoteEdit or Delete MessageReport This Post
EnIgMaTiCScOrPioN
Member
Picture of e_phoenix13
Posted Hide Post
Hi Frank !!

Following code gets the screen resolution through Javascript:
function getRes() {
	var wVar = screen.width;
	var hVar = screen.height;
	alert(wVar + "," + hVar);
}


In the MTX file you can have an action which calls the Javascript function like:
<MTSJavascript Func="getRes();" />


Yes, I do see the Code Reference is down. You can use the old code reference site:
http://developer.viewpoint.com/dc/xml.shtml

Hope this helps.


Cheers,

Anup
 
Posts: 557 | Location: India | Registered: February 12, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  JavaScript    getting the screensize in VETScript