-
AuthorPosts
-
April 17, 2011 at 4:30 pm #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 Friendhimangi
- Join date:
- April 2011
- Posts:
- 1406
- Downloads:
- 1
- Uploads:
- 86
- Thanks:
- 21
- Thanked:
- 345 times in 332 posts
April 18, 2011 at 6:45 am #386799Hi,
Is there a live url for this, where I can check this ?
1 user says Thank You to himangi for this useful post
April 18, 2011 at 1:23 pm #386923April 23, 2011 at 7:59 pm #387777Help would be greatly appreciated (by anyone)….
thangnn1510 Friendthangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
April 26, 2011 at 4:55 am #388213Hi 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.
May 4, 2011 at 4:58 am #389714Thank 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…
-
AuthorPosts
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