How can I display the selected value of the option using PHP?
For example I have this code:
var xx = document.xx.sbox;
if(document.xx.sbox.selectedIndex != 0)
alert("selected is "+xx.selectedIndex);
else alert("None is selected");
<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>
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?
Mucking around with the format parameter on a siteinfo call I got this
This was just now, around 0220 GMT, September 29, and the site is
<string>Exception Caught: Internal error in
ApiFormatWddx::slowWddxPrinter: Unknown type boolean</string>
wfDebugDieBacktrace('Internal error ...')#1
ApiBase::dieDebug('ApiFormatWddx::...', 'Unknown type bo...')#2
I set the following variables in LocalSettings.php file. The 'ccs.adnu.edu.ph'
is an intranet. It's our school's server so I can just access it within the
school. $wgServerName = 'ccs.adnu.edu.ph';$wgServer = 'http://ccs.adnu.edu.ph';
Say if i am accessing my page outside the school, having the address of my main
page http://ccs.adnu.edu.ph/wikibits/index.php/Main_Page, it can be viewed and
is still accessible. But when I tried logging in, i am redirected to this
address http://ccs/wikibits/index.php/Main_Page which is an invalid page. So, in
this case, the $wgServer has the value of 'http://ccs'.How can
i fix this properly?
Thanks, guys. ^_^
>On Sat, Jul 18, 2009 at 08:49:48AM +1200, Jim Tittsler wrote:
> > On 17/07/09 16:18, Dan Collins wrote:
> > > On Thu, Jul 16, 2009 at 11:20 PM, Jim Tittsler<j...(a)onnz.net>:
> > > > I have a bot (using mwclient 0.6.2) that nightly updates some
> > > > status pages on WikiEducator.org. It has suddenly started
> > > > failing with an 'Edit conflict' but I can edit the page by
> > > > hand and the script continues to write to another page. Are
> > > > there things that would prohibit the API from writing to a
> > > > page but still allow editing through the wiki?
> > > Yes. Specifically, an edit conflict will cause one attempt to
> > > fail and the next to succeed with no problem. For details see
> > > http://en.wikipedia.org/wiki/Help:Edit_conflict but essentially
> > > someone else changed the page while you were editing it and the
> > > wiki wants you to make sure you don't accidentally overwrite
> > > their changes.
> > I think there is something else going on. Writing to this
> > particular page now *always* fails through the API. It always
> > succeeds when I edit through the web. The history of the page
> > says only the bot and my test edits have been performed on the
> > page. The bot continues to write to other pages. Are there other
> > conditions that get reported as edit conflicts?
> Are you correctly supplying both the basetimestamp and
> starttimestamp parameters to the action=edit call?
I found this through:
I maintain cl-mediawiki (a common lisp pass through to the MediaWiki
api) and had this exact problem. The solution for me was to request
the revision timestamp rather than relying on the touched value
returned from asking for the action tokens.
Using the following query I get the correct timestamp (as well as the
touched which is incorrect):
My question is: What would cause the touched date to be different
from the last revision timestamp?
HTH and Thanks for the info,
Hello API wizards,
I'd like to generate article titles matching some generator criteria (e.g.
generator=embeddedin&geititle=Template:US state) and the first few
characters of the article title (e.g. "Al" to match Alaska or Alabama).
I have looked at the "list=search" function or using the "prefix" attribute
available on some queries (e.g. allpages), but it seems that these are only
useful in generating the initial title set, not for operating on titles
produced by a different generator.
Alternatively, maybe the "search" or "allpages" query could be used as the
generator, but then I'm not sure how to filter those results based on
whether they have an "embeddedin" template. Any ideas?
Why is it that there's a conflict on submit buttons between the page of
creating/ editing articles and to the special page that i've created. What i
mean is that after clicking the 'Save Page' button on the creating/editing page,
i am redirected to a blank page. But when I reload that blank page, i can now
view the page i just created/edited.
Is there something that I have to add to my special page to avoid this one? The
special pages that i've created are working. It's just strange seeing the blank
page because a user is supposed to be redirected properly to the page that they
I am using DumpHTML to export my entire MediaWiki contents to a static dump.
However, the static pages are not searchable even though there are the "Go"
and the "Search" buttons.
If it's impossible to get the Search function with DumpHTML, what else tools
I can use to dump my MediaWiki site?
Any idea would be greatly appreciated,