The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to access PHP files without opening a new browser window?
I want to access a PHP file with a few parameters, for example ?username=1&postid=2&type=3 but I don't want a new window to being opened.
And I want also to know how to auto update a number in the forum when a image, link is being clicked. The attached file is opening a new browser window and I do not want this. I want to change the HTML code, the green one which shows the number of reputation ( { vb : raw post.special_reputation } ) using Java Script when plus or minus button is clicked. Thanks in advance. |
#2
|
|||
|
|||
I'm not really an expert on javascript, but: what you want to do is take the url out of the href tag, so that clicking the link doesn't take you away from the page. Then in your "onclick" handler you need to call a js function that makes an "ajax" call. when you get a successful reply, in your callback function you can find find the document element that represents the number and change it's innerHTML property. Since I only know the basics and there are plenty examples of ajax calls out there, it's probably better to do a search to find one (or maybe someone else will post one).
|
#3
|
|||
|
|||
I don't know how to call an Ajax function.
I need someone to explain me how to edit the HREF line or the ONCLICK line to stop opening a new window but PHP file to be executed successfuly. |
#4
|
||||
|
||||
I don't think it is something that can be explained. You will need to go read up on how to make an ajax function and call. I think there are some articles here about it, in the articles forum, or do a google search for a tutorial on ajax calls.
|
#5
|
||||
|
||||
Try this http://www.w3schools.com/jquery/ajax_ajax.asp and there's much more on that site to learn about ajax and JS, or this site http://net.tutsplus.com/tutorials/ja...s-with-jquery/
|
#6
|
|||
|
|||
Thank you so much all, but you forgot to say that I need jquery.js file!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|