How to create an html look up field. So, I want to achieve
an html input field, with an icon/button next to it
when user click on it, a pop-up window displays with a search form (I assume this can be created beforehand and hide using javascript)
user apply search, and data is displayed in the same (pop-up) window
when user select a value and apply ok, the field value is copied to the original input filed, and pop-up window closes.
Any sample code? Is there any simple way without using any java script library? or any simple plugin for jquery.
thanks.
It would be possible, but very unwise to do this without any libraries or plug-ins.
I strongly recommend jQuery UI's Dialog widget. It's very simple, well documented and easy to use.
You will probably be interested specifically in how to use the Dialog to display a form. Click the View Source link on that page to see all of the mark-up and code required to achieve that effect.
Related
In Salesforce, we have a button that creates events with the fields already filled out, but after the item is created I want it to reload the screen in the "Edit" view in case they want to change anything. Any ideas?
Do you need to validate fields values? Maybe it will be easier to do with field validation rules? It can be useful in cases when your data is populated not only from user screens, but also can be created in code (classes/triggers) or via API.
If you know that you exactly should to use JavaScript, you can add standard event attributes to command buttons on your Visualforce page and write JS functions for implementation of your validation logic.
I ended up creating a visualforce page with a controller and a custom button to accomplish what I needed.
My question is what language is required if I had a sign up form in a dialog box, and depending on my users input, have the page update with the selection? For instance, a user would sign up and a pop up box asks to upload picture and select a few inputs and the background is dynamically updated with the user's selection. I know jquery and ajax of course has to be involved but is there any others? I have tried to google this but i have no luck.
example: https://twitter.com/signup
As you are signing up they give you a selection and if you choose one it dynamically updates the background. Forgive me if my question is vage.
in adidtion to jQuery you will likely want to use a plugin for a rich lightbox. I recommend the jQuery colorbox plugin
Here are some other options
Is it possible to put a form into an alert box and then display that to the user? Afterwards I would want to submit the data but I presume it would work the same via a 'POST' method or such.
I had a quick play around but couldn't get it to work, not much on search engines either.
Thanks for any help!
An alert box is not editable. You can use javascript to create a new browser window with your form in it.
General form is like this: window.open('url to open','window name')
You will fall foul of popup blockers if you handle 'when' you do this badly.
This is quite a nice simple walk through with live examples http://www.pageresource.com/jscript/jwinopen.htm
You could use jQuery UI's dialog. This allows you to turn a DIV into a pop-up box.
I would recommend you jquery shadow: http://www.htmldrive.net/items/show/650/jQuery-Custom-PopUp-Window.html
Or if you want you can develop your own form (html, design, css, javascript).
If it's just a single input, you can use the built-in prompt() method.
Otherwise, you would have to pop up your own form.
Here is script in my website's footer that will check that specific font installed or not in computer. If installed or not it will prompt alert box. I want to customize:
Design of that alert box
Replace the 'OK' button with 'Download' button that also have download link.
Write some RTL words in new paragraph. For Example Urdu words like آپ کے کمپیوٹر میں۔۔۔۔
Just accept that it's not going to be an alert() box, but rather it's just going to be normal HTML+CSS. So you will just position the box wherever you want it with whatever buttons you want and whatever way you want it to look. Or if so you'd whish their are plugins which already do this for you (though they limit your options quite a bit of course). You might want to look at jQuery UI if you're using jquery for example (specifically the dialog component of jQuery UI).
you have to use jquery dialog box for this type of customization. Use this link
I use Sweetalert for designing the Alert box. its easy, simple and efficient.
here is the link to download SweetAlert and example codes worked out at Here
Is there a method to fill the textfield from a Facebook comment plugin using javascript?
I know how to fill the text into textbox of website using active control by javascript, but it doesn't seem to work on the Facebook comment plugin.
eg. if I click the hello button I want to fill the active textbox text with "hello".
You will need to make sure that you execute your action after the textfield appears in your UIWebView. However, I will highly recommnend making a delegate method instead, detecting the facebook button click, and use the Facebook SDK instead.
Much more freedom instead of having to "hijack" the html and manipulate it after load.