WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-14-2011, 02:53 AM
TarkaDahl TarkaDahl is offline
Member
 
Join Date: Mar 2010
Posts: 59
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)
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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 07:50 AM.


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