SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Dec 2011
    Posts
    221
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    onsubmit new window and action

    Greetings!

    I'm new in javascript, I'm making a function that will open new window upon submitting the form.

    How can I combine this two?
    Code:
    function advance(){
        onSubmit="window.open('', 'foo', 'width=450,height=300,status=yes,resizable=yes,scrollbars=yes' 
        document.inventory.action="pagination.php";
    And is it possible to put button close and submit in the new window?
    Any help is greatly appreciated.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by claro View Post
    And is it possible to put button close and submit in the new window?
    Yes it is, by gaining a reference to the new window, and from there to the body of that window.
    You can then add whatever elements you like to the body of that new window, and attach events so that they can perform desired behaviours too.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •