Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-27-2010, 09:44 PM
SorentoUltimate's Avatar
SorentoUltimate SorentoUltimate is offline
 
Join Date: Jul 2009
Location: Moschato, Athens, Greece
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How I take the Data into JavaScript and return after some jobs

I put a new button at Creating Social Group Form and on click i run a JavaScript.

How can i read Form Fields data at JavaSript?

the form not use vBForm and $editorid !!!

Here the vBulletin Template

Code:
$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $custompagetitle</title>
</head>
<body>
$header
$navbar

<if condition="!$icononly">
<form action="group.php?do=$action" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="$action" />
<input type="hidden" name="groupid" value="$group[groupid]" />
<input type="hidden" name="url" value="$url" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
    <td class="tcat">
        $phrase
        <if condition="$_REQUEST['do'] == 'edit'">
            <span class="normal"><a href="group.php?$session[sessionurl]groupid=$group[groupid]">$group[name]</a></span>
        </if>
    </td>
</tr>
<tr>
    <td class="panelsurround" align="center">
        <div class="panel">
            <table><tr><td align="$stylevar[left]">

                <div class="smallfont">
                    <label for="socialgroupcategoryid">$vbphrase[social_group_category]:</label><br />
                    <select name="socialgroupcategoryid" id="socialgroupcategoryid">
                        <option value="">$vbphrase[select_a_category]</option>
                        $categoryoptions
                    </select>
                </div>

                <if condition="$show['title']">
                    <div class="smallfont">
                    <label for="groupname">$vbphrase[group_name]:</label><br />
                        <input type="text" class="bginput" name="groupname" id="groupname" size="50" maxlength="$vboptions[sg_name_maxchars]" value="$group[rawname]" tabindex="1" />
                    </div>
                </if>

                <div class="smallfont" style="margin-top:$stylevar[formspacer]px">
                    <label for="groupdescription">$vbphrase[group_description]: <span class="shade">($vbphrase[bbcode_not_allowed])</span></label><br />
                    <textarea class="bginput" name="groupdescription" id="groupdescription" cols="50" rows="5" tabindex="1">$group[rawdescription]</textarea>
                </div>

                <div class="smallfont" style="margin-top:$stylevar[formspacer]px">
                    <label for="grouptype">$vbphrase[group_type]:</label><br />
                    <select name="grouptype" id="grouptype">
                        <option value="public"$typeselected[public]>$vbphrase[group_type_public]</option>
                        <option value="moderated"$typeselected[moderated]>$vbphrase[group_type_moderated]</option>
                        <option value="inviteonly"$typeselected[inviteonly]>$vbphrase[group_type_inviteonly]</option>
                    </select>
                </div>

                <if condition="$show['options']">
                    <fieldset class="fieldset" style="margin-top:$stylevar[formspacer]px">
                        <legend>$vbphrase[group_options]</legend>
                        <div class="smallfont">
                            <if condition="$show['enable_group_albums']">
                                <div>
                                    <label for="enable_group_albums"><input type="checkbox" name="options[enable_group_albums]" id="enable_group_albums" value="1" $checked[enable_group_albums]/> $vbphrase[enable_albums]</label>
                                </div>
                            </if>
                            <if condition="$show['enable_group_messages']">
                                <div>
                                    <label for="enable_group_messages"><input type="checkbox" name="options[enable_group_messages]" id="enable_group_messages" value="1" $checked[enable_group_messages]/> $vbphrase[enable_messages]</label>
                                </div>
                            </if>
                            <if condition="$show['mod_queue']">
                            <div>
                                <label for="group_owner_mod_queue"><input type="checkbox" name="options[owner_mod_queue]" id="group_owner_mod_queue" value="1" $checked[mod_queue]/> $vbphrase[messages_must_be_approved_by_owner]</label>
                                </div>
                            </if>
                            <if condition="$show['join_to_view']">
                            <div>
                                <label for="join_to_view"><input type="checkbox" name="options[join_to_view]" id="join_to_view" value="1" $checked[join_to_view]/> $vbphrase[users_must_join_to_view_content]</label>
                                </div>
                            </if>
                            <if condition="$show['only_owner_discussions']">
                                <div>
                                    <label for="only_owner_discussions"><input type="checkbox" name="options[only_owner_discussions]" id="only_owner_discussions" value="1" $checked[only_owner_discussions]/> $vbphrase[only_owner_can_create_new_discussions]</label>
                        </div>
                            <else />
                                <input type="hidden" name="options[only_owner_discussions]" id="only_owner_discussions" value="$checked[only_owner_discussions]" />
                            </if>
                        </div>
                    </fieldset>
                </if>
            </td></tr></table>
        </div>

        <div style="margin-top:$stylevar[cellpadding]px">
            <input type="submit" value="$vbphrase[save]" class="button" accesskey="s" tabindex="1" />
            <input type="reset" value="$vbphrase[reset]" class="button" />
        </div>
    </td>
