WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Problems with vizhtml displayURL (https://forum.worldviz.com/showthread.php?t=3444)

TarkaDahl 02-14-2011 02:53 AM

Problems with vizhtml displayURL
 
Hi
the following code works fine

Code:

import viz
import viztask
import vizhtml

viz.go()

html = """
   
   

   

       
           
               
               
           
           
               
               
           
           
               
               
           
       
First Name
Last Name

   


   
    """
   
vizhtml.displayCode(html)

def HandleForm(e):
   
    print "wooho form submited"
   
vizhtml.onFormSubmit(HandleForm)

However when i change to loading the html file from an external file it doesnt work.

Code:

import viz
import viztask
import vizhtml

viz.go()

vizhtml.displayURL("simple.html")

def HandleForm(e):
   
    print "wooho form submited"
   
vizhtml.onFormSubmit(HandleForm)

The html is exactly the same just put in the file "simple.html". am i doing something wrong. or is it not mearnt to work like that.

Thanks

TarkaDahl

TarkaDahl 02-14-2011 05:16 AM

The website shows up but the onFormSubmit does not get called.

farshizzo 02-14-2011 09:34 AM

When loading html files from a URL, instead of code embedded within the script, you must specify the action field of your form. Modifying your form definition to the following should work:
Code:

action="http://localhost:8080/vizhtml_form/">
This tells the browser to submit the form data to the vizhtml webserver.

We will update the documentation to mention this.

TarkaDahl 02-15-2011 01:45 AM

Hi farshizzo,

That worked.

Thanks

TarkaDahl

TarkaDahl 02-17-2011 08:00 AM

Hi

Here is just a slight problem.
Code:

import viz

viz.go(viz.FULLSCREEN)

viz.window.displayHTML( 'www.worldviz.com'  )

When i run this code in version 3 everything works as i would expect.

However in version4 i can not click on the html page without it disapearing and the only way i can get it back is by pressing the start menu button.

This only happens in fullscreen mode.

Thanks

TarkaDahl

farshizzo 02-22-2011 11:03 AM

Are you running under Windows Vista or 7? There is an issue with some OpenGL drivers under Vista and above where fullscreen mode causes issues like the one you are describing.

Try adding the following line before you call viz.go():
Code:

viz.setOption('viz.display.swap_copy',1)
viz.go()


TarkaDahl 02-22-2011 01:11 PM

Hi farshizzo

I have just checked that i appears to work. I will check properly on next time im in work.

Thanks


All times are GMT -7. The time now is 10:21 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC