I'm trying to use Ajaxplorer as a way to choose a file on the server and publish the file path in a form (basically linking the file to a db record). I want the behavior to work like CKFinder's popup functionality. I want the user to click a "choose file" button, Ajaxplorer appears in a new window, the user selects the file, and then the path to that file is sent back to the form and the popup is closed. I'm pretty sure that this is possible because the CKEditor plugin for Ajaxplorer seems to do just that.
I'm new to Ajaxsplorer, so I am just digging in. I was hoping that I could somehow pass a callback method to Ajaxplorer that would populate my field on select. However, it doesn't appear that I can do that based on the docs.
The other option looks like creating a plugin. I'm happy to do this, but the documentation is weak and it seems like others would have done this by now. So, before digging in to that for hours trying to learn the plugin system, I wanted to pose this question to the community. Is there documentation or a plugin for Ajaxplorer that will allow me to send selected file info from a popup window back to my form?
I was able to accomplish this by building a plugin. I have attached the URL to the plugin in case others may want similar functionality.
Ajaxplorer-Popup-Selector
Related
I want to build a website in which users can add information, like craigslist. I want the website user to be able to click a button fill out a form and add another box. For instance, if there is a three by three grid and the user clicks on the add button, I want a form to appear, them to fill it out and one more box to be permanently added to the grid. Of course I could make it happen with Javascript and JQuery but it isn't permanent. Thanks:)
You can Implement this using server side languages like PHP /Node JS, ASP.net, Java, Ruby or you can use Local Storage of the browser (this gives limited storage capacity ). read this for more details. link
If you don't already know PHP, you will need to learn it for this. Also, you will need to make sure that you understand how to validate input because letting users add to your database can be a very dangerous thing to do if you don't understand how things like script injection works.
I am trying to write a function that opens a new browser window and populate the email and login field and then click the submit button all from Javascript.
Lets say my domain is mynewweb.com and I want to open facebook.com/login page and populate the email and password fields from javascript code (such as document.getElementById) and then submit the form using some javascript code as well.
Is there any way of achieving that, any ideas. At the moment I am unable to achieve that I think its CORS issue but i'm not sure. But any idea of achieving that functionality or out of the box approach or something would be helpful.
Thanks
If I understand right, then you want a function that's not based on websites, but on browser functionality.
There are plenty of form filling plugins for different browsera, just look on their addons page.
Is it possible to extend somehow logwork screen in Jira 4.3.3 in order to run custom javascript code when the log button is clicked? I would like to append some custom text to comment text. I don't want to create jira plugin I would like to edit only logwork.jsp.
You should be able to modify the view if you like but I'd highly recommend against it. You will need to preserve or re-do entirely your changes every time you update Jira. It's more work up front but a plugin really is the best route.
I'm very new with JavaScript and I'm struggling to implement something which I don't think should be very complicated.
What I want to do is:
form is open in browser with a drop-down list of records in a database
if the desired option is not in the list, the user can click on a link next to it to add a new entry to the database
this will open a new window with an additional form for this entry
on clicking submit the processing script will run to insert this information into the database
when the processing script has completed, the window will close and the drop-down list will refresh so that it includes the new option (but without losing any other information in the form)
Maybe that last thing with the list refreshing is quite complicated (unless the list only in fact loads from the db on click?) but everything else should be simple enough, I think. I've tried all sorts of things but nothing that's got close enough to working to be worth posting here.
Could someone please give me some sort of idea of the sort of functions I should be using and roughly how to implement them? I don't necessarily need precise code, just a framework to work from. (I'll learn more in that case anyway.)
ETA: I should add that I've been trying to work with window.open() and window.close(). I don't even really know if this is the best method?
No, that's not(at least relatively) complicated. What you'll need is jQuery and jQuery UI(these frameworks are just suggestions, you may chose any other if you like) to achieve that. So...
form is open in browser with a drop-down list of records in a database
This part is easy, just a simple html form with a select tag and a add link/button on it. You will need a JavaScript function to refresh the select options from database. For that I suggest this or this -there are many others on the web- post.
if the desired option is not in the list, the user can click on a link
next to it to add a new entry to the database
this will open a new window with an additional form for this entry
The easy way to do this is using jQuery UI Dialog Widget to open the popup with the new form.
on clicking submit the processing script will run to insert this information into the database
On that form you'll have to use jQuery Ajax to send data to database through your server language(PHP, ASP.Net, JSP, whatever...). Some examples here and here.
when the processing script has completed, the window will close and the drop-down list will refresh so that it includes the new option (but without losing any other information in the form)
So when data processing was complete, you call the refresh select function that you created before and close the dialog on the ajax success callback. Example here.
And this is it. Now it's up to you. Hope it helps.
Hi im trying to build a mediawiki extension which requires AJAX calls during editing a page. All I need is to add a new edit button on the edit page which displays a javascript popup editor which in turn makes the appropriate calls.
I need to know if it is feasible in Mediawiki, to inject javascrpt code into edit buttons.
Any kind of information or leads are welcome!
Ok clearly the question is very specific, tht no one cared to answer. so if some one else wants to know how to add custom edit buttons in Mediawiki, this is how I did it
I found a Mediawiki help page which asks the user to edit a particular javascript page located at http://(wiki-site-url)/Mediawiki:Comomn.js .
On closer inspection this is not an actual js page but a normal wikipage(stored in the database as wikitext) which is loaded by mediawiki during runtime. The site admin can edit this page by adding
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "<path-to-image-on-the-server>",
"speedTip": "Comment visible only for editors",
"tagOpen": "open tag",
"tagClose": "closing tag",
"sampleText": "Insert comment here"}
}
This can also be achieved for a single user by applying the same edit on the users own copy of the js file available at http://(wiki-site-url/User:(Your_username)/(skinname).js
Both the js pages could be created if they dont already exist.
The wiki way is to put an HTML button into a Widget and put your JavaScript there, or better yet in its own Gadget