</tr>
</table>

</form>
</if>

<if condition="$show[editicon]">
<if condition="!$icononly"><br /></if>


<form enctype="multipart/form-data" action="group.php?do=updateicon" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="updateicon" />
<input type="hidden" name="groupid" value="$group[groupid]" />
<input type="hidden" name="icononly" value="$icononly" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
    <td class="tcat" colspan="2"><if condition="$icononly">$vbphrase[create_group_icon]<else />$vbphrase[edit_group_icon]</if></td>
</tr>
<tr>
    <td class="panelsurround" align="center">
    <div class="panel">
        <div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">

            <fieldset class="fieldset">
                <legend>$vbphrase[current_group_icon]</legend>
                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                <tr valign="top">
                    <if condition="!$groupiconurl">
                    <td class="alt1" style="border:1px inset; padding:$stylevar[cellpadding]px">
                    <span class="smallfont">$vbphrase[no_group_icon]</span>
                    </td>
                    <else />
                        <td class="smallfont">
                        <img src="$groupiconurl" alt="$vbphrase[current_group_icon]"  border="0" style="margin-$stylevar[right]:8px;border:1px solid gray" />
                        </td>
                    </if>
                    <td class="smallfont">
                        <div style="margin-bottom:$stylevar[formspacer]px">$vbphrase[group_icon_desc]</div>
                        <if condition="$show['deleteicon']"><div style="margin-bottom:$stylevar[formspacer]px"><label for="groupicon"><input type="checkbox" name="deletegroupicon" value="1" id="groupicon" />$vbphrase[delete_current_image]</label></div></if>
                    </td>
                </tr>
                </table>
            </fieldset>


            <fieldset class="fieldset">
                <legend>$vbphrase[custom_group_icon]</legend>

                <div style="padding:$stylevar[formspacer]px">
                <div class="fieldset">

                $vbphrase[may_upload_custom_image_controls]<br /><br />

                <if condition="$show['url_option']">
                $vbphrase[enter_url_to_image]
                <div style="padding:$stylevar[formspacer]px">
                    <input type="text" class="bginput" name="iconurl" value="http://www." size="45" dir="ltr" />
                </div>
                </if>

                <if condition="$show['url_option']">$vbphrase[option_2_upload_image_from_computer]<else />$vbphrase[upload_image_from_computer]</if>
                <div style="padding:$stylevar[formspacer]px">
                    <input type="file" class="bginput" name="upload" size="45" />
                    <input type="hidden" name="MAX_FILE_SIZE" value="$inimaxattach" />
                </div>

                $maxnote

                </div>
                </div>
            </fieldset>

        </div>
    </div>

    <div style="margin-top:$stylevar[cellpadding]px">
        <input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" />
        <input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
        <input type="submit" class="button" value="$vbphrase[skip]" name="skip" accesskey="p" />
    </div>
    </td>
</tr>
</table>

</form>
</if>

$footer
</body>
</html>
___


i want to take the groupname and the groupdescription.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11027 seconds
  • Memory Usage 2,450KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete