Your username
Have an account?
Forgot your password?
  • Log in or Sign up

    Results 1 to 7 of 7
    1. #1
      Junior Member fshaw's Avatar
      Join Date
      Feb 2009
      Posts
      4

      Default Answered: I do need some help can anyone look at this and tell me what i need to do

      The following is I have taken the templete calendarjump from and used with the calendar.php and i modifyed the templete so that I could use a function to process the selected calandar in the dropdown menu.

      First i need to ask is does the java script can be in the templete its self or does it have to reside out side the templete.

      Second is the following templete i am playing with I have added java script to the templete as you will see but my linking bettween the templete the form and the java script is not seem to working for me.

      Do i have to register something for it to work?

      When i press the "Go" button nothing happens can someone take a quick look and tell what i am going worng here THANKS

      PHP Code:

      <script type="text/javascript"process_selected(form) {

       

              
      this.form.submit();

           

      }

      </script>

       

       

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

      <div class="smallfont" style="text-align:$stylevar[left]; 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="button" value="Go" onclick="process_selected(this.form)" <br />

           </div>

      </form> 
      THANKS

      Frank H. Shaw

      PS A example of would help me THANKS
      Last edited by fshaw; 02-28-2009 at 08:31 PM.

    2. "Going to check it out now and you'll see just how fast the support is Thanks for the kind comments btw. We will have you up and running in no time!

      Just checked your ticket now and it seems it was answered by another customer themselves in a few hours. Their answer was right on point. It seems your issue was with downloading the product itself. Sometimes (depending on the browser) the file doesn't save as a zip, so you'd need to rename it and manually add .zip.

      Please allow at least 24-48 hours for a ticket to be processed. Normally they're actually processed within a few hours. However, your ticket was posted today!

      Hope that helps! Enjoy your stay!"


    3. #2
      ModernvB.com Owner Gio~Logist's Avatar
      Join Date
      Oct 2008
      Posts
      1,208
      Provided Answers: 30

      Default Re: I do need some help can anyone look at this and tell me what i need to do

      Why are you using javascript simply to submit the form? Why not just use a normal submit button, or am I missing something?

      Also, when defining a function, you need to include the word "function" before the name of the actual function, for proper syntax. So the beginning would be:
      HTML Code:
      function process_selected(form) {

    4. #3
      Junior Member fshaw's Avatar
      Join Date
      Feb 2009
      Posts
      4

      Default Re: I do need some help can anyone look at this and tell me what i need to do

      Quote Originally Posted by Gio~Logist View Post
      Why are you using javascript simply to submit the form? Why not just use a normal submit button, or am I missing something?

      Also, when defining a function, you need to include the word "function" before the name of the actual function, for proper syntax. So the beginning would be:
      HTML Code:
      function process_selected(form) {
      So my java script should look like this

      PHP Code:

      <script type="text/javascript"> function process_selected(form) {

              
      this.form.submit();

      }

      </script> 
      and can be located in the templete calendarjump ?

      I need to be able to do more then just a form submit but before that i need to get my handshakeing between the java script and my form to work first.

      I need to be able to add some logic to cause some logic variables etc. before submitting the form that is why i need to have my form call a function before doing some form submit.

      So it is not as simple as one would think.

    5. #4
      Junior Member fshaw's Avatar
      Join Date
      Feb 2009
      Posts
      4

      Default I am very very close but i need to have a idea how to debug my java script

      I need to tell if my java script is being called now that my leastest version of my templete i now get my selection in the dropdown to actual display the correct calendar the one selected by the user in the drop down.

      Here is the working copy you can see the changes i had to make!

      PHP Code:

       
      <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[left]; 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="btn btn-primary" value="$vbphrase[go]" onclick="process_selected(this.form)" <br />
           </div>
      </form> 


      Ok The above works but how can i debug my java script so that I know it is being called without have header output errors which would happen if i just do a echo someone must have a trick that i can use.

      I could do a echo and then exit but that will not really helo if i want to keep the web page coming up and if i use the echo the web page will over write my echo?

      THANKS

      Frank H. Shaw

    6. #5
      ModernvB.com Owner Gio~Logist's Avatar
      Join Date
      Oct 2008
      Posts
      1,208
      Provided Answers: 30

      Default Re: I do need some help can anyone look at this and tell me what i need to do

      Try an alert
      HTML Code:
      alert('This is working!');

    7. #6
      Junior Member fshaw's Avatar
      Join Date
      Feb 2009
      Posts
      4

      Default Re: I do need some help can anyone look at this and tell me what i need to do

      This is my least try it getting this to work for me and I tried the alert and it still does not seem to be working yet?

      Can you help me by reviewing the following:

      PHP Code:

      <script type="text/javascript"> function process_selected(form) {
                              
                   
      alert('This is working!');
                   
                   
      form.submit();
      }
      </script>


      <form name="myfrom" action="calendar.php" method="get" onsubmit="process_selected(this)" >
      <div class="smallfont" style="text-align:$stylevar[left]; 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="btn btn-primary" value="$vbphrase[go]" onclick="process_selected(this.form)" > <br />
           </div>
      </form> 

      THANKS

      Frank H. Shaw

      PS I do not think i am any closer and need some really good help on this THANKS

    8. #7
      ModernvB.com Owner Gio~Logist's Avatar
      Join Date
      Oct 2008
      Posts
      1,208
      Provided Answers: 30

      Default Re: I do need some help can anyone look at this and tell me what i need to do


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •