#1
|
|||
|
|||
Problems with vizhtml displayURL
Hi
the following code works fine Code:
import viz import viztask import vizhtml viz.go() html = """ <html> <body onload="document.the_form.first_name.focus();"> <form name="the_form" method="post"> <table> <tr> <td>First Name</td> <td><input type="text" name="first_name"></td> </tr> <tr> <td>Last Name</td> <td><input type="text" name="last_name"></td> </tr> <tr> <td></td> <td><input type="submit" value="Submit"></td> </tr> </table> </form> </body> </html>""" vizhtml.displayCode(html) def HandleForm(e): print "wooho form submited" vizhtml.onFormSubmit(HandleForm) Code:
import viz import viztask import vizhtml viz.go() vizhtml.displayURL("simple.html") def HandleForm(e): print "wooho form submited" vizhtml.onFormSubmit(HandleForm) Thanks TarkaDahl |
#2
|
|||
|
|||
The website shows up but the onFormSubmit does not get called.
|
#3
|
|||
|
|||
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:
<form name="the_form" method="post" action="http://localhost:8080/vizhtml_form/"> We will update the documentation to mention this. |
#4
|
|||
|
|||
Hi farshizzo,
That worked. Thanks TarkaDahl |
#5
|
|||
|
|||
Hi
Here is just a slight problem. Code:
import viz viz.go(viz.FULLSCREEN) viz.window.displayHTML( 'www.worldviz.com' ) 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 |
#6
|
|||
|
|||
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() |
#7
|
|||
|
|||
Hi farshizzo
I have just checked that i appears to work. I will check properly on next time im in work. Thanks |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problems with makepy applications | Darkmax | Vizard | 0 | 10-12-2010 09:47 AM |
problems nagivating around | ruby21 | Vizard | 2 | 05-18-2010 03:22 PM |
Problems loading WRL file | DrunkenBrit | Vizard | 2 | 01-29-2009 12:58 AM |
Problems with spawn point. | just alex | Vizard | 1 | 11-24-2008 09:51 AM |
Problems with lighting in 2.0 | murm | Vizard | 6 | 04-21-2004 09:59 AM |