test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • egrys Friend
    #162877

    I am developing a site for my client using JA-Social.

    I have a program that uses an ajax form for the inputting of variables which is loaded in the top panel as a module.
    On Submit, the variables are checked using a javascript routine and if correct, the program displays the results in an article.

    The program works fine, however, I would like the top panel to toggle (close) automatically upon successfully passing the javascript validator and before the results are displayed.

    Here is the javascript validator routine that is called…

    function validatecForm( frm ) {
    var valid = true;
    var why = “”;
    why = validateMemberType(frm.user_cont_kind);
    if (why != “”) {
    alert(why);
    return false;
    } else {
    // CLOSE TOP PANEL CODE TO BE ADDED HERE…
    return true;
    }
    }

    Can you help… Not certain how to implement…

    himangi Friend
    #386799

    Hi,

    Is there a live url for this, where I can check this ?

    egrys Friend
    egrys Friend
    #387777

    Help would be greatly appreciated (by anyone)….

    thangnn1510 Friend
    #388213

    Hi there!

    this is a simple solution for you in this case:

    • Please copy modulesmod_jatoppaneltmpldefault.php to templatesja_socialhtmlmod_jatoppanel
    • Open default.php in templatesja_socialhtmlmod_jatoppanel and then change this code:

    <div class="ja-toppanel-panels">

    to

    <div class="ja-toppanel-panels" id="test">

    • Go to your script and add this code:

    var content2 = $('test').getElement("div");
    content2.setStyle('height','0');

    below:

    // CLOSE TOP PANEL CODE TO BE ADDED HERE…

    Tell me the result please.

    egrys Friend
    #389714

    Thank you for the help…. It almost works… Upon opening the panel, entering random values for the equation and click on ‘submit’… the top panel snaps shut but the content of the panel is visible (at least until you manually reopen/close the panel)… Further help would be greatly appreciated…

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 3 voices, and was last updated by  egrys 13 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum