vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Need a very simple example AJAX script in vbb (https://vborg.vbsupport.ru/showthread.php?t=186277)

mokujin 07-24-2008 08:51 PM

Need a very simple example AJAX script in vbb
 
Hi all, I am learning AJAX but I need some example, ex. for loading a text from another php file
I read articles but they are not enough yet.
Thank you

Lynne 07-24-2008 10:33 PM

Have you tried doing a search in the modifications forums for mods with the word "ajax" in the title and then downloading them and taking a look at the code?

Dismounted 07-25-2008 06:41 AM

AJAX in general, or AJAX in vBulletin?

mokujin 07-25-2008 05:12 PM

Quote:

Originally Posted by Lynne (Post 1583440)
Have you tried doing a search in the modifications forums for mods with the word "ajax" in the title and then downloading them and taking a look at the code?

HI, yes of course that I have tried search all ajax mods, but you know, I dont understand them that all :(

Quote:

Originally Posted by Dismounted (Post 1583619)
AJAX in general, or AJAX in vBulletin?

Hi, I need AJAX in vBulletin, I am trying to code my first mod with AJAX.

Lynne 07-25-2008 05:31 PM

ajax is basically javascript, so if you have an understanding of javascript, you can probably just go from there.

Did you check out the Articles forums?
[Tutorial] Developers Introduction To AJAX Technology
Intergrating AJAX Technology Into Your Modifications

mokujin 07-25-2008 06:38 PM

yes i know a bit of javascript, but ajax, i need step to write it. thanks

Dismounted 07-26-2008 04:54 AM

I don't think there are any up-to-date tutorials on AJAX in vBulletin (after it switched to using YUI).

MoT3rror 07-26-2008 05:19 AM

<a href="http://developer.yahoo.com/yui/connection/" target="_blank">http://developer.yahoo.com/yui/connection/</a>

mokujin 07-27-2008 05:49 PM

thanks all for helping me. I have the function how to call back script with a form (I mean something like
HTML Code:

<a href="#" onclick="myfunction(1,true)"> my text id 1 </a>
.

But I need from a link, I mean http://mysite.com/myscript.php?#,1 => Where 1 is my text id and call to the script without by click a form.

I hope that you understand, my english is too bad.

Thank you again :)

Dismounted 07-28-2008 06:20 AM

You need to call your PHP script via AJAX in "myfunction()".

Opserty 07-28-2008 07:37 AM

After a quick look yesterday, I found the vbulletin_reputation.js file probably the simplest one to understand. You may be better off investigating that.

I doesn't look like an easy task though! :D

Dismounted 07-28-2008 11:51 AM

The only thing you (really) need to know for AJAX apart from coding the PHP response and basic Javascript is this little piece of code:
Code:

YAHOO.util.Connect.asyncRequest('POST', scriptpath + '?do=ajax', {
        success: this.handle_ajax_response,
        failure: this.handle_ajax_error,
        timeout: vB_Default_Timeout,
        scope: this
}, SESSIONURL + 'securitytoken=' + SECURITYTOKEN + '&foo=' + foo);


mokujin 07-28-2008 07:17 PM

Its too difficult for me now :D
Can you Ops or Dis make a demo for me? I know that it takes too much time :)

Thank you so much :)

Dismounted 07-29-2008 06:45 AM

My suggestion is to look at someone else's code - but you don't really need to as I've given you the Javascript for AJAX calls already.

mokujin 07-29-2008 07:13 PM

Hi, I have looked at some codes but I dont know how to :((

I saw someone else's code that they use onLoad on body tag. Can I use that tag?

Or please Dismounted could you write a code for me? Thank you so much

Dismounted 07-30-2008 06:52 AM

I have written the code for you...

mokujin 07-31-2008 06:15 PM

Thanks, but I cant use the code :( I have seen that hack (https://vborg.vbsupport.ru/showthrea...ighlight=forum), it has function what I need. Can you help me again?


All times are GMT. The time now is 01:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01016 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete