Javascript .Append() and Dynamic Hidden Fields? - php

I want to create something where you enter text into a text box, and when you press enter or a button it changes a section of words below to match what you entered into the text box... i have heard it has something to do with the stuff in the title but have not been able to find anything close to what i need to do with it, and all the tutorials i could find didn't make sense and still didn't solve my problem even if it did make sense... Can anyone help me in terms of giving me a good link or showing me sample code that is like this? Thanks!

$("#divid").append($("<div />").text($("#inputid").val()));

Related

How do i make wordpress search ignore a list of words?

I have a kind of complex wordpress search on my site, with some variables and selects beside the text field, and i want make this search ignore some words if typed on text field, but i dont want use a plugin for that and dont have any idea how to do it.
Someone did this before and can help me?

How to Make Input Field Carry Text into Google Custom Search on Separate Page

So I added Google Custom Search onto my site, and really like how it is functioning. One thing though, is that I want to make it so you can just click an input field at the top of the page, search, and have it redirect you to my page: http://www.example.com/search but put what they searched in the normal input field at the top of the page, into the google custom search box and search it.
More or less, this site right here is doing EXACTLY what I am trying to do, I'm not sure if its involving AJAX or what, but I am completely stumped and couldn't find a nice guide on how to do it anywhere.
http://www.a-g.com/ (try searching in the top right to see what I am talking about)
Is there an easy way to do this? Could anybody point me in the right direction at-least?
Thanks so much, have really been stressing about figuring this out.
You can visit the search URL with a q parameter like this: http://www.northtownsremodeling.com/search.php?q=gallery
So it should basically work by simply submitting a form via GET with a "q" parameter that contains the search string.
Something like:
<form method="get" action="/search.php">
<input name="q">
</form>
Demo: http://jsfiddle.net/csegM/

Jquery or javascript for search

I have been looking for a script or API that i could use. To be able to search through data from mysql..
I have managed to create a dialog box and load all the data from mysql into it..
what i wont to be able to do have a text box that when u type in there username it searches the data straight away for them and being able to do this without refreshing or close the dialog box...
Anyone who has any idea on how to do this or ahs done it and has code or anything the help is greatly apprenticed and sosry for the lack in knowledge about this kinda stuff i only know the very basic
AutoComplete plugin is your choice

Creating a span in an input field like Facebook messages

All,
I'm trying to create the same type of functionality that works with the Facebook messages. I'd like to basically have a list of spans (i'm guessing they do something like that) in an input textbox followed by the little to close it out.
Does anyone know how to create something like that?
Thanks in advance!
It's the tag and autocomplete textfield. You might want to check the plugin called chosen:
http://harvesthq.github.com/chosen/
or, this plugin, I think it's more relevant:
http://textextjs.com/
It's not actually an <input>. It's actually a list <ul> with a leading <input> for typing. Whatever you type, it appends to the list behind it, depending on the auto complete options.
there are several attempts to do this, found here:
http://ajaxian.com/archives/facebook-style-input-box

Facebook style comment box using jQuery

i was working on a facebook like website.and im really impressed with the facebook's commentbox.the toggle stuff are really awesome.can someone help me get something like that.
please dont send me this link http://demos.9lessons.info/multislide.php this is the most famous link on internet but i dont think it is like facebook from any point of view.please i need some serious help !!!!!!!
Well you already know the answer, no not the link you pasted, what you tagged your question with:
jQuery
You need to use AJAX via jQuery and modify a with CSS to get exactly what you want. You're coding in PHP so get use to the idea of making your own web controls by hand, it's very easy.
I doubt you're going to find anybody that'll write the code for you, and from the sound of it, you have done your homework and shopped around at the various script sites. What I would suggest is to break down the behavior of what you're looking for and what you have:
Facebook:
Simple link: "Comment"
Thin text box: "Write a comment"
Clicking link creates div under link or setting focus to text box transforms text box into textarea and button.
Clicking outside of div removes div from page.
When button is pushed and comment is made, a div is added between the original div and the link containing the text of the comment.
When textarea does not have focus, it returns the textarea back to its original state as a text box.
Perhaps it would be best to take the code already written for the link you posted and do these things to it:
Remove transitions
Change button elements into <a> tags
Make the "slider" box visible all the time, but have the contents shift
The box should have an <input type="text"> in it with an onfocus="" attribute set so that we can hide it and show the textarea when it's been clicked in
The textarea and button should be hidden until instructed to become visible (display:none)
Use a jQuery plugin to hide the textarea and button and revert to the text box when the comment div has lost its focus(es).
Hope this helps to some degree.

Categories