SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast Tagxpert's Avatar
    Join Date
    Jul 2004
    Location
    INDIA
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    function submitform

    Hi,

    This is my code

    ------------------------
    function SubmitForm(form, a, replace) {
    if (replace) {
    document.forms[form].action = a;
    } else {
    document.forms[form].action = document.forms[form].action + a;
    }
    document.forms[form].submit();
    }
    ------------------------

    Here i wanted to add url which opens in popup window with fixed height and width.........Any suggestions.....

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Probably a better way to do this. Not quite sure what 'this' is, however...

    More details?
    ::: certified wild guess :::

  3. #3
    SitePoint Enthusiast Tagxpert's Avatar
    Join Date
    Jul 2004
    Location
    INDIA
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is my complete javascript code
    -----------------------------------
    }
    function SubmitForm(form, a, replace) {
    if (replace) {
    document.forms[form].action = a;
    } else {
    document.forms[form].action = document.forms[form].action + a;
    }
    document.forms[form].submit();
    }

    function CheckBoxes(form, v){
    for (var i=0; i < document.forms[form].elements.length; i++) {
    var j = document.forms[form].elements[i];
    if (j.type == "checkbox") { j.checked = v; }
    }
    }

    function AreYouSure(){
    if (confirm('Are you TOTALLY sure???')){
    return true;
    } else {
    return false;
    }
    }
    -----------------------------------

    Now i wanted to open popup with fixed width and fixed height using submit.

    So if someone clicks on submit it must open a popup window link.
    website for Angels Friendofgod.com - My New yaalimadad.info -
    Community Site HuMMomin.COM - Live Radio ShiaRadio.COM

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function SubmitForm(sFormId, a, replace)
    {
    	var oForm = document.getElementById(sFormId);
    	if (replace)
    		oForm.action = a; 
    	else 
    		oForm.action += a;
    	oForm.target = 'formWin';
    	window.open('about&#58;blank', 'formWin', '.....features...');
    	oForm.submit(); 
    }
    Change your form's name= to id=. You can find 'features' here.
    ::: certified wild guess :::


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
  •