[jQuery] Re: load script regarding to value of textfield
Use jquery's get() method. More about it here: http://docs.jquery.com/Ajax/jQuery.get Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Tue, Jan 13, 2009 at 2:40 PM, dirk w wrote: > > ides anyone? > > On 12 Jan., 17:43, dirk w wrote: >> thanks a lot for your help! >> is it possible to additionally explain me how i can execute this link >> through the ajax functions? that would be great! >> >> thanks in advance >> >> On 12 Jan., 15:53, "jQuery Lover" wrote: >> >> > Try this: >> >> > $('#searchButton').click(function(){ >> > var url = '> > src="http://gdata.youtube.com/feeds/api/videos?q='+ >> > $('#searchText').val() + >> > '&alt=json-in-script&callback=showMyVideos&max-results=7&format=5">'; >> >> > // ajax functions to call $.ajax, $.load, $.get, $.post >> >> > }); >> >> > - >> > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com >> >> > On Mon, Jan 12, 2009 at 1:49 PM, dirk w >> > wrote: >> >> > > hello community, >> > > i have some kind of a beginner question and i really would appreciate >> > > if you could help me with that. >> >> > > when someone types a value into the textfield and clicks on "search" >> > > or enter than the javascript line should be called regarding to the >> > > entered value. this should happen without reloading the complete page. >> >> > > # FORM >> > > >> > >> > > value="" size="30" maxlength="30"/> >> > >> > > class="button buttonText" value="Search" /> >> > > >> >> > > # Script to call >> > > http://gdata.youtube.com/feeds/api/ >> > > videos?q=' + searchTerm + '&alt=json-in- >> > > script&callback=showMyVideos&max-results=7&format=5"> >> >> > > see the "SearchTerm" in the js line, it should be replaced with the >> > > value of the textfield. >> >> > > thank you very much in advance! >> > > dirk
[jQuery] Re: load script regarding to value of textfield
ides anyone? On 12 Jan., 17:43, dirk w wrote: > thanks a lot for your help! > is it possible to additionally explain me how i can execute this link > through the ajax functions? that would be great! > > thanks in advance > > On 12 Jan., 15:53, "jQuery Lover" wrote: > > > Try this: > > > $('#searchButton').click(function(){ > > var url = ' > src="http://gdata.youtube.com/feeds/api/videos?q='+ > > $('#searchText').val() + > > '&alt=json-in-script&callback=showMyVideos&max-results=7&format=5">'; > > > // ajax functions to call $.ajax, $.load, $.get, $.post > > > }); > > > - > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > On Mon, Jan 12, 2009 at 1:49 PM, dirk w wrote: > > > > hello community, > > > i have some kind of a beginner question and i really would appreciate > > > if you could help me with that. > > > > when someone types a value into the textfield and clicks on "search" > > > or enter than the javascript line should be called regarding to the > > > entered value. this should happen without reloading the complete page. > > > > # FORM > > > > > > > > value="" size="30" maxlength="30"/> > > > > > class="button buttonText" value="Search" /> > > > > > > > # Script to call > > > http://gdata.youtube.com/feeds/api/ > > > videos?q=' + searchTerm + '&alt=json-in- > > > script&callback=showMyVideos&max-results=7&format=5"> > > > > see the "SearchTerm" in the js line, it should be replaced with the > > > value of the textfield. > > > > thank you very much in advance! > > > dirk
[jQuery] Re: load script regarding to value of textfield
thanks a lot for your help! is it possible to additionally explain me how i can execute this link through the ajax functions? that would be great! thanks in advance On 12 Jan., 15:53, "jQuery Lover" wrote: > Try this: > > $('#searchButton').click(function(){ > var url = ' src="http://gdata.youtube.com/feeds/api/videos?q='+ > $('#searchText').val() + > '&alt=json-in-script&callback=showMyVideos&max-results=7&format=5">'; > > // ajax functions to call $.ajax, $.load, $.get, $.post > > }); > > - > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > On Mon, Jan 12, 2009 at 1:49 PM, dirk w wrote: > > > hello community, > > i have some kind of a beginner question and i really would appreciate > > if you could help me with that. > > > when someone types a value into the textfield and clicks on "search" > > or enter than the javascript line should be called regarding to the > > entered value. this should happen without reloading the complete page. > > > # FORM > > > > > value="" size="30" maxlength="30"/> > > > class="button buttonText" value="Search" /> > > > > > # Script to call > > http://gdata.youtube.com/feeds/api/ > > videos?q=' + searchTerm + '&alt=json-in- > > script&callback=showMyVideos&max-results=7&format=5"> > > > see the "SearchTerm" in the js line, it should be replaced with the > > value of the textfield. > > > thank you very much in advance! > > dirk
[jQuery] Re: load script regarding to value of textfield
Try this: $('#searchButton').click(function(){ var url = 'http://gdata.youtube.com/feeds/api/videos?q=' + $('#searchText').val() + '&alt=json-in-script&callback=showMyVideos&max-results=7&format=5">'; // ajax functions to call $.ajax, $.load, $.get, $.post }); - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Mon, Jan 12, 2009 at 1:49 PM, dirk w wrote: > > hello community, > i have some kind of a beginner question and i really would appreciate > if you could help me with that. > > when someone types a value into the textfield and clicks on "search" > or enter than the javascript line should be called regarding to the > entered value. this should happen without reloading the complete page. > > # FORM > > value="" size="30" maxlength="30"/> > class="button buttonText" value="Search" /> > > > # Script to call > http://gdata.youtube.com/feeds/api/ > videos?q=' + searchTerm + '&alt=json-in- > script&callback=showMyVideos&max-results=7&format=5"> > > see the "SearchTerm" in the js line, it should be replaced with the > value of the textfield. > > thank you very much in advance! > dirk >