How can I display the selected value of the option using PHP?
For example I have this code:
<script language=javascript>
function sevent()
{
var xx = document.xx.sbox;
if(document.xx.sbox.selectedIndex != 0)
alert("selected is "+xx.selectedIndex);
else alert("None is selected");
}
</script>
<form name=xx>
<select name=sbox onChange="sevent()">
<option value="default">Select Option</option>
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
</select>
</form>
Here, it prompts whatever option you select. What I wanted to do is to display
the value of the selected option using PHP. How can do it?
Thanks. ^_^
I am the WikiSysop of my Bikol Thesaurus. I need also other people as
administrator(s) in order to supervise synonym/meaning contributions of users.
And also, users will know who the administrators are. How can i promote a user
as one of administrators?
Thanks guys!
Hi,
I have a requirement to inspect a given wikipage's url to determine if its
size exceeds 500kb, and to get the page, truncate it to 500kb and pass it to
some api.
I couldnt find a way to determine the size of a wikipage through the api.
I also tried to call HEAD on the wikipage. I do get results sometimes, but
sometimes I get an http 403 forbidden. The same thing happens with http GET
on the page. The pages I tried most often for testing were
http://en.wikipedia.org/wiki/Barack_Obama and
http://en.wikipedia.org/wiki/United_States.
Can you suggest an effective way to achieve the requirement above?
Thanks
Anand
Hello,
I will use the mediawiki API to edit page in my wiki.
First, with POST requets, I make :
api.php?action=login&lgname=***&lgpassword=***&format=xml
I take the cookies and send, also in POST, :
api.php?action=query&prop=info|revisions&intoken=edit&titles=Utilisateur:JonathanMM/Test_Trillian&format=xml
I have a token. I take this token and use the urlencode function in this
token.
Then, I make :
http://www.nocle.fr/nolife-wiki/api.php?action=edit&title=Utilisateur:Jonat…'.$token.'&format=xmlfm
But, I have this error :
<?xml version="1.0"?>
<api>
<error code="badtoken" info="Invalid token" xml:space="preserve">
</error>
</api>
Where is the problem ?
Thank's for your help, and sorry for my English, but I'm french ;)
JonathanMM
Hey all,
i hope someone of you can help me with the following questions.
Is it possible to fetch the entered text of a user e.g. every 30 chars and with this i like to visualize content in a dynamic information box, such here http://en.wikipedia.org/w/index.php?title=Java&action=edit
Example: The user entered a text over 30 chars for a new created page by him..
After that, the infobox shows up something like this:
You entered:
"Java (Indonesian: Jawa) is an island of Indonesia and the site of its capital city, Jakarta. Once the centre of powerful Hindu-Buddhist kingdoms, Islamic sultanates, and the core of the colonial Dutch East Indies"
This is very similar to the Article Java_Platform,_Standard_Edition .
What the info box will display doesn't matter. First of all i need to get entered text, every time when new 30 chars where entered by the user. Second, i want to display some information.
Is this possible? Any hints? Examples?
I hope you can help me! Thx in advance
Martin
Hey all, I hope someone can point me in the right direction:
I'm fairly sure this is caused by an extension we've written, but I don't know where to look.
We are using MW 1.13.2 and are not able to upgrade at this time.
We work on a closed system, and have written *many* extensions and hooks to our wiki.
We have only two extensions to the API. There is no extra whitespace or output from the API extensions. (I comment out the include and the $wgAPIModules['function'] lines for both of them, call the API and still get the error. I tried calling the live wikipdeia api and do not get this error. So the bug is very likely our own, but I don't know where to look.
I get the following error when I call the API (any action)
XML Parsing Error: XML or text declaration not at start of entity
Location: http://localhost/path/to/wiki/api.php?action=actionx
Line Number 2, Column 1:
Where else should I look for the output/whitespace?
Thanks,
Sean
Hi:
I have been using the API (http://en.wikipedia.org/w/api.php) and found
some problem. I would like to get a random article of a category or
child categories. I mean if I need a random article of "Science"
category, so the result can be an article in "Astronomy" category, or
"Biology" category.
"random" command just have namespace not category, and "categorymembers"
has not recursivity.
The problems is categories are not nested so I guess there's no command
that give that recursivity since an article has just "parent categories"
and not all the jerarchy information.
I have tried to mix "random" and "categorymembers" with generators:
http://en.wikipedia.org/w/api.php?action=query&list=random&generator=catego…http://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle…
... but no luck
The only solution i'm thinking is to code some random depth search in
the category I want to get the random article, and then search in that
category any random article. So, I can use "categorymembers" command to
deep a random number of levels, and then take the article there.
Is there any nice solution ?
Thank you
queridos TODOS!
les pido que me perdonen por la falta de contacto email/telf.
he estado muy complicado y espero hacerlo pronto ...
deseo que Dios los bendiga a TODOS y les conceda mucha salud,
paz, amor y felicidad. que pasen unos bellos dias en union
de sus seres queridos y que el nuevo anio sea un poco mejor
para toda humanidad.
un sincero abrazo!
FELICIDADES!!!!
roberto
======================================================================
dear ALL!
excuse me not contact by email/phone.
i was very busy and i hope to do that at return ...
please receive my best wishes of health, peace,
love and happynest in XMAS and a nice NEW YEAR!
sincerey yours!!!!!!
roberto