Viewpoint Forums
Viewpoint Forums
JavaScript
getting the screensize in VETScript|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
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 |
||
|
|
EnIgMaTiCScOrPioN Member |
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 |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Viewpoint Forums
Viewpoint Forums
JavaScript
getting the screensize in VETScript
