Retrieve & display image from database - using AJAX[POST
Hey all, I'm kinda stuck on this. My situation: I have a MySQL database with a table where I store images (the file name, the mimetype of every file and the binary data in a BLOB plus a unique ID). Now what I'd like to achieve is to load an image from the database using AJAX and the POST method. Viewing a specific image using the GET method is quite simple, I just set the SRC attribute of an <img /> HTML tag to link to the PHP file and set the correct GET variables, there's no AJAX needed for that.
[jQuery] Specifying THUMBS in JCarousel -- sorry if this has been answered elsewhere
Probably a stupid newb question, but -- Can I specify the thumbnail files that JCarousel is going to use rather than having the plugin generate its own thumbs? I already have the data -- it seems silly to waste processor time on thumbnail generation when the thumbs are already available. This question has probably answered elsewhere, but I haven't been able to find the thread -- thanks for anyone who can help me out. I've read through Sorgalla's docs several times to no avail. Chad
image gallary
Hi, I have a image gallary where i use a jquery carosel to scroll through all the images. I want to put a onclick event on each of the images so that when the user clicks on the image, it then brings up the full image of that image in a placeholder i have for it. (not in a popup). how can i do this in jquery /ajax? thanks for your help
[jQuery] [validate] mulitpage forms
Hi, I am using a variation of the multipage form in the demo and run into a small problem with the pageRquired function. Seems it does not validate correctly if you add any custom selectors after the pageRequired. I am trying to make one field required depending on whether another field is blank, eg: class="{pageRequired: '#field1:blank'}" In this case, the validation is completely ignored, even if I have {pageRequired:true}. It will only validate if I have class="pageRequired" without the curly
[jQuery] Tablesorter and zebra - does not stripe rows on initial sort
With a tablesorter config that looks something like this: $("#table").tablesorter({ cssHeader: "sortAble", cssAsc: "sortAsc", cssDesc: "sortDesc", headers: {3: {sorter: 'time'}}, sortList: sortOrder, widgets: ['zebra'], widgetZebra: { css: ['','alt'] }, debug: true }); The alternating row style is not applied to the odd/even rows on the initial display of the table. If a user clicks any of the headers to change the sort-by column, or to change the sort-order, then
[jQuery] jQuery, MooTools, and Prototype - A Comparison
After a badly needed pause of some length, my need for sophisticated JavaScript has reemerged. During my departure I have discovered two other similar JavaScript modules called MooTools and Prototype. With my reemergence I have also realized that all of these require a certain amount of commitment that goes beyond what I initially anticipated. What I would like from you all is a convincing argument to remain that is based on the following comparison: 1) What are the principal advantages of jQuery
[jQuery] Read "Pro JavaScript Techniques"?
Have you read the book "Pro JavaScript Techniques" Published December 2006? Still good / applicable? (book image and links at http://jspro.org/ ) Do you know of an active and better email list (or discussion group) for such general JavaScript questions? Thanks. Michael Finney
[jQuery] [validate] Which one do I need to put? Very simple question.
I could not find any document about this. In js script, are firstname, flasname etc from id or name in the html? For example in js var validator = $("#signupform").validate({ rules: { firstname: "required", lastname: "required", username: { required: true, And in a html, <td class="label"><label id="lfirstname" for="firstname">First Name</ label></td> <td class="field"><input id="firstname" name="firstname" type="text"
[jQuery] superfish layout
Hi all, i want to change the layout of the superfish navbar, but can't get my grip on the CSS. I want to lose the backgrounds so the menu is only text. This way it will fit into my site. Who knows how i do this?
[jQuery] SOT: jQuery and AIR: Creating a new AIR project in Aptana (with video)
Hey everyone... I've been spending a lot of time over the last year working on jQuery/JavaScript and AIR applications, I even did a presentation at a recent conference in Minneapolis. There's not a lot of information out there about JS and AIR working together so I thought I'd start blogging about it. The first in what will hopefully be a long and rich series was just released. It's called "jQuery and AIR: Creating a new AIR project in Aptana" and includes screenshots and a video demo. http://snurl.com/iuhsy
[jQuery] superfish layout
Hello, i can't get my grip on the CSS of the superfish. I'm using the navbar system, but i want to use it without the backgrounds. So that the menu fits in my site. What do i need to change? Greetings Bjorn
[jQuery] Event behaving
Hi, I have a question why is this not working: $("button").keypress(function(e) { e.preventDefault(); alert("hello"); }); but this here: $("button").click(function(e) { e.preventDefault(); alert("hello"); }); For my understanding when I hit enter in a form keypress should work?! thx TC
[jQuery] does selectors $ cache?
does selectors cache? for example, if I do $('#myid') twice, does it search through the document twice for myid?
[jQuery] Hiding a cfoutput until clicked
Hi There i want to hide my phone numbers in an output page so that the viewer has to click an icon to see it. i have the following jquery so far: <!---JQuery test to hide phone---> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $("contains:('freelist.busphone')",this).hide(); }); and this is the code with the phone number i want to hide: <cfloop query="freelist" startrow="#URL.offset#" endrow="#limit#"> <cfoutput> <tr bgcolor="###iif(currentrow
[jQuery] Validate textbox on particulare selected combo value
Hi all, I have a select (combobox) like this: <select name="role" id="role"> <option value="Admin">ADMIN</option> <option value="User">User</option> <option value="Other" id="Other">OTHER (specify)</option> </select> and a textbox like: <input name="txtOther" id="txtOther" type="text" /> I'd like to validate the textbox if the selected choice is 'Other'. I'm trying this code: $(document).ready(function() { $('#txtOther').hide(); $('#role').change(function() { var itemValue = $(this).val(); //alert('ItemValue:
[jQuery] Submitting Form does not refresh Text Area
I have 4 forms on my HTML Page and 1 text area in each form. This text area displays some content to user after reading from Database. But when form gets submitted, the textArea does not get refreshed. This is the code: $cgi->textarea({-id=> $res."CommentHistoryId", -name=> $res."CommentHistory", -rows=>"4", -cols=>"60", -readonly=>"readonly", -default=>$commHistory})); Even Adding following does not help: my $historyId = $res. "CommentHistoryId"; print $cgi->script({-language=>'javascript'}, 'var
jQuery YouTube video image getter plugin
Hello everyone, I have created a jquery plugin for youtube videos. It takes YouTube video's URL and returns its screenshot. You can also define the returned YouTube video's thumb size as well by giving second parameter "small", "bid". Here is youtube plugin page and desicription and how to use info. Here is how to use: // Returns big screenshot by video id var thumb1 = $.jYoutube('rSUfWXcNAOw'); // Returns small thumbnail by YouTube video URL var thumb2 = $.jYoutube('http://www.youtube.com/watch?v=rSUfWXcNAOw',
[jQuery] trying to implement accessible_news_slider in a site
I'm trying to implement this http://www.reindel.com/accessible_news_slider/ on http://mercantipercaso.com/ I would to surf .articoli under Eventi but I'm totally lost on how to modify the jquery.accessible-news- slider.js They used an ul in the example,I've got just a <div class="articoli"></div> per 'event',thought it should be easy to implement it,but now I don't have absolutely idea on how to do it.
[jQuery] Need help optimizing/analyzing jquery / json
Hello Guys, I have created a site using jquery www.arc-max.com/cruisesearch/ the problem lies in the initial loading of the result page (the front page is a bit slow but that I can optimize that on my own) . I am using json to store the result set. The json file can get a bit bloated up anywhere between 200-400kb depending on the number of results . After optimizing the graphics and using gzip I have been able to reduce the load time to around 20 seconds depending on the number of results (this based
[jQuery] Validate between textboxes
Hi all, having 3 textboxes, how can I validate to make one of them required if the other two are not compiled by the user? Thanks in advance. Luis
Syntax Help With Hiding All Controls Except The First
Hi, I'm still trying to get to grips with jQuery syntax, so I'd appreciate any help you can offer, or any good resources you can point me to. I'm working on an accordion-style menu and I'm struggling to get a hide behaviour to work. Basically I want to hide all of the controls within my specified parent control which have an ID starting with "accordionBody_" except the first one. (So that the first pane is expanded and the rest are hidden on load.) I'm using the following: $('#' + containerId).find("div[id^='accordionBody_']:not(:first)").hide();
why not <p> works
I have written this code to strip html from the paragraph (<p id="p1">......</p>)- t('#p1').text(t('#p1').text()); I tried it and tired. Then somehow remembered that may be <p> will not work and replaced the <p> tag with <div> tag and the same JQuery code starts working. Why ?
Trying to add a public function to a jQuery object...
Hi guys, I'm a jQuery newbye and am currently trying to understand the basics. I'd like to add a public function to a jQuery object representing a div with a given class. Here is the code I am using : $(function() { var obj = $("<div class='foo'></div>"); // Add foo function to jQuery object obj.addFooFunction(); // Call foo function (DOESN'T WORK) obj.fooFunction(); }); (function($) { $.fn.addFooFunction = function() { var foo = "foo"; $(this).fooFunction = function()
[jQuery] Loading google map js on a certain point of action
Hi, on my contact page, I have some hidden divs. One is for a google map. This div is only shown when the user has clicked to open the div. As I am working with smarty my template looks like this: <span id="gmap"> {literal} <script src="http://maps.google.com/maps? file=api&v=2&key=ABQIAAAAp1kkS_NlSeBqN9yg50Bb9hTRRxoX5cqBbtB- sMaIPwRkCNveuxTK0oI3HaFAjNd9OtVNIVqQYPII7g" type="text/javascript"></ script> {/literal} <div id="map_canvas" style="width: 518px; height: 400px;"></div> </span> .... <a class="plainPopup"
Multi select used to toggle other elements
I have a multi select in a form and underneath this corresponding check boxes which are initally hidden. What I wish to do is when the user selects or deselects an item in the multi select the corresponding check box is toggled to either show or hide. I was imagining it would be something like this, I'm not sure what to put in place of the question marks. I've already tried click and select $(document).ready(function() { //Hide the checkboxes $('#checkBox1').hide(); //When the user selects an option
[jQuery] Superfish with multicolumn sub navigation
Is it also possible to use superfish with a multicolumn navigation like below? I tried it out but the superfish effect isn't that smooth, the nav_sub will just show without any nice fade-in & slidedown effect. I think because Superfish normaly targets the ul ul but now it has to target the <div class"nav_sub"> I hope it's possible because superfish is really awsome and it would be nice if it also works with the new big subnavigation trend.... <ul> <li> <a href="#">item 01</a> <div
Help with show/hide
Hello I have this script function initMenu() { $p('.show-hide-layer').hide(); $p('.layer-btn').click( function() { $p(this).next().slideToggle('900', 'easeOutQuart'); } ); } $p(document).ready(function() {initMenu();}); }); and the html <tr><td> <a class="layer-btn">testlink</a> </td> <tr> <tr class="show-hide-layer"> <td> content </td> </tr> I want this function to work on every row but I just cant make it work at all.
[jQuery] jQuery.post -> PHP script -> redirect
Hi All, I have following problem: I would like to post (jQuery.post) login-form variables to the PHP script ("backend.php") for validation and if it is succesfull then redirect to "myaccount.php". Here is my code: <script type="text/javascript"> $(document).ready(function() { $("#submit_butt").click( function() { // configurations for the buzzing effect. Be careful not to make it too annoying! var conf = { frequency: 5000, spread: 5, duration:
[jQuery] Make textbox visible if checkbox is selected
Hi all, having a simple textbox: <input id="myText" name="myText" type="text" visible="false" /> and a checkbox: <input name="myCheckbox" id="myCheckbox" type="checkbox" /> how can I make the textbox visible if the user select the checkbox? Thanks in advance. Luis
[jQuery] THeory: dealing with really big data sets
Hello, I was hoping someone can help me with this problem . I wanted to create a site like www.kayak.com only for a different industry the concept being the filtering process. I understand using json and jquery. However i am wondering if anyone had any idea if json would be a good idea to go with for really big data sets for example a search resulted in 5000-100000 records. Would the json file very big ( assuming that each row had probably 2000 character) my main concern being initial loadup speed.
[jQuery] Menu slideUp is very erratic
Hi all, I've inherited some unfinished code for a menu system (previous developer left the company before he could finish it). The menu worked fine until the client wanted some nested lists, which is when the height was being set incorrectly. I had a fiddle and I can get the height to report correctly, but it's extremely erratic as to when it will actually drop down. I've stripped the code out into a file on its own, complete with a lovely colour scheme. I'm pretty sure the code I added can be streamlined
[jQuery] jCarousel Question
Hello. I have a question regarding jCarousel usage. I am able to configure jCarousel to display items on more than one horizontal line? For example: back 1 2 forward ------ 3 4 --------- 4 items per section, 2 on each line. Thank you!
[jQuery] tablesorter bug? How can I use tablesorter plugin to sort float?
HI: I found tablesorter plugin failed to sort the float if the float is in scientific notation? Eg. the tablesorter asc sorted result of float list is : [ 7e-06,4e-05,0.051116,0.00518,0.0].
[jQuery] performance of html(val)
I am constructing a large table on the fly and add it to the dom using html(val). It takes about 6 seconds. I am wondering if there's any practice that would speed up this process? thanks!
[jQuery] JQuery Cycle Help!
I am really someone can help (fingers crossed anyways!) I am trying to implement the cycle plugin into this page: http://staging.visualintent.com.au/cc2/index4.html It all seems to be working well in Firefox etc but not Internet Explorer 6+ and I have no idea why! Basically I am trying to have the 9 square images cycle when you rollover the specific menu item (just for the middle top square at the moment), but in IE, you will see that the middle column shows all the images in rotation... I do not
[jQuery] jquery v1.3.2 breaks the fly-out menu of Superfish in IE6.
I hope this post is appropriate, because this is the only way I could contact the author who wrote the script. quote: "If you need help with the jQuery/JavaScript aspect of the plugin, post a message to the General jQuery Google Group with the word “Superfish” " Thanks.
[jQuery] jquery jsonp
Hi has anyone worked with jsonp within catalyst, so I understand what needs to be done from within catalyst when I use $.getJSON or $.ajax Regards Matthew
[jQuery] Code Review: slideshow plugin using JSON
I was looking for a jQuery slideshow that worked the way I wanted and didn't find one. I figured you can never have too many slideshow plugins so I've tried to make my first jQuery plugin and was hoping people with a bit more jQuery experience could look it over and give some suggestions before I go around telling people about it. This slideshow requires the first slide to be in the HTML and then it preloads the next image in the rotation just before showing it making the initial page load time faster.
[jQuery] Question on encode/decode of JSON - server-side and client-side
I am building a client-side and server-side solution and want to use JSON through Ajax in both directions. I have ASP or JavaScript server-side, though Microsoft's support of server-side JavaScript seems nil, so I am reluctantly conceeding to use ASP. I'd appreciate suggestions on available solutions to encode/decode JSON on the server-side (ASP or JavaScript). I don't plan to load jQuery server-side so that rules out plug-ins. I'd also like to know what is the latest client-side encode/decode for
[jQuery] Using a selector recursively
I have the following code: <div id="test"> <div class="ajaxApplyIgnore"> <span><a href="javascript:ajaxApplyAll();" class="">Test1</a></ span> </div> <div> <span><a href="/Logout" class="">Logout</a></span> </div> </div> <script> var obj = $('test'); // used specific div, as this is in a huge document obj.find('.ajaxApplyIgnore a').addClass('red'); </script> The js code above will not select the Test1 link, even though it is found within the div layer with the ajaxApplyIgnore class. It seems that
Next Page