Search Results

Search found 316 results on 13 pages for 'blur'.

Page 12/13 | < Previous Page | 8 9 10 11 12 13  | Next Page >

  • Planning an Event&ndash;SPS NYC

    - by MOSSLover
    I bet some of you were wondering why I am not going to any events for the most part in June and July (aside from volunteering at SPS Chicago).  Well I basically have no life for the next 2 months.  We are approaching the 11th hour of SharePoint Saturday New York City.  The event is slated to have 350 to 400 attendees.  This is second year in a row I’ve helped run it with Jason Gallicchio.  It’s amazingly crazy how much effort this event requires versus Kansas City.  It’s literally 2x the volume of attendees, speakers, and sponsors plus don’t even get me started about volunteers.  So here is a bit of the break down… We have 30 volunteers+ that Tasha Scott from the Hampton Roads Area will be managing the day of the event to do things like timing the speakers, handing out food, making sure people don’t walk into the event that did not sign up until we get a count for fire code, registering people, watching the sharpees, watching the prizes, making sure attendees get to the right place,  opening and closing the partition in the big room, moving chairs, moving furniture, etc…Then there is Jason, Greg, and I who will be making sure that the speakers, sponsors, and everything is going smoothly in the background.  We need to make sure that everything is setup properly and in the right spot.  We also need to make sure signs are printed, schedules are created, bags are stuffed with sponsor material.  Plus we need to send out emails to sponsors reminding them to send us the right information to post on the site for charity sessions, send us boxes with material to stuff bags, and we need to make sure that Michael Lotter gets there information for invoicing.  We also need to check that Michael has invoiced everyone and who has paid, because we can’t order anything for the event without money.  Once people have paid we need to setup food orders, speaker and volunteer dinners, buy prizes, buy bags, buy speakers/volunteer/organizer shirts, etc…During this process we need all the abstracts from speakers, all the bios, pictures, shirt sizes, and other items so we can create schedules and order items.  We also need to keep track of who is attending the dinner the night before for volunteers and speakers and make sure we don’t hit capacity.  Then there is attendee tracking and making sure that we don’t hit too many attendees.  We need to make sure that attendees know where to go and what to do.  We have to make all kinds of random supply lists during this process and keep on track with a variety of lists and emails plus conference calls.  All in all it’s a lot of work and I am trying to keep track of it all the top so that we don’t duplicate anything or miss anything.  So basically all in all if you don’t see me around for another month don’t worry I do exist. Right now if you look at what I’m doing I am traveling every Monday morning and Thursday night back and forth to Washington DC from New Jersey.  Every night I am working on organizational stuff for SharePoint Saturday New York City.  Every Tuesday night we are running an event conference call.  Every weekend I am either with family or my boyfriend and cat trying hard not to touch the event.  So all my time is pretty much work, event, and family/boyfriend.  I have 0 bandwidth for anything in the community.  If you compound that with my severe allergy problems in DC and a doctor’s appointment every month plus a new med once a week I’m lucky I am still standing and walking.  So basically once July 30th hits hopefully Jason Gallicchio, Greg Hurlman, and myself will be able to breathe a little easier.  If I forget to do this thank you Greg and Jason.  Thank you Tom Daly.  Thank you Michael Lotter.  Thank you Tasha Scott.  Thank you Kevin Griffin.  Thank you all the volunteers, speakers, sponsors, and attendees who will and have made this event a success.  Hopefully, we have enough time until next year to regroup, recharge, and make the event grow bigger in a different venue.  Awesome job everyone we sole out within 3 days of registration and we still have several weeks to go.  Right now the waitlist is at 49 people with room to grow.  If you attend the event thank all these guys I mentioned above for making it possible.  It’s going to be awesome I know it but I probably won’t remember half of it due to the blur of things that we will all be taking care of the day of the event.  Catch you all in the end of July/Early August where I will attempt to post something useful and clever and possibly while wearing a fez. Technorati Tags: SPS NYC,SharePoint Saturday,SharePoint Saturday New York City

    Read the article

  • Scripting Part 1

    - by rbishop
    Dynamic Scripting is a large topic, so let me get a couple of things out of the way first. If you aren't familiar with JavaScript, I can suggest CodeAcademy's JavaScript series. There are also many other websites and books that cover JavaScript from every possible angle.The second thing we need to deal with is JavaScript as a programming language versus a JavaScript environment running in a web browser. Many books, tutorials, and websites completely blur these two together but they are in fact completely separate. What does this really mean in relation to DRM? Since DRM isn't a web browser, there are no document, window, history, screen, or location objects. There are no events like mousedown or click. Trying to call alert('hello!') in DRM will just cause an error. Those concepts are all related to an HTML document (web page) and are part of the Browser Object Model or Document Object Model. DRM has its own object model that exposes DRM-related objects. In practice, feel free to use those sorts of tutorials or practice within your browser; Many of the concepts are directly translatable to writing scripts in DRM. Just don't try to call document.getElementById in your property definition!I think learning by example tends to work the best, so let's try getting a list of all the unique property values for a given node and its children. var uniqueValues = {}; var childEnumerator = node.GetChildEnumerator(); while(childEnumerator.MoveNext()) { var propValue = childEnumerator.GetCurrent().PropValue("Custom.testpropstr1"); print(propValue); if(propValue != null && propValue != '' && !uniqueValues[propValue]) uniqueValues[propValue] = true; } var result = ''; for(var value in uniqueValues){ result += "Found value " + value + ","; } return result;  Now lets break this down piece by piece. var uniqueValues = {}; This declares a variable and initializes it as a new empty Object. You could also have written var uniqueValues = new Object(); Why use an object here? JavaScript objects can also function as a list of keys and we'll use that later to store each property value as a key on the object. var childEnumerator = node.GetChildEnumerator(); while(childEnumerator.MoveNext()) { This gets an enumerator for the node's children. The enumerator allows us to loop through the children one by one. If we wanted to get a filtered list of children, we would instead use ChildrenWith(). When we reach the end of the child list, the enumerator will return false for MoveNext() and that will stop the loop. var propValue = childEnumerator.GetCurrent().PropValue("Custom.testpropstr1"); print(propValue); if(propValue != null && propValue != '' && !uniqueValues[propValue]) uniqueValues[propValue] = true; } This gets the node the enumerator is currently pointing at, then calls PropValue() on it to get the value of a property. We then make sure the prop value isn't null or the empty string, then we make sure the value doesn't already exist as a key. Assuming it doesn't we add it as a key with a value (true in this case because it makes checking for an existing value faster when the value exists). A quick word on the print() function. When viewing the prop grid, running an export, or performing normal DRM operations it does nothing. If you have a lot of print() calls with complicated arguments it can slow your script down slightly, but otherwise has no effect. But when using the script editor, all the output of print() will be shown in the Warnings area. This gives you an extremely useful debugging tool to see what exactly a script is doing. var result = ''; for(var value in uniqueValues){ result += "Found value " + value + ","; } return result; Now we build a string by looping through all the keys in uniqueValues and adding that value to our string. The last step is to simply return the result. Hopefully this small example demonstrates some of the core Dynamic Scripting concepts. Next time, we can try checking for node references in other hierarchies to see if they are using duplicate property values.

    Read the article

  • 2012&ndash;The End Of The World Review

    - by Tim Murphy
    The end of the world must be coming.  Not because the Mayan calendar says so, but because Microsoft is innovating more than Apple.  It has been a crazy year, with pundits declaring not that the end of the world is coming, but that the end of Microsoft is coming.  Let’s take a look at what 2012 has brought us. The beginning of year is a blur.  I managed to get to TechEd in June which was the first time that I got to take a deep dive into Windows 8 and many other things that had been announced in 2011.  The promise I saw in these products was really encouraging.  The thought of being able to run Windows 8 from a thumb drive or have Hyper-V native to the OS told me that at least for developers good things were coming. I finally got my feet wet with Windows 8 with the developer preview just prior to the RTM.  While the initial experience was a bit of a culture shock I quickly grew to love it.  The media still seems to hold little love for the “reimagined” platform, but I think that once people spend some time with it they will enjoy the experience and what the FUD mongers say will fade into the background.  With the launch of the OS we finally got a look at the Surface.  I think this is a bold entry into the tablet market.  While I wish it was a little more affordable I am already starting to see them in the wild being used by non-techies. I was waiting for Windows Phone 8 at least as much as Windows 8, probably more.  The new hardware, better marketing and new OS features I think are going to finally push us to the point of having a real presence in the smartphone market.  I am seeing a number of iPhone users picking up a Nokia Lumia 920 and getting rid of their brand new iPhone 5.  The only real debacle that I saw around the launch was when they held back the SDK from general developers. Shortly after the launch events came Build 2012.  I was extremely disappointed that I didn’t make it to this year’s Build.  Even if they weren’t handing out Surface and Lumia devices I think the atmosphere and content were something that really needed to be experience in person.  Hopefully there will be a Build next year and it’s schedule will be announced soon.  As you would expect Windows 8 and Windows Phone 8 development were the mainstay of the conference, but improvements in Azure also played a key role.  This movement of services to the cloud will continue and we need to understand where it best fits into the solutions we build. Lower on the radar this year were Office 2013, SQL Server 2012, and Windows Server 2012.  Their glory stolen by the consumer OS and hardware announcements, these new releases are no less important.  Companies will see significant improvements in performance and capabilities if they upgrade.  At TechEd they had shown some of the new features of Windows Server 2012 around hardware integration and Hyper-V performance which absolutely blew me away.  It is our job to bring these important improvements to our company’s attention so that they can be leveraged. Personally, the consulting business in 2012 was the busiest it has been in a long time.  More companies were ready to attack new projects after several years of putting them on the back burner.  I also worked to bring back momentum to the Chicago Information Technology Architects Group.  Both the community and clients are excited about the new technologies that have come out in 2012 and now it is time to deliver. What does 2013 have in store.  I don’t see it be quite as exciting as 2012.  Microsoft will be releasing the Surface Pro in January and it seems that we will see more frequent OS update for Windows.  There are rumors that we may see a Surface phone in 2013.  It has also been announced that there will finally be a rework of the XBox next fall.  The new year will also be a time for us in the development community to take advantage of these new tools and devices.  After all, it is what we build on top of these platforms that will attract more consumers and corporations to using them. Just as I am 99.999% sure that the world is not going to end this year, I am also sure that Microsoft will move on and that most of this negative backlash from the media is actually fear and jealousy.  In the end I think we have a promising year ahead of us. del.icio.us Tags: Microsoft,Pundits,Mayans,Windows 8,Windows Phone 8,Surface

    Read the article

  • CSS3 Gradients to reproduce an 'inner glow' effect from Illustrator with border-radius applied

    - by iamfriendly
    Hello all! First post on here so please be kind :) I am in the process of trying to get my head properly around CSS3 Gradients (specifically radial ones) and in doing so I think I've set myself a relatively tough challenge. In Adobe Illustrator I have created a 'button' style which can be seen here: http://bit.ly/aePPtV (jpg image). To create this image I created a rectangle with a background colour of rgb(63,64,63) or #3F403F, then 'stylized' it to have a 15px border radius. I then applied an 'inner glow' to it with a 25% opacity, 8px blur, white from the center. Finally, I applied a 3pt white stroke on it. (I'm telling you all of this in case you wished to reproduce it, if the image above isn't sufficient.) So, my question is thus: is it possible to recreate this 'button' using CSS without the need for an image? I am aware of the 'limitations' of Internet Explorer (and for the sake of this experiment, I couldn't give a monkeys). I am also aware of the small 'bug' in webkit which incorrectly renders an element with a background colour, border-radius and a border (with a different color to the background-color) - it lets the background color bleed through on the curved corners. My best attempt so far is fairly pathetic, but for reference here is the code: section#featured footer p a { color: rgb(255,255,255); text-shadow: 1px 1px 1px rgba(0,0,0,0.6); text-decoration: none; padding: 5px 10px; border-radius: 15px; -moz-border-radius: 15px; -webkit-border-radius: 15px; border: 3px solid rgb(255,255,255); background: rgb(98,99,100); background: -moz-radial-gradient( 50% 50%, farthest-side, #626364, #545454 ); background: -webkit-gradient( radial, 50% 50%, 1px, 50% 50%, 5px, from(rgb(98,99,100)), to(rgb(84,84,84)) ); } Basically, terrible. Any hints or tips gratefully accepted and thank you very much in advance for them!

    Read the article

  • jQueryMobile: how to work with slider events?

    - by balexandre
    I'm testing the slider events in jQueryMobile and I must been missing something. page code is: <div data-role="fieldcontain"> <label for="slider">Input slider:</label> <input type="range" name="slider" id="slider" value="0" min="0" max="100" /> </div> and if I do: $("#slider").data("events"); I get blur, focus, keyup, remove What I want to do is to get the value once user release the slider handle and having a hook to the keyup event as $("#slider").bind("keyup", function() { alert('here'); } ); does absolutely nothing :( I must say that I wrongly assumed that jQueryMobile used jQueryUI controls as it was my first thought, but now working deep in the events I can see this is not the case, only in terms of CSS Design. What can I do? jQuery Mobile Slider source code can be found on Git if it helps anyone as well a test page can be found at JSBin As I understand, the #slider is the textbox with the value, so I would need to hook into the slider handle as the generated code for this slider is: <div data-role="fieldcontain" class="ui-field-contain ui-body ui-br"> <label for="slider" class="ui-input-text ui-slider" id="slider-label">Input slider:</label> <input data-type="range" max="100" min="0" value="0" id="slider" name="slider" class="ui-input-text ui-body-null ui-corner-all ui-shadow-inset ui-body-c ui-slider-input" /> <div role="application" class="ui-slider ui-btn-down-c ui-btn-corner-all"> <a class="ui-slider-handle ui-btn ui-btn-corner-all ui-shadow ui-btn-up-c" href="#" data-theme="c" role="slider" aria-valuemin="0" aria-valuemax="100" aria-valuenow="54" aria-valuetext="54" title="54" aria-labelledby="slider-label" style="left: 54%;"> <span class="ui-btn-inner ui-btn-corner-all"> <span class="ui-btn-text"></span> </span> </a> </div> </div> and checking the events in the handler anchor I get only the click event $("#slider").next().find("a").data("events");

    Read the article

  • CSS sliding doors technique for buttons, IE8 problem

    - by Kelvin
    Hello All! I used sliding doors technique, explained here: http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html With only one exception, that I decided to add one more image for "hover" effect. My code works well for all browsers, except IE8 (and maybe earlier versions). a.submit-button:active and a.submit-button:active span are simply blocked by "hover" and never work. Does anyone knows solution for this? Thanks a lot in advance! <style type="text/css"> .clear { /* generic container (i.e. div) for floating buttons */ overflow: hidden; width: 100%; } a.submit-button { background: transparent url('images/button-1b.png') no-repeat scroll top right; color: #fff; display: block; float: left; font: bold 13px sans-serif, arial; height: 28px; margin-right: 6px; padding-right: 18px; /* sliding doors padding */ text-decoration: none; outline: none; } a.submit-button span { background: transparent url('images/button-1a.png') no-repeat; display: block; line-height: 14px; padding: 6px 0 8px 24px; } a.submit-button:hover { background-position: right -28px; outline: none; /* hide dotted outline in Firefox */ color: #fff; } a.submit-button:hover span { background-position: 0px -28px; } a.submit-button:active { background-position: right -56px; color: #e5e5e5; outline: none; } a.submit-button:active span { background-position: 0px -56px; padding: 7px 0 7px 24px; /* push text down 1px */ } </style> And this is the button: <div class="clear"> <a class="submit-button" href="#" onclick="this.blur();"><span>Hello All</span></a> </div>

    Read the article

  • Plane projection and scale causing bluring in silverlight

    - by Andy
    Ok, So I've tried to make an application which relies on images being scaled by an individual factor. These images are then able to be turned over, but the use of an animation working on the ProjectionPlane rotation. The problem comes around when an image is both scaled and rotated. For some reason it starts bluring, where a non scaled image doesn't blur. Also, if you look at the example image below (top is scaled and rotated, bottom is rotated) the projection of the top one doesn't even seem right. Its too horizontal. This this the code for the test app: <UserControl x:Class="SilverlightApplication1.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="300"> <Canvas x:Name="LayoutRoot" Background="White"> <Border Canvas.Top="25" Canvas.Left="50"> <Border.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="3" ScaleY="3" /> </TransformGroup> </Border.RenderTransform> <Border.Projection> <PlaneProjection RotationY="45"/> </Border.Projection> <Image Source="bw-test-pattern.jpg" Width="50" Height="40"/> </Border> <Border Canvas.Top="150" Canvas.Left="50"> <Border.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1" /> </TransformGroup> </Border.RenderTransform> <Border.Projection> <PlaneProjection RotationY="45"/> </Border.Projection> <Image Source="bw-test-pattern.jpg" Width="150" Height="120"/> </Border> </Canvas> </UserControl> So if anyone could possible shed any light on why this may be happening, I'd very much appreciate it. Suggestions also welcome! :)

    Read the article

  • Insert default value if input-text is deleted

    - by Kim Andersen
    Hi all I have the following piece of jQuery code: $(".SearchForm input:text").each(function(){ /* Sets the current value as the defaultvalue attribute */ if(allowedDefaults.indexOf($(this).val()) > 0 || $(this).val() == "") { $(this).attr("defaultvalue", $(this).val()); $(this).css("color","#9d9d9d"); /* Onfocus, if default value clear the field */ $(this).focus(function(){ if($(this).val() == $(this).attr("defaultvalue")) { $(this).val(""); $(this).css("color","#4c4c4c"); } }); /* Onblur, if empty, insert defaultvalue */ $(this).blur(function(){ alert("ud"); if($(this).val() == "") { $(this).val($(this).attr("defaultvalue")); $(this).css("color","#9d9d9d"); }else { $(this).removeClass("ignore"); } }); } }); I use this code to insert some default text into some of my input fields, when nothing else is typed in. This means that when a user sees my search-form, the defaultvalues will be set as an attribute on the input-field, and this will be the value that is shown. When a user clicks inside of the input field, the default value will be removed. When the user sees an input field at first is looks like this: <input type="text" value="" defaultvalue="From" /> This works just fine, but I have a big challenge. If a user have posted the form, and something is entered into one of the fields, then I can't show the default value in the field, if the user deletes the text from the input field. This is happening because the value of the text-field is still containing something, even when the user deletes the content. So my problem is how to show the default value when the form is submitted, and the user then removes the typed in content? When the form is submitted the input looks like this, and keeps looking like this until the form is submitted again: <input type="text" value="someValue" defaultvalue="From" /> So I need to show the default value in the input-field right after the user have deleted the content in the field, and removed the focus from the field. Does everyone understand what my problem is? Otherwise just ask, I have struggled with this one for quite some times now, so any help will be greatly appreciated. Thanks in advance, Kim Andersen

    Read the article

  • Form won't submit properly in IE

    - by VUELA
    Hi! My simple donation form submits properly except for Internet Explorer. I'm sure it has to do with issues with change() and focus() or blur(), but all my hundreds of attempts so far have failed me. I tried using .click() instead of change() as mentioned in this post:http://stackoverflow.com/questions/208471/getting-jquery-to-recognise-change-in-ie (and elsewhere), but I could not get it to work! ... so I am overlooking something simple perhaps. Any help is greatly appreciated!! Here is the link to the page: http://www.wsda.org/donate HTML FORM: <form id="donationForm" method="post" action="https://wsda.foxycart.com/cart.php" class="foxycart"> <input type="hidden" id="name" name="name" value="Donation" /> <input type="hidden" id="price" name="price" value="10" /> <div class="row"> <label for="price_select">How much would you like to donate?</label> <select id="price_select" name="price_select"> <option value="10">$10</option> <option value="20">$20</option> <option value="50">$50</option> <option value="100">$100</option> <option value="300">$300</option> <option value="0">Other</option> </select> </div> <div class="row" id="custom_amount"> <label for="price_input">Please enter an amount: $</label> <input type="text" id="price_input" name="price_select" value="" /> </div> <input type="submit" id="DonateBtn" value="Submit Donation »" /> </form> JQUERY: // donation form $("#custom_amount").hide(); $("#price_select").change(function(){ if ($("#price_select").val() == "0") { $("#custom_amount").show(); } else { $("#custom_amount").hide(); } $("#price").val($("#price_select").val()); }); $("#price_input").change(function(){ $("#price").val($("#price_input").val()); });

    Read the article

  • jQuery - google chrome won't get updated textarea value

    - by Phil Jackson
    Hi, I have a textarea with default text 'write comment...'. when a user updates the textarea and clicks 'add comment' Google chrome does not get the new text. heres my code; function add_comment( token, loader ){ $('textarea.n-c-i').focus(function(){ if( $(this).html() == 'write a comment...' ) { $(this).html(''); } }); $('textarea.n-c-i').blur(function(){ if( $(this).html() == '' ) { $(this).html('write a comment...'); } }); $(".add-comment").bind("click", function() { try{ var but = $(this); var parent = but.parents('.n-w'); var ref = parent.attr("ref"); var comment_box = parent.find('textarea'); var comment = comment_box.val(); alert(comment); var con_wrap = parent.find('ul.com-box'); var contents = con_wrap .html(); var outa_wrap = parent.find('.n-c-b'); var outa = outa_wrap.html(); var com_box = parent.find('ul.com-box'); var results = parent.find('p.com-result'); results.html(loader); comment_box.attr("disabled", "disabled"); but.attr("disabled", "disabled"); $.ajax({ type: 'POST', url: './', data: 'add-comment=true&ref=' + encodeURIComponent(ref) + '&com=' + encodeURIComponent(comment) + '&token=' + token + '&aj=true', cache: false, timeout: 7000, error: function(){ $.fancybox(internal_error, internal_error_fbs); results.html(''); comment_box.removeAttr("disabled"); but.removeAttr("disabled"); }, success: function(html){ auth(html); if( html != '<span class="error-msg">Error, message could not be posted at this time</span>' ) { if( con_wrap.length == 0 ) { outa_wrap.html('<ul class="com-box">' + html + '</ul>' + outa); outa_wrap.find('li:last').fadeIn(); add_comment( token, loader ); }else{ com_box.html(contents + html); com_box.find('li:last').fadeIn(); } } results.html(''); comment_box.removeAttr("disabled"); but.removeAttr("disabled"); } }); }catch(err){alert(err);} return false; }); } any help much appreciated.

    Read the article

  • Re-Centering JQuery Tooltips when resizing the window

    - by leeand00
    I have written a function that positions a tooltip just above a textbox. The function takes two arguments: textBoxId - The ID of the textbox above which the tooltip will appear. Example: "#textBoxA" toolTipId - The ID of the tooltip which will appear above the textbox. Example: "#toolTipA" function positionTooltip(textBoxId, toolTipId){ var hoverElementOffsetLeft = $(textBoxId).offset().left; var hoverElementOffsetWidth = $(textBoxId)[0].offsetWidth; var toolTipElementOffsetLeft = $(toolTipId).offset().left; var toolTipElementOffsetWidth = $(toolTipId)[0].offsetWidth; // calcluate the x coordinate of the center of the hover element. var hoverElementCenterX = hoverElementOffsetLeft + (hoverElementOffsetWidth / 2); // calculate half the width of the toolTipElement var toolTipElementHalfWidth = toolTipElementOffsetWidth / 2; var toolTipElementLeft = hoverElementCenterX - toolTipElementHalfWidth; $(toolTipId)[0].style.left = toolTipElementLeft + "px"; var toolTipElementHeight = $(toolTipId)[0].offsetHeight; var hoverElementOffsetTop = $(textBoxId).offset().top; var toolTipYCoord = hoverElementOffsetTop - toolTipElementHeight; toolTipYCoord = toolTipYCoord - 10; $(toolTipId)[0].style.top = toolTipYCoord + "px"; $(toolTipId).hide(); $(textBoxId).hover( function(){ $(toolTipId + ':hidden').fadeIn(); }, function(){ $(toolTipId + ':visible').fadeOut(); } ); $(textBoxId).focus ( function(){ $(toolTipId + ':hidden').fadeIn(); } ); $(textBoxId).blur ( function(){ $(toolTipId+ ':visible').fadeOut(); } ); } The function works fine upon initial page load: However, after the user resizes the window the tooltips move to locations that no longer display above their associated textbox. I've tried writing some code to fix the problem by calling the positionTooltip() function when the window is resized but for some reason the tooltips do not get repositioned as they did when the page loaded: var _resize_timer = null; $(window).resize(function() { if (_resize_timer) {clearTimeout(_resize_timer);} _resize_timer = setTimeout(function(){ positionTooltip('#textBoxA', ('#toolTipA')); }, 1000); }); I'm really at a loss here as to why it doesn't reposition the tooltip correctly as it did when the page was initially loaded after a resize.

    Read the article

  • jQuery ajaxSubmit ignored by IE8

    - by George Burrell
    Hi there, I am combing the jQuery validation plug-in with the jQuery Form Plugin to submit the form via AJAX. This works perfectly in Firefox & Chrome, but (as usual) Internet Explorer is being a pain. For reasons that are alluding me, IE is ignoring the ajaxSubmit, as a result it submits the form in the normal fashion. I've followed the validation plug-in's documentation when constructing my code: JS: $(document).ready(function() { var validator = $("#form_notify").validate({ messages: { email: { required: 'Please insert your email address. Without your email address we will not be able to contact you!', email:'Please enter a valid email address. Without a valid email address we will not be able to contact you!' } }, errorLabelContainer: "#error", success: "valid", submitHandler: function(form) {$(form).ajaxSubmit();} }); $('#email').blur(function() { if (validator.numberOfInvalids() 0) { $("#label").addClass("label_error"); return false; } else {$("#label").removeClass("label_error");} }); $('#form_notify').submit(function() { if (validator.numberOfInvalids() == 0) { $(this).fadeOut('fast', function() {$('#thank-you').fadeIn();}); return true; } return false; }); }); Form HTML: <form id="form_notify" class="cmxform" name="form_notify" action="optin.pl" method="get"> <fieldset> <div class="input"> <label id="label" for="email">Email Address:</label> <input type="text" id="email" name="email" value="" title="email address" class="{required:true, email:true}"/> <div class="clearfix"></div> </div> <input type="hidden" name="key" value="sub-745-9.224;1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0;;subscribe-224.htm"> <input type="hidden" name="followup" value="19"> <input type="submit" name="submit" id="submit-button" value="Notify Me"> <div id="error"></div> </fieldset> </form> I can't understand what is causing IE to act differently, any assistance would be greatly appreciated. I can provide more information if needed. Thanks in advance!

    Read the article

  • Simple form validation. Object-oriented.

    - by kalininew
    Problem statement: It is necessary for me to write a code, whether which before form sending will check all necessary fields are filled. If not all fields are filled, it is necessary to allocate with their red colour and not to send the form. Now the code exists in such kind: function formsubmit(formName, reqFieldArr){ var curForm = new formObj(formName, reqFieldArr); if(curForm.valid) curForm.send(); else curForm.paint(); } function formObj(formName, reqFieldArr){ var filledCount = 0; var fieldArr = new Array(); for(i=reqFieldArr.length-1; i>=0; i--){ fieldArr[i] = new fieldObj(formName, reqFieldArr[i]); if(fieldArr[i].filled == true) filledCount++; } if(filledCount == fieldArr.length) this.valid = true; else this.valid = false; this.paint = function(){ for(i=fieldArr.length-1; i>=0; i--){ if(fieldArr[i].filled == false) fieldArr[i].paintInRed(); else fieldArr[i].unPaintInRed(); } } this.send = function(){ document.forms[formName].submit(); } } function fieldObj(formName, fName){ var curField = document.forms[formName].elements[fName]; if(curField.value != '') this.filled = true; else this.filled = false; this.paintInRed = function(){ curField.addClassName('red'); } this.unPaintInRed = function(){ curField.removeClassName('red'); } } Function is caused in such a way: <input type="button" onClick="formsubmit('orderform', ['name', 'post', 'payer', 'recipient', 'good'])" value="send" /> Now the code works. But I would like to add "dynamism" in it. That it is necessary for me: to keep an initial code essentially, to add listening form fields (only necessary for filling). For example, when the field is allocated by red colour and the user starts it to fill, it should become white. As a matter of fact I need to add listening of events: onChange, blur for the blank fields of the form. As it to make within the limits of an initial code. If all my code - full nonsense, let me know about it. As to me it to change using object-oriented the approach.

    Read the article

  • ASP.Net MVC Ajax form with jQuery validation

    - by Tomas Lycken
    I have an MVC view with a form built with the Ajax.BeginForm() helper method, and I'm trying to validate user input with the jQuery Validation plugin. I get the plugin to highlight the inputs with invalid input data, but despite the invalid input the form is posted to the server. How do I stop this, and make sure that the data is only posted when the form validates? My code The form: <fieldset> <legend>leave a message</legend> <% using (Ajax.BeginForm("Post", new AjaxOptions { UpdateTargetId = "GBPostList", InsertionMode = InsertionMode.InsertBefore, OnSuccess = "getGbPostSuccess", OnFailure = "showFaliure" })) { %> <div class="column" style="width: 230px;"> <p> <label for="Post.Header"> Rubrik</label> <%= Html.TextBox("Post.Header", null, new { @style = "width: 200px;", @class="text required" }) %></p> <p> <label for="Post.Post"> Meddelande</label> <%= Html.TextArea("Post.Post", new { @style = "width: 230px; height: 120px;" }) %></p> </div> <p> <input type="submit" value="OK!" /></p> </fieldset> The JavaScript validation: $(document).ready(function() { // for highlight var elements = $("input[type!='submit'], textarea, select"); elements.focus(function() { $(this).parents('p').addClass('highlight'); }); elements.blur(function() { $(this).parents('p').removeClass('highlight'); }); // for validation $("form").validate(); }); EDIT: As I was getting downvotes for publishing follow-up problems and their solutions in answers, here is also the working validate method... function ajaxValidate() { return $('form').validate({ rules: { "Post.Header": { required: true }, "Post.Post": { required: true, minlength: 3 } }, messages: { "Post.Header": "Please enter a header", "Post.Post": { required: "Please enter a message", minlength: "Your message must be 3 characters long" } } }).form(); }

    Read the article

  • Why the parent page get refreshed when I click the link to open thickbox-styled form?

    - by user333205
    Hi, all: I'm using Thickbox 3.1 to show signup form. The form content comes from jquery ajax post. The jquery lib is of version 1.4.2. I placed a "signup" link into a div area, which is a part of my other large pages, and the whole content of that div area is ajax+posted from my server. To make thickbox can work in my above arangement, I have modified the thickbox code a little like that: //add thickbox to href & area elements that have a class of .thickbox function tb_init(domChunk){ $(domChunk).live('click', function(){ var t = this.title || this.name || null; var a = this.href || this.alt; var g = this.rel || false; tb_show(t,a,g); this.blur(); return false; });} This modification is the only change against the original version. Beacause the "signup" link is placed in ajaxed content, so I Use live instead of binding the click event directly. When I tested on my pc, the thickbox works well. I can see the signup form quickly, without feeling the content of the parent page(here, is the other large pages) get refreshed. But after transmiting my site files into VHost, when I click the "signup" link, the signup form get presented very slowly. The large pages get refreshed evidently, because the borwser(ie6) are reloading images from server incessantly. These images are set as background images in CSS files. I think that's because the slow connection of network. But why the parent pages get refreshed? and why the browser reloads those images one more time? Havn't those images been placed in local computer's disk? Is there one way to stop that reloadding? Because the signup form can't get displayed sometimes due to slow connection of network. To verified the question, you can access http://www.juliantec.info/track-the-source.html and click the second link in left grey area, that is the "signup" link mentioned above. Thinks!

    Read the article

  • How to Fix my jQuery code in IE?? Works in Firefox..

    - by scott jarvis
    I am using jQuery to show/hide a div container (#pluginOptionsContainer), and load a page (./plugin_options.php) inside it with the required POST vars sent. What POST data is sent is based on the value of a select list (#pluginDD) and the click of a button (#pluginOptionsBtn)... It works fine in Firefox, but doesn't work in IE.. The '$("#pluginOptionsContainer").load()' request never seems to finish in IE - I only see the loading message forever... bind(), empty() and append() all seem to work fine in IE.. But not load().. Here is my code: // wait for the DOM to be loaded $(document).ready(function() { // hide the plugin options $('#pluginOptionsContainer').hide(); // This is the hack for IE if ($.browser.msie) { $("#pluginDD").click(function() { this.blur(); this.focus(); }); } // set the main function $(function() { // the button shows hides the plugin options page (and its container) $("#pluginOptionsBtn") .click(function() { // show the container of the plugin options page $('#pluginOptionsContainer').empty().append('<div style="text-align:center;width:99%;">Loading...</div>'); $('#pluginOptionsContainer').toggle(); }); // set the loading message if user changes selection with either the dropdown or button $("#pluginDD,#pluginOptionsBtn").bind('change', function() { $('#pluginOptionsContainer').empty().append('<div style="text-align:center;width:99%;">Loading...</div>'); }); // then update the page when the plugin is changed when EITHER the plugin button or dropdown or clicked or changed $("#pluginDD,#pluginOptionsBtn").bind('change click', function() { // set form fields as vars in js var pid = <?=$pid;?>; var cid = <?=$contentid;?>; var pDD = $("#pluginDD").val(); // add post vars (must use JSON) to be sent into the js var 'dataString' var dataString = {plugin_options: true, pageid: pid, contentid: cid, pluginDD: pDD }; // include the plugin option page inside the container, with the required values already added into the query string $("#pluginOptionsContainer").load("/admin/inc/edit/content/plugin_options.php#pluginTop", dataString); // add this to stop page refresh return false; }); // end submit function }); // end main function }); // on DOM load Any help would be GREATLY appreciated! I hate IE!

    Read the article

  • How Mary Meeker’s Latest Findings May Make You Re-Imagine Commerce

    - by Brenna Johnson-Oracle
    0 0 1 954 5439 Endeca Technologies 45 12 6381 14.0 Normal 0 false false false EN-US JA X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:Cambria; mso-ascii-font-family:Cambria; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Cambria; mso-hansi-theme-font:minor-latin;} Today, Mary Meeker released her highly anticipated annual “Internet Trends” presentation for 2014. All 164 slides are jam-packed with pretty much everything you need to know about the state of the Internet. And as luck would have it, Oracle is staying ahead of these trends (but we’ll talk about that later). There were a few surprises, some stats to solidify what you likely already know, and Meeker’s novel observations about where we are all going. What interested me the most is not only how people are engaging in their personal lives, but how they engage with brands. As you could probably predict, Internet usage growth is slowing while tablet user and mobile data traffic growth continue their meteoric rise around the globe, with tremendous growth in underpenetrated markets like China, India, Brazil and Indonesia. Now hold those the “Internet is dead” comments. Keep in mind there’s still plenty of room to grow, and a multiscreen model is Meeker’s vision for our future. Despite 1.5x YOY growth for mobile traffic, mobile still only makes up about 23% of all traffic today. With tablet shipments easily outpacing figures for PCs even at their height (in 2007), mobile will only continue on it’s path, but won’t be everything to everyone. Mobile won’t replace every touchpoint, it’s just created our shorter attention spans and demand for simpler, more personal experiences. As Meeker points out TVs, tablets, PCs, and smartphones are used for different activities at present, but lines will blur (for example, 84% of smartphones owners use their device while watching TV). Day-to-day activities are being re-imagining through simple, beautiful user experiences. It seems like every day I discover a new way a brand/site/app made the most mundane or mounting task enjoyable and frictionless – and I’m not alone. Meeker points out the evolution of how we do everything from how we communicate, get information, use money, meet someone, get places, order a meal, and consume media is all done through new user interfaces that make day-to-day tasks simpler. This movement has caused just about everyone’s patience for a poor UX to take a nosedive. And it’s not just the digital user experience, technology is making a lot of people’s offline lives easier, and less expensive. Today 47% of online shopping utilizes free shipping— nearly half. And Meeker predicts same day local delivery will be the “next big thing” (and you can take a guess on who will own that). Content, Community and Commerce creates the “Internet Trifecta.” Meeker pointed out that when content, communities and commerce occur in a single experience it’s embraced by consumers, which translates to big dollars for brands. The magic happens when consumers can get inspired, research, and buy in a single experience. As the buying cycle has changed and touchpoints (Web, mobile, social, store) are no longer tied to “roles” or steps in the customer journey, brands must make all experiences (content and commerce) available in a single, adaptable experience. (We at Oracle Commerce have a lot to say on this topic – stay tuned!) And in what Meeker calls the “biggest re-imagination of all:” consumers enabled with smartphones and sensors are creating troves of findable and sharable data, which she says is in the early stages, by growing rapidly. She notes that transparency and patterns of consumers with this hardware (FYI - there are up to 10 sensors embedded in smartphones now) has created a Big Data treasure chest to be mined to improve business and the life of the consumer. The opportunities are endless. So what does it all mean for a company doing business online? Start thinking about how you can: Re-imagine your experience. Not your online experience and your mobile experience and your social experience – your overall experience. When consumers can research, buy, and advocate from anywhere (and their attention spans are at an all-time low) channels don’t exist. Enable simple and beautiful interactions informed by all of the online and offline data you leverage across your enterprise. Ethically leverage the endless supply of data (user generated content, clicks, purchases, in-store behavior, social activity) to make experiences more beautiful, more accurate, and more personalized (not to mention, more lucrative for you). Re-imagine content and commerce. Content and commerce must co-exist in a single destination where shoppers can get inspired, explore, research, share, and purchase in a collective experience. Think of how you can deliver an experience where all types of experiences (brand stories and commerce) adapt to every customer need. (Look for more on this topic coming soon). Re-imagine your reach. Look to Meeker’s findings to see how the global appetite for digital experiences is growing, but under-served in many places (i.e.: India, Mexico, Indonesia, Brazil, Philippines, etc.). Growing your online business to a new geography doesn’t have to mean starting from scratch or having an entirely new team manage the new endeavor. Expand using what you’ve already built in a multisite framework, with global language support. And of course, make sure it’s optimized for mobile! Re-imagine the possible. After every Meeker report, I’m always left with the thought “we are just at the beginning.” Everyday there is more data, more possibilities, more online consumers, and more opportunities to use new latest technology to get closer to your customers and be more successful. There’s a lot going on in our Product Development and Product Innovations groups to automate innovation for our customers, so that they can continue to stay ahead of these trends, without disrupting their business. Check out a recent interview with our Innovations Team on some of these new possibilities. Staying on track despite the seemingly endless possibilities out there is the hard part. Prioritizing where you will focus based on your unique brand promise, customer and goals is what you do best. To learn how Oracle Commerce can help your business achieve your goals check out oracle.com/commerce. Check out Meeker’s entire report here.

    Read the article

  • Remote host: can tracert, can telnet, can*not* browse: what gives?

    - by MacThePenguin
    One of my customers of the company I work for has made a change to their Internet connection, and now we can't connect to them any more from our LAN. To help me troubleshoot this issue, the network guy on the customer's site has configured their firewall so that a HTTPS connection to their public IP address is open to any IP. I should put https://<customer's IP> in my browser and get a web page. Well, it works from any network I've tried (even from my smartphone), just not from my company's LAN. I thought it may be an issue with our firewall (though I checked its rules and it allows outbound TCP port 443 to anywhere), so I just connected a PC directly to the network connection of our provider, bypassing out firewall completely, and still it didn't work (everything else worked). So I asked for help to our Internet provider's customer service, and they asked me to do a tracert to our customer's IP. The tracert is successful, as the final hop shown in the output is the host I want to reach. So they said there's no problem. :( I also tried telnet <customer's IP> 443 and that works as well: I get a blank page with the cursor blinking (I've tried using another random port and that gives me an error message, as it should). Still, from any browser of any PC in my LAN I can't open that URL. I tried checking the network traffic with Wireshark: I see the packages going through and answers coming back, thought the packets I see passing are far less than they are if I successfully connect to another HTTPS website. See the attached screenshot: I had to blur the IPs, anyway the longer string is my PC's local IP address, the shorter one is the customer's public IP. I don't know what else to try. This is the only IP doing this... Any idea what could I try to find a solution to this issue? Thanks, let me know if you need further details. Edit: when I say "it doesn't work" I mean: the page doesn't open, the browser keeps loading for a long time and eventually shows an error saying that the page cannot be opened. I'm not in my office now so I can't paste the exact message, but it's the usual message you get when the browser reaches its timeout. When I say "it works", I mean the browser loads and shows a webpage (it's the logon page for the customers' firewall admin interface: so there's the firewall brand's logo and there are fields to enter a user id and a password). Update 13/09/2012: tried again to connect to the customer's network through our Internet connection without a firewall. This is what I did: Run a Kubuntu 12.04 live distro on a spare laptop; Updated all the packages I could and installed WireShark; Attached it to my LAN and verified that I couldn't open https://<customer's IP>. Verified that the Wireshark trace for this attempt was the same as the one I've already posted; Verified that I could connect to another customer's host using rdesktop (it worked); Tried to rdesktop to <customer's IP>, here's the output: kubuntu@kubuntu:/etc$ rdesktop <customer's IP> Autoselected keyboard map en-us ERROR: recv: Connection reset by peer Disconnected the laptop from the LAN; Disconnected the firewall from the Extranet connection, connected the laptop instead. Set its network configuration so that I could access the Internet; Verified that I could connect to other websites in http and https and in RDP to other customers' hosts - it all worked as expected; Verified that I could still traceroute to <customer's IP>: I could; Verified that I still couldn't open https://<customer's IP> (same exact result as before); Checked the WireShark trace for this attempt and noticed a different behaviour: I could see packets going out to the customer's IP, but no replies at all; Tried to run rdesktop again, with a slightly different result: kubuntu@kubuntu:/etc/network$ rdesktop <customer's IP> Autoselected keyboard map en-us ERROR: <customer's IP>: unable to connect Finally gave up, put everything back as it was before, turned off the laptop and lost the WireShark traces I had saved. :( I still remember them very well though. :) Can you get anything out of it? Thank you very much. Update 12/09/2012 n.2: I followed the suggestion by MadHatter in the comments. From inside the firewall, this is what I get: user@ubuntu-mantis:~$ openssl s_client -connect <customer's IP>:443 CONNECTED(00000003) If I now type GET / the output pauses for several seconds and then I get: write:errno=104 I'm going to try the same, but bypassing the firewall, as soon as I can. Thanks. Update 12/09/2012 n.3: So, I think ISA Server is altering the results of my tests... I tried installing Wireshark directly on the firewall and monitoring the packets on the Extranet network card. When the destination is the customer's IP, whatever service I try to connect to (HTTPS, RDP or SAProuter), I can only see outbound packets and no response packets whatsoever from their side. It looks like ISA Server is "faking" the remote server's replies, that's why I get a connection using telnet or the openSSL client. This is the wireshark trace from inside our LAN: But this is the trace on the Extranet network card: This makes a bit more sense... I'll send this info to the customer's tech and see if he can make anything out of it. Thanks to all that took the time to read my question and post suggestions. I'll update this post again.

    Read the article

  • Block filters using fragment shaders

    - by Nils
    I was following this tutorial using Apple's OpenGL Shader Builder (tool similar to Nvidia's fx composer, but simpler). I could easily apply the filters, but I don't understand if they worked correct (and if so how can I improve the output). For example the blur filter: OpenGL itself does some image processing on the textures, so if they are displayed in a higher resolution than the original image, they are blurred already by OpenGL. Second the blurred part is brighter then the part not processed, I think this does not make sense, since it just takes pixels from the direct neighborhood. This is defined by float step_w = (1.0/width); Which I don't quite understand: The pixels are indexed using floating point values?? Edit: I forgot to attach the exact code I used: Fragment Shader // Originally taken from: http://www.ozone3d.net/tutorials/image_filtering_p2.php#part_2 #define KERNEL_SIZE 9 float kernel[KERNEL_SIZE]; uniform sampler2D colorMap; uniform float width; uniform float height; float step_w = (1.0/width); float step_h = (1.0/height); // float step_w = 20.0; // float step_h = 20.0; vec2 offset[KERNEL_SIZE]; void main(void) { int i = 0; vec4 sum = vec4(0.0); offset[0] = vec2(-step_w, -step_h); // south west offset[1] = vec2(0.0, -step_h); // south offset[2] = vec2(step_w, -step_h); // south east offset[3] = vec2(-step_w, 0.0); // west offset[4] = vec2(0.0, 0.0); // center offset[5] = vec2(step_w, 0.0); // east offset[6] = vec2(-step_w, step_h); // north west offset[7] = vec2(0.0, step_h); // north offset[8] = vec2(step_w, step_h); // north east // Gaussian kernel // 1 2 1 // 2 4 2 // 1 2 1 kernel[0] = 1.0; kernel[1] = 2.0; kernel[2] = 1.0; kernel[3] = 2.0; kernel[4] = 4.0; kernel[5] = 2.0; kernel[6] = 1.0; kernel[7] = 2.0; kernel[8] = 1.0; // TODO make grayscale first // Laplacian Filter // 0 1 0 // 1 -4 1 // 0 1 0 /* kernel[0] = 0.0; kernel[1] = 1.0; kernel[2] = 0.0; kernel[3] = 1.0; kernel[4] = -4.0; kernel[5] = 1.0; kernel[6] = 0.0; kernel[7] = 2.0; kernel[8] = 0.0; */ // Mean Filter // 1 1 1 // 1 1 1 // 1 1 1 /* kernel[0] = 1.0; kernel[1] = 1.0; kernel[2] = 1.0; kernel[3] = 1.0; kernel[4] = 1.0; kernel[5] = 1.0; kernel[6] = 1.0; kernel[7] = 1.0; kernel[8] = 1.0; */ if(gl_TexCoord[0].s<0.5) { // For every pixel sample the neighbor pixels and sum up for( i=0; i<KERNEL_SIZE; i++ ) { // select the pixel with the concerning offset vec4 tmp = texture2D(colorMap, gl_TexCoord[0].st + offset[i]); sum += tmp * kernel[i]; } sum /= 16.0; } else if( gl_TexCoord[0].s>0.51 ) { sum = texture2D(colorMap, gl_TexCoord[0].xy); } else // Draw a red line { sum = vec4(1.0, 0.0, 0.0, 1.0); } gl_FragColor = sum; } Vertex Shader void main(void) { gl_TexCoord[0] = gl_MultiTexCoord0; gl_Position = ftransform(); }

    Read the article

  • Selecting and inserting text at cursor location in textfield with JS/jQuery

    - by IceCreamYou
    Hello. I have developed a system in PHP which processes #hashtags like on Twitter. Now I'm trying to build a system that will suggest tags as I type. When a user starts writing a tag, a drop-down list should appear beneath the textarea with other tags that begin with the same string. Right now, I have it working where if a user types the hash key (#) the list will show up with the most popular #hashtags. When a tag is clicked, it is inserted at the end of the text in the textarea. I need the tag to be inserted at the cursor location instead. Here's my code; it operates on a textarea with class "facebook_status_text" and a div with class "fbssts_floating_suggestions" that contains an unordered list of links. (Also note that the syntax [#my tag] is used to handle tags with spaces.) maxlength = 140; var dest = $('.facebook_status_text:first'); var fbssts_box = $('.fbssts_floating_suggestions'); var fbssts_box_orig = fbssts_box.html(); dest.keyup(function(fbss_key) { if (fbss_key.which == 51) { fbssts_box.html(fbssts_box_orig); $('.fbssts_floating_suggestions .fbssts_suggestions a').click(function() { var tag = $(this).html(); //This part is not well-optimized. if (tag.match(/W/)) { tag = '[#'+ tag +']'; } else { tag = '#'+ tag; } var orig = dest.val(); orig = orig.substring(0, orig.length - 1); var last = orig.substring(orig.length - 1); if (last == '[') { orig = orig.substring(0, orig.length - 1); } //End of particularly poorly optimized code. dest.val(orig + tag); fbssts_box.hide(); dest.focus(); return false; }); fbssts_box.show(); fbssts_box.css('left', dest.offset().left); fbssts_box.css('top', dest.offset().top + dest.outerHeight() + 1); } else if (fbss_key.which != 16) { fbssts_box.hide(); } }); dest.blur(function() { var t = setTimeout(function() { fbssts_box.hide(); }, 250); }); When the user types, I also need get the 100 characters in the textarea before the cursor, and pass it (presumably via POST) to /fbssts/load/tags. The PHP back-end will process this, figure out what tags to suggest, and print the relevant HTML. Then I need to load that HTML into the .fbssts_floating_suggestions div at the cursor location. Ideally, I'd like to be able to do this: var newSuggestions = load('/fbssts/load/tags', {text: dest.getTextBeforeCursor()}); fbssts_box.html(fbssts_box_orig); $('.fbssts_floating_suggestions .fbssts_suggestions a').click(function() { var tag = $(this).html(); if (tag.match(/W/)) { tag = tag +']'; } dest.insertAtCursor(tag); fbssts_box.hide(); dest.focus(); return false; }); And here's the regex I'm using to identify tags (and @mentions) in the PHP back-end, FWIW. %(\A(#|@)(\w|(\p{L}\p{M}?))+\b)|((?<=\s)(#|@)(\w|(\p{L}\p{M}?))+\b)|(\[(#|@).+?\])%u Right now, my main hold-up is dealing with the cursor location. I've researched for the last two hours, and just ended up more confused. I would prefer a jQuery solution, but beggars can't be choosers. Thanks!

    Read the article

  • BB Code Parser (in formatting phase) with jQuery jammed due to messed up loops most likely

    - by Oskar
    Greetings everyone, I'm making a BB Code Parser but I'm stuck on the JavaScript front. I'm using jQuery and the caret library for noting selections in a text field. When someone selects a piece of text a div with formatting options will appear. I have two issues. Issue 1. How can I make this work for multiple textfields? I'm drawing a blank as it currently will detect the textfield correctly until it enters the $("#BBtoolBox a").mousedown(function() { } loop. After entering it will start listing one field after another in a random pattern in my eyes. !!! MAIN Issue 2. I'm guessing this is the main reason for issue 1 as well. When I press a formatting option it will work on the first action but not the ones afterwards. It keeps duplicating the variable parsed. (if I only keep to one field it will never print in the second) Issue 3 If you find anything especially ugly in the code, please tell me how to improve myself. I appriciate all help I can get. Thanks in advance $(document).ready(function() { BBCP(); }); function BBCP(el) { if(!el) { el = "textarea"; } // Stores the cursor position of selection start $(el).mousedown(function(e) { coordX = e.pageX; coordY = e.pageY; // Event of selection finish by using keyboard }).keyup(function() { BBtoolBox(this, coordX, coordY); // Event of selection finish by using mouse }).mouseup(function() { BBtoolBox(this, coordX, coordY); // Event of field unfocus }).blur(function() { $("#BBtoolBox").hide(); }); } function BBtoolBox(el, coordX, coordY) { // Variable containing the selected text by Caret selection = $(el).caret().text; // Ignore the request if no text is selected if(selection.length == 0) { $("#BBtoolBox").hide(); return; } // Print the toolbox if(!document.getElementById("BBtoolBox")) { $(el).before("<div id=\"BBtoolBox\" style=\"left: "+ ( coordX + 5 ) +"px; top: "+ ( coordY - 30 ) +"px;\"></div>"); // List of actions $("#BBtoolBox").append("<a href=\"#\" onclick=\"return false\"><img src=\"./icons/text_bold.png\" alt=\"B\" title=\"Bold\" /></a>"); $("#BBtoolBox").append("<a href=\"#\" onclick=\"return false\"><img src=\"./icons/text_italic.png\" alt=\"I\" title=\"Italic\" /></a>"); } else { $("#BBtoolBox").css({'left': (coordX + 3) +'px', 'top': (coordY - 30) +'px'}).show(); } // Parse the text according to the action requsted $("#BBtoolBox a").mousedown(function() { switch($(this).children(":first").attr("alt")) { case "B": // bold parsed = "[b]"+ selection +"[/b]"; break; case "I": // italic parsed = "[i]"+ selection +"[/i]"; break; } // Changes the field value by replacing the selection with the variable parsed $(el).val($(el).caret().replace(parsed)); $("#BBtoolBox").hide(); return false; }); }

    Read the article

  • move carat to the end of a text input field AND make the end visible

    - by user322384
    I'm going insane. I have an autosuggest box where users choose a suggestion. On the next suggestion selection the value of the text input box exceeds its size. I can move the carat to the end of the input field crossbrowser, no problem. But on Chrome and Safari I cannot SEE the carat at the end. The end of the text is not visible. Is there a way to move the carat to the end of a text input field AND have the end of the field visible so that the user is not confused about where the input carat went? what I got so far: <html> <head><title>Field update test</title></head> <body> <form action="#" method="POST" name="testform"> <p>After a field is updated the carat should be at the end of the text field AND the end of the text should be visible</p> <input type="text" name="testbox" value="" size="40"> <p><a href="javascript:void(0);" onclick="add_more_text();">add more text</a></p> </form> <script type="text/javascript"> <!-- var count = 0; function add_more_text() { var textfield = document.testform.elements['testbox']; textfield.blur(); textfield.focus(); if (count == 0) textfield.value = ''; // clear old count++; textfield.value = (count ? textfield.value : '') + ", " + count + ": This is some sample text"; // move to the carat to the end of the field if (textfield.setSelectionRange) { textfield.setSelectionRange(textfield.value.length, textfield.value.length); } else if (textfield.createTextRange) { var range = textfield.createTextRange(); range.collapse(true); range.moveEnd('character', textfield.value.length); range.moveStart('character', textfield.value.length); range.select(); } // force carat visibility for some browsers if (document.createEvent) { // Trigger a space keypress. var e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 0, 32); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 0, 32); } textfield.dispatchEvent(e); // Trigger a backspace keypress. e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 8, 0); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 8, 0); } textfield.dispatchEvent(e); } } // --> </script> </body> </html> Thanks

    Read the article

  • how to validate all but not single pair of input box in jQuery

    - by I Like PHP
    i have a form which have 45 input boxes, i applied jquery validation for all input boxes , but there is two pair of input boxes which have either oneof them should be filled up, not both. so how do i change jquery so that if anyone fill up first pair then jquery does not check second pair of input box and if any one is fill up second pair then not check for fisrt one's and also i have used radio box for showing one pair at a time i show code below: jQuery Code <script type="text/javascript"> $j=jQuery.noConflict(); $j(document).ready(function() { function validate() { return $j("input:text,textarea,select,radio").removeClass('rdb').filter(function() { return !/\S+/.test($j(this).val()); }).addClass('rdb').size() == 0; } $j('#myForm').submit(validate); $j(":input:text,textarea,select").blur(function() { if(this.value.length > 0) { $j(this).removeClass('rdb'); } }); $j("input:radio").click(function(){ if($j(this).val()=='o'){ $j("#rcpt").css("display","none"); $j("#notRcpt").css("display","inline"); } if($j(this).val()=='r'){ $j("#notRcpt").css("display","none"); $j("#rcpt").css("display","inline"); } }); }); </script> PHP Code <form name="myForm" action="somepage.php" method="post" id="myForm"> <table width="100%" border="0" cellspacing="4" cellpadding="0"> <tr> <td class="boxtitle">Delivery Pick up Station/Place</td> <tr> <td style="font:bold 11px verdana;"> <input type="radio" name="receipt" value="r" >Receipt <input type="radio" name="receipt" value="o" >Other </td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="3" cellpadding="0"> <tr id="rcpt" style="display:none"> <td width="12%" align="left">Receipt:</td> <td width="30%" align="left"<input type="text" name="deliveryNo" id="deliveryNo" /></td> <td width="25%" align="right">Pick up Date:</td> <td width="35%" align="left"><input name="deliveryDate" type="text" id="deliveryDate" /></td> </tr> <tr id="notRcpt" style="display:none"> <td>Other:</td> <td><input name="deliveryNo" type="text" id="deliveryNo" /></td> <td align="right">Pick up Date:</td> <td><input name="otherDeliveryDate" type="text" id="otherDeliveryDate" /></td> </tr> </table> </td> </tr> </table> </form>

    Read the article

  • Encoding GBK2312 Condundrum

    - by user792271
    I am an amateur coder and I have a small problem. My goal is to have one text input with two buttons. The first button uses a bit of Javascript called SundayMorning to translate the text (to Chinese) The second button submits the text to a URL. The URl requires that Chinese text be encoded it in GBK2312 character set. I have duct taped together various found code to the result I have now. Due to the finicky behavior of the SundayMorning Javascript, my solution is to have two input boxes, the second of which I will hide. Right now, this doesn't work: I am unable to encode the Chinese in GBK2312, no matter what I try. BONUS CONUNDRUM: The second box copies my input letter by letter as I type, but does not copy the Chinese translation that the Javascript returns. Sorry for my janky amateur code. I defer to those more clever, if you have any kind suggestions. <head> <meta http-equiv="Content-Type" content="text/html; charset=GB2312" /> <script type='text/javascript' Src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'> </script> ///THIS JS TRANSLATES THE TEXT INLINE <script type="text/javascript" src="jquery.sundaymorning.js"> </script> <script type="text/javascript"> $(function() { $('#example3').sundayMorningReset(); $('#example3 input[type=image]').click(function(evt) { $.sundayMorning( $('#example3 input[type=text]').val(),{source:'en', destination:'ZH', menuLeft:evt.pageX, menuTop:evt.pageY},function(response) {$('#example3 input[type=text]').val(response.translation);});});}); </script> /// ///THIS PUTS THE CONTENT OF THE TRANSLATION BOX INTO THE SUBMISSION BOX <script type="text/javascript"> $(document).ready(function(){ var $url = $("#url"); $("#track").keyup(function() { $url.val(this.value);}); $("#track").blur(function() { $url.val(this.value);});}); </script> ///THIS PUTS THE CONTENT OF THE SUBMISSION INSIDE A URL <SCRIPT type="text/javascript"> function goToPage(url) { var initial = "http://example.com/"; var extension = ".html"; document.something.action=initial+url+extension; } </SCRIPT> </head> <body> <div id="featured"> <div id="example3"> <input type="text" name="track" id="track" value="" class="box"onkeydown="javascript:if (event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('mama').click();}};"/> <input type="image" src="http://taobaofieldguide.com/images/orange-translate-button.png" id="searchsubmit" value="Translate" class="btn" /> </div> <FORM name="something" method="post" onsubmit="goToPage(this.url.value);"> <input type="text" id="url";> <INPUT type="submit" id="mama" value="GO" > </FORM> </div> </body>

    Read the article

  • HMTL5 Anti Aliasing Browser Disable

    - by Tappa Tappa
    I am forced to consider writing a library to handle the fundamental basics of drawing lines, thick lines, circles, squares etc. of an HTML5 canvas because I can't disable a feature embedded in the browser rendering of the core canvas algorithms. Am I forced to build the HTML5 Canvas rendering process from the ground up? If I am, who's in with me to do this? Who wants to change the world? Imagine a simple drawing application written in HTML5... you draw a shape... a closed shape like a rudimentary circle, free hand, more like an onion than a circle (well, that's what mine would look like!)... then imagine selecting a paint bucket icon and clicking inside that shape you drew and expecting it to be filled with a color of your choice. Imagine your surprise as you selected "Paint Bucket" and clicked in the middle of your shape and it filled your shape with color... BUT, not quite... HANG ON... this isn't right!!! On the inside of the edge of the shape you drew is a blur between the background color and your fill color and the edge color... the fill seems to be flawed. You wanted a straight forward "Paint Bucket" / "Fill"... you wanted to draw a shape and then fill it with a color... no fuss.... fill the whole damned inside of your shape with the color you choose. Your web browser has decided that when you draw the lines to define your shape they will be anti-aliased. If you draw a black line for your shape... well, the browser will draw grey pixels along the edges, in places... to make it look like a "better" line. Yeah, a "better" line that **s up the paint / flood fill process. How much does is cost to pay off the browser developers to expose a property to disable their anti-aliasing rendering? Disabling would save milliseconds for their rendering engine, surely! Bah, I really don't want to have to build my own canvas rendering engine using Bresenham line rendering algorithm... WHAT CAN BE DONE... HOW CAN THIS BE CHANGED!!!??? Do I need to start a petition aimed at the WC3???? Will you include your name if you are interested??? UPDATED function DrawLine(objContext, FromX, FromY, ToX, ToY) { var dx = Math.abs(ToX - FromX); var dy = Math.abs(ToY - FromY); var sx = (FromX < ToX) ? 1 : -1; var sy = (FromY < ToY) ? 1 : -1; var err = dx - dy; var CurX, CurY; CurX = FromX; CurY = FromY; while (true) { objContext.fillRect(CurX, CurY, objContext.lineWidth, objContext.lineWidth); if ((CurX == ToX) && (CurY == ToY)) break; var e2 = 2 * err; if (e2 > -dy) { err -= dy; CurX += sx; } if (e2 < dx) { err += dx; CurY += sy; } } }

    Read the article

< Previous Page | 8 9 10 11 12 13  | Next Page >