Web Analytics Made Easy -
StatCounter No Pop Up - CodingForum

Announcement

Collapse
No announcement yet.

No Pop Up

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • No Pop Up

    Hi,

    I cant figure out how to make this to submit to a normal page insted of the pop-up window. Can anyone help me?


    <HEAD>

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    // test variables
    var myHeight = 200;
    var isResizable = true;

    function createTarget(form) {
    _target = form.target;
    _colon = _target.indexOf(":");
    if(_colon != -1) {
    form.target = _target.substring(0,_colon);
    form.args = _target.substring(_colon+1);
    } else if(typeof(form.args)=="undefined") {
    form.args = "";
    }
    if(form.args.indexOf("{")!=-1) {
    _args = form.args.split("{");
    form.args = _args[0];
    for(var i = 1; i < _args.length;i++) {
    _args[i] = _args[i].split("}");
    form.args += eval(_args[i][0]) + _args[i][1];
    }
    }
    form.args = form.args.replace(/ /g,"");
    _win = window.open('',form.target,form.args);
    if(typeof(focus)=="function")
    _win.focus();
    return true;
    }
    // End -->
    </script>
    </HEAD>

    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->

    <BODY>

    <center>
    Form Target Formatting
    <p>

    <!-- Special Notes: -->
    <!-- Simply begin the target attribute with a name of your -->
    <!-- choice, _blank, _top, etc... followed by a colon and -->
    <!-- the window options string used in the window.open -->
    <!-- command. Anything in this string enclosed in { and } -->
    <!-- will be interpreted as JavaScript. -->

    <form action="con1.htm" method=get
    target="foobar:width={window.screen.width/2},
    height={myHeight},
    scrollbars,
    {(isResizable)?'resizable':''},
    status"
    onSubmit="return createTarget(this);">
    <table align=center>
    <tr><td align=right>Name:</td>
    <td><input name=name></td></tr>
    <tr><td align=right>Email:</td>
    <td><input name=email></td></tr>
    <tr><td align=right>Favorite Color:</td>
    <td><input name=fav_color></td></tr>
    <tr>
    <td align=right>Age</td>
    <td><input name=age size="20"></td>
    </tr>
    <tr>
    <td align=right></td>
    <td></td>
    </tr>
    <tr><td align=center colspan=2><input type="Submit"></td></tr>
    </table>
    </form>
    </center>
    Kind regards,
    Mike Hughes

  • #2
    Get rid of this?
    Code:
    target="foobar:width={window.screen.width/2}, 
                          height={myHeight}, 
                          scrollbars, 
                          {(isResizable)?'resizable':''}, 
                          status"
    or did you mean load a new window that is normal?

    -S. Bob

    Comment


    • #3
      no, i done what you said it worked ok..

      thanks.

      can you help with another but, its anew psot called mailto?
      Kind regards,
      Mike Hughes

      Comment

      Working...
      X