View Single Post
  #7  
Old 03-01-2009, 12:58 PM
Frank H. Shaw Frank H. Shaw is offline
 
Join Date: Aug 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vbplusme View Post
Use firefox debugging tools/plugins, javascript debugger
I am sorry I should have been a little clearer then what i am asking - Is there a general output / debuging function that is built in to vbulttin that I should be using to debug my scripts.

Up to this point ot has not been a problem to work around the issues of debugging but now that I am going to be getting my java function to be called from my form and still testing that to see of the handshaking is there or not.

What I do know so far is the following is key to bring up the correct calandar when selected from the drop down.

That is this:

PHP Code:

<input type="submit" class="button" value="$vbphrase[go]onclick="process_selected(this.form)" <br /> 
And the following is the key so there is some logic in the calandar.php or functions_calendar.php or some where else in the vbulletin system where ever that maybe.

It seems a lot of logic is built around this
PHP Code:
  value="$vbphrase[go]
and so i will have to go through the scripts looking for that logic maybe this with some luck i will find the logic this time.

THANKS

Frank H. Shaw

--------------- Added [DATE]1235920034[/DATE] at [TIME]1235920034[/TIME] ---------------

It still is not working my java function never gets called WHY?

Please explain WHY?

I have finshed my testing and do not see that my java function is getting called so what is wrong with the handshaking the calling of my java function from the onclick event is the onclick event not supported.

I need to some how have my java function called before submiting the form in a get - please again review my posting and see what needs to change? THANKS

THANKS

Frank H. Shaw

--------------- Added [DATE]1235955488[/DATE] at [TIME]1235955488[/TIME] ---------------

The handshaking is now working just fine and I should have a few other issues around this but at least my form is now calling my javascript function.

THE FOLLOWING WORKS:


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="button" value="$vbphrase[go]" > <br />
     </div>
</form> 
The reason that it needs to happen this way is the following:

The have to add the code to the form: <form name="myform" action="calendar.php" method="get" onsubmit="process_selected(this)">. So when the form is submitted (onsubmit) , the function process_selected will be run and it will pass a pointer to the form (this) as a variable.

Then the function will accept a variable and assign it the name form, and then it will submit it (form.submit()).

THANKS

Frank H. Shaw
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01470 seconds
  • Memory Usage 1,810KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete