My strength is not java script and with the complex issues of dealing with the Vbulletin interface and then the java script which i do not really understand yet fully I hopeing some good soul will come to my add fast and get me through this.

I do not expect that I will find someone that has the knowelage of vbulletin but I need to be correct java script first but if someone knows Vbulletin i modifyed the calendar_jump which is calendarjump in the templete system.

Here goes the problem is my form is not calling up my java script - even allought the java is not doing anything right now I have dump some idea of what i want to do inside it for clearlty to my idea what i am trying to do!

The point is I need my java script function "process_selected(this.form)" to be called before the submitting of the form in the form of a $_GET to the server.

<script type="text/javascript"> function process_selected(this.form) {
             on.form.submit();

}

</script>

<form action="calendar.php" method="get">

<div class="smallfont" style="text-align:$stylevar; white-space:nowrap">

            <input type="hidden" name="s" value="$session[sessionhash]" />

            <input type="hidden" name="month" value="$month" />

            <input type="hidden" name="year" value="$year" />

            <input type="hidden" name="do" value="$docalendar" />

        <strong>$vbphrase[Lodge_Calendar]</strong><br />

        <select name="c" >

                <optgroup label="$vbphrase[please_select_one]">

                   $jumpcalendarbitsl

                </optgroup>

        <input type="hidden" name="me" value='2'" />

        </select>

          <input type="submit" class="button" value="$vbphrase[go]" onclick="process_selected(this.form)" <br />

     </div>

</form>

Please review the posting above and tell me what i am doing wrong to have the handshaking between my form and the java script WHY IS IT NOT BEING CALLED.

THANKS

Frank H. Shaw

The first thing that you must do is give your form's a unique id(s) which you will be needing to call your form(s) in a javascript function's.

<html>
<head>
<title>demo</title><script type="text/javascript">
<!--
function submitForm() {
if (document.all) {
document.forms['myform'].submit(); }
else { document.getElementById('myform').submit(); } }
 // which "myform" is the given id in your form.
//-->
</script>
</head>
<body>
<form id="myform" action="calendar.php" method="get">
<div>
<input type="text" name="txt" id="txt" /> <button name="btn" id="btn" onclick="submitForm();">Submit</button>
</div>
</form>
<div><p>Another way to submit a form using a hyperlink <a href="javascript:submitForm();">Sumbit</a></p></div>
</body>
</html>

This is just an example of how to submit a form w/o using a submit button. Hope you find this usefull...

This article has been dead for over six months. Start a new discussion instead.