document.write submits page

Discussion in 'Javascript' started by David Williams, Oct 18, 2007.

  1. Hi, I have a problem where whenever I have a mouseover, the document.write on my javascript page, tries to submit the page.



    <input type=submit value="val" onmouseover=func1() onmouseout=func2()>



    func1(){
    document.write("<h1>Hello</h1>")
    }


    I guess the mouseover executes the submit. Any way around this?
    --
    David Williams
    Georgia Institute of Technology, Atlanta Georgia, 30332
    Email:
     
    David Williams, Oct 18, 2007
    #1
    1. Advertising

  2. In comp.lang.javascript message <>,
    Wed, 17 Oct 2007 21:15:33, Randy Webb <> posted:
    >
    >Instead of document.write (which will replace the current page if used
    >after the page has loaded), try using DynWrite from the group FAQ:
    ><URL: http://jibbering.com/faq/index.html#FAQ4_15>


    I thought that you did not recommend using that nowadays. OP, see in
    <URL:http://www.merlyn.demon.co.uk/js-nclds.htm#Inc1>, Wryt.

    --
    (c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
    news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
    <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
     
    Dr J R Stockton, Oct 18, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert V
    Replies:
    1
    Views:
    1,179
    Jeremy Fluhmann
    Jul 21, 2003
  2. Umesh

    Page Submits twice

    Umesh, Feb 24, 2006, in forum: HTML
    Replies:
    3
    Views:
    609
    Alan J. Flavell
    Feb 24, 2006
  3. Umesh

    Page Submits Twice

    Umesh, Feb 24, 2006, in forum: ASP General
    Replies:
    5
    Views:
    142
    Evertjan.
    Feb 25, 2006
  4. jpf
    Replies:
    0
    Views:
    93
  5. charlie_M
    Replies:
    6
    Views:
    120
    charlie_M
    Sep 23, 2005
Loading...

Share This Page