Search Results

Search found 3221 results on 129 pages for 'inline styles'.

Page 80/129 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • Changing CSS on the fly in a UIWebView on iPhone

    - by Shaggy Frog
    Let's say I'm developing an iPhone app that is a catalogue of cars. The user will choose a car from a list, and I will present a detail view for the car, which will describe things like top speed. The detail view will essentially be a UIWebView that is loading an existing HTML file. Different users will live in different parts of the world, so they will like to see the top speed for the car in whatever units are appropriate for their locale. Let's say there are two such units: SI (km/h) and conventional (mph). Let's also say the user will be able to change the display units by hitting a button on the screen; when that happens, the detail screen should switch to show the relevant units. So far, here's what I've done to try and solve this. The HTML might look something like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <title>Some Car</title> <link rel="stylesheet" media="screen" type="text/css" href="persistent.css" /> <link rel="alternate stylesheet" media="screen" type="text/css" href="si.css" title="si" /> <link rel="alternate stylesheet" media="screen" type="text/css" href="conventional.css" title="conventional" /> <script type="text/javascript" src="switch.js"></script> </head> <body> <h1>Some Car</h1> <div id="si"> <h2>Top Speed: 160 km/h</h2> </div> <div id="conventional"> <h2>Top Speed: 100 mph</h2> </div> </body> The peristent stylesheet, persistent.css: #si { display:none; } #conventional { display:none; } The first alternate stylesheet, si.css: #si { display:inline; } #conventional { display:none; } And the second alternate stylesheet, conventional.css: #si { display:none; } #conventional { display:inline; } Based on a tutorial at A List Apart, my switch.js looks something like this: function disableStyleSheet(title) { var i, a; for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if ((a.getAttribute("rel").indexOf("alt") != -1) && (a.getAttribute("title") == title)) { a.disabled = true; } } } function enableStyleSheet(title) { var i, a; for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if ((a.getAttribute("rel").indexOf("alt") != -1) && (a.getAttribute("title") == title)) { a.disabled = false; } } } function switchToSiStyleSheet() { disableStyleSheet("conventional"); enableStyleSheet("si"); } function switchToConventionalStyleSheet() { disableStyleSheet("si"); enableStyleSheet("conventional"); } My button action handler looks something like this: - (void)notesButtonAction:(id)sender { static BOOL isUsingSi = YES; if (isUsingSi) { NSString* command = [[NSString alloc] initWithString:@"switchToSiStyleSheet();"]; [self.webView stringByEvaluatingJavaScriptFromString:command]; [command release]; } else { NSString* command = [[NSString alloc] initWithFormat:@"switchToConventionalStyleSheet();"]; [self.webView stringByEvaluatingJavaScriptFromString:command]; [command release]; } isUsingSi = !isUsingSi; } Here's the first problem. The first time the button is hit, the UIWebView doesn't change. The second time it's hit, it looks like the conventional style sheet is loaded. The third time, it switches to the SI style sheet; the fourth time, back to the conventional, and so on. So, basically, only that first button press doesn't seem to do anything. Here's the second problem. I'm not sure how to switch to the correct style sheet upon initial load of the UIWebView. I tried this: - (void)webViewDidFinishLoad:(UIWebView *)webView { NSString* command = [[NSString alloc] initWithString:@"switchToSiStyleSheet();"]; [self.webView stringByEvaluatingJavaScriptFromString:command]; [command release]; } But, like the first button hit, it doesn't seem to do anything. Can anyone help me with these two problems?

    Read the article

  • django - dynamic form fieldsets

    - by user110029
    A form will be spitting out an unknown number of questions to be answered. each question contains a prompt, a value field, and a unit field. The form is built at runtime in the formclass's init method. I'd like each question rendered on the form as an inline: prompt, value(input-text), units (select). this seems a case perfect for iterable form fieldsets, which could be easily styled. but since fieldsets - such as those in django-form-utils are defined as tuples, they are immutable... and I can't find a way to define them at runtime. is this possible, or perhaps another solution?

    Read the article

  • Spam Assassin on windows

    - by ebeworld
    I just installed spam assassin and run for its sample ham mail as spamassassin sample-nonspam.txt, but it ended up marking it as a spam. What configuration am i missing to change? Result of the check is: From: Keith Dawson To: [email protected] Subject: **SPAM** TBTF ping for 2001-04-20: Reviving Date: Fri, 20 Apr 2001 16:59:58 -0400 Message-Id: X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on ebeworld-PC X-Spam-Level: **** X-Spam-Status: Yes, score=10.5 required=6.3 tests=DCC_CHECK,DIGEST_MULTIPLE, DNS_FROM_OPENWHOIS,RAZOR2_CF_RANGE_51_100,RAZOR2_CF_RANGE_E4_51_100, RAZOR2_CHECK shortcircuit=no autolearn=no version=3.2.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_4BF17E8E.BF8E0000" This is a multi-part message in MIME format. ------------=_4BF17E8E.BF8E0000 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit This mail is probably spam. The original message has been attached intact in RFC 822 format. Content preview: -----BEGIN PGP SIGNED MESSAGE----- TBTF ping for 2001-04-20: Reviving T a s t y B i t s f r o m t h e T e c h n o l o g y F r o n t [...] Content analysis details: (10.5 points, 6.3 required) 2.4 DNS_FROM_OPENWHOIS RBL: Envelope sender listed in bl.open-whois.org. 1.5 RAZOR2_CF_RANGE_E4_51_100 Razor2 gives engine 4 confidence level above 50% [cf: 58] 2.5 RAZOR2_CHECK Listed in Razor2 (http://razor.sf.net/) 0.5 RAZOR2_CF_RANGE_51_100 Razor2 gives confidence level above 50% [cf: 58] 3.6 DCC_CHECK Listed in DCC (http://rhyolite.com/anti-spam/dcc/) 0.0 DIGEST_MULTIPLE Message hits more than one network digest check ------------=_4BF17E8E.BF8E0000 Content-Type: message/rfc822; x-spam-type=original Content-Description: original message before SpamAssassin Content-Disposition: inline Content-Transfer-Encoding: 8bit Return-Path: Delivered-To: [email protected] Received: from europe.std.com (europe.std.com [199.172.62.20]) by mail.netnoteinc.com (Postfix) with ESMTP id 392E1114061 for ; Fri, 20 Apr 2001 21:34:46 +0000 (Eire) Received: (from daemon@localhost) by europe.std.com (8.9.3/8.9.3) id RAA09630 for tbtf-outgoing; Fri, 20 Apr 2001 17:31:18 -0400 (EDT) Received: from sgi04-e.std.com (sgi04-e.std.com [199.172.62.134]) by europe.std.com (8.9.3/8.9.3) with ESMTP id RAA08749 for ; Fri, 20 Apr 2001 17:24:31 -0400 (EDT) Received: from world.std.com (world-f.std.com [199.172.62.5]) by sgi04-e.std.com (8.9.3/8.9.3) with ESMTP id RAA8278330 for ; Fri, 20 Apr 2001 17:24:31 -0400 (EDT) Received: (from dawson@localhost) by world.std.com (8.9.3/8.9.3) id RAA26781 for [email protected]; Fri, 20 Apr 2001 17:24:31 -0400 (EDT) Received: from sgi04-e.std.com (sgi04-e.std.com [199.172.62.134]) by europe.std.com (8.9.3/8.9.3) with ESMTP id RAA07541 for ; Fri, 20 Apr 2001 17:12:06 -0400 (EDT) Received: from world.std.com (world-f.std.com [199.172.62.5]) by sgi04-e.std.com (8.9.3/8.9.3) with ESMTP id RAA8416421 for ; Fri, 20 Apr 2001 17:12:06 -0400 (EDT) Received: from [208.192.102.193] (ppp0c199.std.com [208.192.102.199]) by world.std.com (8.9.3/8.9.3) with ESMTP id RAA14226 for ; Fri, 20 Apr 2001 17:12:04 -0400 (EDT) Mime-Version: 1.0 Message-Id: Date: Fri, 20 Apr 2001 16:59:58 -0400 To: [email protected] From: Keith Dawson Subject: TBTF ping for 2001-04-20: Reviving Content-Type: text/plain; charset="us-ascii" Sender: [email protected] Precedence: list Reply-To: [email protected] -----BEGIN PGP SIGNED MESSAGE----- TBTF ping for 2001-04-20: Reviving T a s t y B i t s f r o m t h e T e c h n o l o g y F r o n t Timely news of the bellwethers in computer and communications technology that will affect electronic commerce -- since 1994 Your Host: Keith Dawson ISSN: 1524-9948 This issue: < http://tbtf.com/archive/2001-04-20.html > To comment on this issue, please use this forum at Quick Topic: < http://www.quicktopic.com/tbtf/H/kQGJR2TXL6H > ________________________________________________________________________ Q u o t e O f T h e M o m e n t Even organizations that promise "privacy for their customers" rarely if ever promise "continued privacy for their former customers..." Once you cancel your account with any business, their promises of keeping the information about their customers private no longer apply... you're not a customer any longer. This is in the large category of business behaviors that individuals would consider immoral and deceptive -- and businesses know are not illegal. -- "_ankh," writing on the XNStalk mailing list ________________________________________________________________________ ..TBTF's long hiatus is drawing to a close Hail subscribers to the TBTF mailing list. Some 2,000 [1] of you have signed up since the last issue [2] was mailed on 2000-07-20. This brief note is the first of several I will send to this list to excise the dead addresses prior to resuming regular publication. While you time the contractions of the newsletter's rebirth, I in- vite you to read the TBTF Log [3] and sign up for its separate free subscription. Send "subscribe" (no quotes) with any subject to [email protected] . I mail out collected Log items on Sun- days. If you need to stay more immediately on top of breaking stories, pick up the TBTF Log's syndication file [4] or read an aggregator that does. Examples are Slashdot's Cheesy Portal [5], Userland [6], and Sitescooper [7]. If your news obsession runs even deeper and you own an SMS-capable cell phone or PDA, sign up on TBTF's WebWire- lessNow portal [8]. A free call will bring you the latest TBTF Log headline, Jargon Scout [9] find, or Siliconium [10]. Two new columnists have bloomed on TBTF since last summer: Ted By- field's roving_reporter [11] and Gary Stock's UnBlinking [12]. Late- ly Byfield has been writing in unmatched depth about ICANN, but the roving_reporter nym's roots are in commentary at the intersection of technology and culture. Stock's UnBlinking latches onto topical sub- jects and pursues them to the ends of the Net. These writers' voices are compelling and utterly distinctive. [1] http://tbtf.com/growth.html [2] http://tbtf.com/archive/2000-07-20.html [3] http://tbtf.com/blog/ [4] http://tbtf.com/tbtf.rdf [5] http://www.slashdot.org/cheesyportal.shtml [6] http://my.userland.com/ [7] http://www.sitescooper.org/ [8] http://tbtf.com/pull-wwn/ [9] http://tbtf.com/jargon-scout.html [10] http://tbtf.com/siliconia.html [11] http://tbtf.com/roving_reporter/ [12] http://tbtf.com/unblinking/ ________________________________________________________________________ S o u r c e s For a complete list of TBTF's email and Web sources, see http://tbtf.com/sources.html . ________________________________________ B e n e f a c t o r s TBTF is free. If you get value from this publication, please visit the TBTF Benefactors page < http://tbtf.com/the-benefactors.html > and consider contributing to its upkeep. ________________________________________________________________________ TBTF home and archive at http://tbtf.com/ . To unsubscribe send the message "unsubscribe" to [email protected]. TBTF is Copy- right 1994-2000 by Keith Dawson, <[email protected]>. Commercial use prohibited. For non-commercial purposes please forward, post, and link as you see fit. _______________________________________________ Keith Dawson [email protected] Layer of ash separates morning and evening milk. -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.2 for non-commercial use http://www.pgp.com iQCVAwUBOuCi3WAMawgf2iXRAQHeAQQA3YSePSQ0XzdHZUVskFDkTfpE9XS4fHQs WaT6a8qLZK9PdNcoz3zggM/Jnjdx6CJqNzxPEtxk9B2DoGll/C/60HWNPN+VujDu Xav65S0P+Px4knaQcCIeCamQJ7uGcsw+CqMpNbxWYaTYmjAfkbKH1EuLC2VRwdmD wQmwrDp70v8= =8hLB -----END PGP SIGNATURE----- ------------=_4BF17E8E.BF8E0000--

    Read the article

  • How to allow my Asp.net MVC 3 web app using MathJax to accept user input $x<y>z$ ?

    - by Recycle Bin
    I am developing a mathematics site using Asp.Net MVC 3 + Razor + MathJax. MathJax is a javascript library to render TeX or LaTeX codes on the web browser. And TeX or LaTeX codes represent mathematics contents such as an inline math $y=mx+c$ and a displayed math \[y=mx+c\]. Right now my site can accept input, for example, $x<y$. However it cannot accept $x<y>z$ because the framework regards this input is vulnerable to XSS and XSRF. Shortly speaking, what I should do to accomplish what I want but it does not open security vulnerability.

    Read the article

  • JavaScript tree / treegrid libraries

    - by desau
    I'm looking for a good JavaScript tree / treegrid package. Now -- before you answer: It needs to be able to perform well with lots of nodes. Perhaps 1,000 sibling nodes. It needs to be able to draw to a usable state within 2 or 3 seconds with 1,000 nodes. It doesn't necessarily need to draw all 1,000 nodes at once -- if it supports some sort of "smart rendering" or fake scrolling. Beyond that, column resizing, drag and drop, inline editing would all be nice, although I could probably add that functionality myself. I've already tried dojo's tree and yahoo's YUI treeview. Both are too slow.

    Read the article

  • F# Static Member Type Constraints

    - by Stephen Swensen
    I'm trying to define a function, factorize, which uses structural type constraints (requires static members Zero, One, +, and /) similar to Seq.sum so that it can be used with int, long, bigint, etc. I can't seem to get the syntax right, and can't find a lot of resources on the subject. This is what I have, please help. let inline factorize (n:^NUM) = ^NUM : (static member get_Zero: unit->(^NUM)) ^NUM : (static member get_One: unit->(^NUM)) let rec factorize (n:^NUM) (j:^NUM) (flist: ^NUM list) = if n = ^NUM.One then flist elif n % j = ^NUM.Zero then factorize (n/j) (^NUM.One + ^NUM.One) (j::flist) else factorize n (j + ^NUM.One) (flist) factorize n (^NUM.One + ^NUM.One) []

    Read the article

  • Any good lightbox for a modal dialog?

    - by aximili
    There are thousands of lightbox components and the likes. I've looked at about 10 of them, but couldn't find what I need. Just wondering if anyone know a lightbox like component that: can popup an inline div (that is initially hidden) can be modal (eg. you must select a radio button or you can't close the box) can be called dynamically, eg. so that I can call Popup('myDiv'); on page load without the user clicking anything has sufficient documentation/examples to allow me do the above easily Thanks in advance

    Read the article

  • Include OpenX ad in a jquery-ui dialog?

    - by planetclaire
    I'm loading some content into a jquery-ui dialog via .ajax. That's all working fine but now I've been given an OpenX ad to embed into the dialog & can't figure out how to do it. I know all the script is stripped when coming in via ajax, & I know how to use $.getScript to load .js files for use in the dialog, but the OpenX ad script I've got uses document.write so I think it's expecting to be embedded inline into the desired position on the page. I've tried appending the escaped script string into the div on ajax success of the main content as below, but this results in the page being redirected to a page with just the ad on it. Attempt shown below: $("#" + idHelpPage).find(".adScript").append("<script type='text/javascript'>var m3_u = (location.protocol=='https:'?'https://d1.openx.org/ajs.php':'http://d1.openx.org/ajs.php');var m3_r = ... etc etc I'm ok with jquery but not great with javascript, would really appreciate any help! Also if you want to see any other code.

    Read the article

  • Javascript execution order

    - by zaf
    I want to give a static javascript block of code to a html template designer, which can be: either inline or external or both used once or more in the html template and each block can determine its position in the template relative to the other javascript code blocks. An example could be image banners served using javascript. I give code to template designer who places it in two places, once for a horizontal banner in the header and once for a vertical banner. The same code runs in both blocks but knowing their positions can determine if to serve a horizontal or a vertical image banner. Make sense?

    Read the article

  • Is there an "opposite" to the null coalescing operator? (…in any language?)

    - by Jay
    null coalescing translates roughly to return x, unless it is null, in which case return y I often need return null if x is null, otherwise return x.y I can use return x == null ? null : x.y; Not bad, but that null in the middle always bothers me -- it seems superfluous. I'd prefer something like return x :: x.y;, where what follows the :: is evaluated only if what precedes it is not null. I see this as almost an opposite to null coalescence, kind of mixed in with a terse, inline null-check, but I'm [almost] certain that there is no such operator in C#. Are there other languages that have such an operator? If so, what is it called? (I know that I can write a method for it in C#; I use return NullOrValue.of(x, () => x.y);, but if you have anything better, I'd like to see that too.)

    Read the article

  • PHP - XML Feed get print values

    - by danit
    Here is my feed: <entry> <id>http://api.visitmix.com/OData.svc/Sessions(guid'816995df-b09a-447a-9391-019512f643a0')</id> <title type="text">Building Web Applications with Microsoft SQL Azure</title> <summary type="text">SQL Azure provides a highly available and scalable relational database engine in the cloud. In this demo-intensive and interactive session, learn how to quickly build web applications with SQL Azure Databases and familiar web technologies. We demonstrate how you can quickly provision, build and populate a new SQL Azure database directly from your web browser. Also, see firsthand several new enhancements we are adding to SQL Azure based on the feedback we&#x2019;ve received from the community since launching the service earlier this year.</summary> <published>2010-01-25T00:00:00-05:00</published> <updated>2010-03-05T01:07:05-05:00</updated> <author> <name /> </author> <link rel="edit" title="Session" href="Sessions(guid'816995df-b09a-447a-9391-019512f643a0')" /> <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Speakers" type="application/atom+xml;type=feed" title="Speakers" href="Sessions(guid'816995df-b09a-447a-9391-019512f643a0')/Speakers"> <m:inline> <feed> <title type="text">Speakers</title> <id>http://api.visitmix.com/OData.svc/Sessions(guid'816995df-b09a-447a-9391-019512f643a0')/Speakers</id> <updated>2010-03-25T11:56:06Z</updated> <link rel="self" title="Speakers" href="Sessions(guid'816995df-b09a-447a-9391-019512f643a0')/Speakers" /> <entry> <id>http://api.visitmix.com/OData.svc/Speakers(guid'3395ee85-d994-423c-a726-76b60a896d2a')</id> <title type="text">David-Robinson</title> <summary type="text"></summary> <updated>2010-03-25T11:56:06Z</updated> <author> <name>David Robinson</name> </author> <link rel="edit-media" title="Speaker" href="Speakers(guid'3395ee85-d994-423c-a726-76b60a896d2a')/$value" /> <link rel="edit" title="Speaker" href="Speakers(guid'3395ee85-d994-423c-a726-76b60a896d2a')" /> <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Sessions" type="application/atom+xml;type=feed" title="Sessions" href="Speakers(guid'3395ee85-d994-423c-a726-76b60a896d2a')/Sessions" /> <category term="EventModel.Speaker" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> <content type="image/jpeg" src="http://live.visitmix.com/Content/images/speakers/lrg/default.jpg" /> <m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"> <d:SpeakerID m:type="Edm.Guid">3395ee85-d994-423c-a726-76b60a896d2a</d:SpeakerID> <d:SpeakerFirstName>David</d:SpeakerFirstName> <d:SpeakerLastName>Robinson</d:SpeakerLastName> <d:LargeImage m:null="true"></d:LargeImage> <d:SmallImage m:null="true"></d:SmallImage> <d:Twitter m:null="true"></d:Twitter> </m:properties> </entry> </feed> </m:inline> </link> <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Tags" type="application/atom+xml;type=feed" title="Tags" href="Sessions(guid'816995df-b09a-447a-9391-019512f643a0')/Tags" /> <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Files" type="application/atom+xml;type=feed" title="Files" href="Sessions(guid'816995df-b09a-447a-9391-019512f643a0')/Files" /> <category term="EventModel.Session" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> <content type="application/xml"> <m:properties> <d:SessionID m:type="Edm.Guid">816995df-b09a-447a-9391-019512f643a0</d:SessionID> <d:Location>Breakers L</d:Location> <d:Type>Seminar</d:Type> <d:Code>SVC07</d:Code> <d:StartTime m:type="Edm.DateTime">2010-03-17T12:00:00</d:StartTime> <d:EndTime m:type="Edm.DateTime">2010-03-17T13:00:00</d:EndTime> <d:Slug>SVC07</d:Slug> <d:CreatedDate m:type="Edm.DateTime">2010-01-26T18:14:24.687</d:CreatedDate> <d:SourceID m:type="Edm.Guid">cddca9b7-6830-4d06-af93-5fd87afb67b0</d:SourceID> </m:properties> </content> </entry> I want to print the: Session Title (Building Web Applications with Microsoft SQL Azure) The Author (David Robinson) The Location (Breakers L) And display the speakers image (http://live.visitmix.com/Content/images/speakers/lrg/default.jpg) I presume I can use filegetcontents and then transform to simplexmlstring, but I dont know how to get the deeper items in I want, like Author, and image. Any chance of a bit of coding genius here?

    Read the article

  • onload Event in embedded SVG not calling function in attached script. Scope Issue?

    - by Nick
    Hi So I've got an XHTML page with a script - not inline > <script type="text/javascript" > src="../global/js/scripts.js"></script> and an embedded (I tried embed and object, same behavior) SVG document with a onload="CheckIfLoaded(evt)" attribute. The problem is firefox doesn't call the CheckIfLoaded() function in scripts.js. Firebug gives me "CheckIfLoaded() is not defined" with no reference to any line numbers. I can't find any information regarding the scope of javascript functions with respect to embedded content. Curiously, it works fine in IE. I could of course add a reference to the script into the SVG file as well but I believe that will result in the client downloading the scripts file twice and in addition I have 1000+ svg files and I'd really rather not add one line to all of them, although I suppose I could write a batch file or whatever if I have to. Any one know more about this? Thanks, Nick

    Read the article

  • Slow Scala assert

    - by Dave
    We've been profiling our code recently and we've come across a few annoying hotspots. They're in the form assert(a == b, a + " is not equal to " + b) Because some of these asserts can be in code called a huge amount of times the string concat starts to add up. assert is defined as: def assert(assumption : Boolean, message : Any) = .... why isn't it defined as: def assert(assumption : Boolean, message : => Any) = .... That way it would evaluate lazily. Given that it's not defined that way is there an inline way of calling assert with a message param that is evaluated lazily? Thanks

    Read the article

  • Does the CSS block attribute affect HTML well-formedness?

    - by tibbe
    An HTML <body> element can only contain block elements such as <p>. If I declare an inline element such as <span> to be display: block using CSS does that make the following HTML well-formed? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Title</title> </head> <body> <span style="display: block;">Hi!</span> </body> </html>

    Read the article

  • JQuery Ajax Load Mobile Browser Back Functionality

    - by Brad
    Currently working on a mobile site using the .load() technique: $.ajaxSetup ({cache: false}); contentLoad(); function contentLoad() { $('a.inline').click(function(){ var toLoad = $(this).attr('href')+' #content'; $('#loading').show(); $('#content').load(toLoad,'',showNewContent) function showNewContent() { $('#loading').hide(); $('#content').show(); contentLoad(); } return false; }); } How would I be able to integrate back and forward button functionality into mobile browsers? Hope this is possible. Thanks in advance.

    Read the article

  • Should strongly typed partial views on one page in asp.net mvc-2 have one combined view model?

    - by Kai
    Hi guys, I have a question about asp.net mvc-2 strongly typed partial views, and view models. I was just wondering if I can (or should) have two strongly typed partial views on one page, without implementing a whole new view model for that page. For example, I have a page that displays profiles, but also has an inline form to add a quick contact. Each of these entities already has it's own view model, i.e I have a ProfileViewModel and a ContactViewModel. So my view needs two strongly typed partial views, one using an IEnumerable List of ProfileViewModels, and one using a ContactViewModel. Is it possible or desirable to avoid making a third view model, an 'IndexViewModel' for this page, which holds a list of ProfileViewModels and a ContactViewModel? Is not implementing this view model bad practice, or tidier as it results in less view models? Thanks!

    Read the article

  • A checklist for fixing .NET applications to SQL Server timeout problems and improve execution time

    - by avgbody
    A checklist for improving execution time between .NET code and SQL Server. Anything from the basic to weird solutions is appreciated. Code: Change default timeout in command and connection by avgbody. Use stored procedure calls instead of inline sql statement by avgbody. Look for blocking/locking using Activity monitor by Jay Shepherd. SQL Server: Watch out for parameter sniffing in stored procedures by AlexCuse. Beware of dynamically growing the database by Martin Clarke. Use Profiler to find any queries/stored procedures taking longer then 100 milliseconds by BradO. Increase transaction timeout by avgbody. Convert dynamic stored procedures into static ones by avgbody. Check how busy the server is by Jay Shepherd.

    Read the article

  • Namespaced Backbone.js Views not firing events

    - by Stasio
    I'm currently getting started with Backbone.js. I've wrote some examples with Backbone and they are working fine. But now I need to use Backbone.js with Rails 3.1 and CoffeeScript. I took my well-working examples and rewrote on CoffeeScript using backbone-rails gem. And got the following problem. I've simplyfied code, but the problem is still remaining I've got the following files: Here I'm starting my Backbone app at main.js.coffee file according to my main_controller in rails app: $ = jQuery $-> CsfTaskManager.init() Here is backbone app description: #= require_self #= require_tree ./templates #= require_tree ./models #= require_tree ./views #= require_tree ./routers window.CsfTaskManager = Models: {} Collections: {} Routers: {} Views: {} init: -> new CsfTaskManager.Routers.AppRouter() Backbone.history.start() This is my apps' router: class CsfTaskManager.Routers.AppRouter extends Backbone.Router initialize: (options) -> goalsBlock = new CsfTaskManager.Views.goalsView() routes: "!/": "root", some other routes... And finally view: class CsfTaskManager.Views.goalsView extends Backbone.View initialize: -> this.goals = new CsfTaskManager.Collections.GoalsCollection() el: $('div#app'), events: "click .add-btn": "addGoal" addGoal: -> alert('ji') HTML page has such code: <div id="app"> <div class="app-screen hidden" id="goal-form" style="display: block; "> <button class="btn" id="load"> Load </button> <h3> New Goal </h3> <div class="form-stacked"> <form accept-charset="UTF-8" action="/goals" class="new_goal" id="new_goal" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="?"><input name="authenticity_token" type="hidden" value="Pnt+V/tS1/b079M/1ZIRdw2ss1D6bvJKVh868DXRjUg="></div> <label for="goal_title">Title</label> <p></p> <input class="goal-title" id="goal_title" name="goal[title]" size="30" type="text"> <p></p> <label for="goal_note">Note</label> <p></p> <input class="goal-note" id="goal_note" name="goal[note]" size="30" type="text"> </form> </div> <p> <button class="add-btn btn"> Add </button> </p> <ul id="goals-list"></ul> </div> <table class="app-screen bordered-table" id="calendar-grid" style="display: none; "> <tbody><tr> <td colspan="2"> week </td> </tr> <tr> <td> day </td> <td> <div id="calendar"></div> </td> </tr> </tbody></table> <div class="app-screen hidden" id="role-form" style="display: none; "> <h3> New User Role </h3> <div class="form-stacked"> <form accept-charset="UTF-8" action="/roles" class="new_role" id="new_role" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="?"><input name="authenticity_token" type="hidden" value="Pnt+V/tS1/b079M/1ZIRdw2ss1D6bvJKVh868DXRjUg="></div> <label for="role_title">Title</label> <p></p> <input class="role-title" id="role_name" name="role[name]" size="30" type="text"> <p></p> <label for="role_note">Note</label> <p></p> <input class="role-note" id="role_description" name="role[description]" size="30" type="text"> </form> </div> <p> <button class="add-btn btn"> Add </button> </p> </div> </div> So .add-btn element is nested in #app, but click on this button doesn't fire event. Where can be a trouble? Before, when I had the same app in one .js file, without of coffeescript, namespacing and backbone-rails gem, everything was allright. Bytheway, appRouter works fine, goalsView object is created successfully too, but events don't fire for some reasons. Please give me some hint, because I'm really got stuck...

    Read the article

  • Best way to implement a Parsing/Editable Richtextbox in WPF

    - by lozzar
    I'm trying to implement (as a prototype initially), a richtextbox control which can be parsed in real time to apply certain formatting options to it. This is being done in WPF so I thought the best way to go about it would be to extend the existing rich text box control. I've run into the issue where it isn't documented well and the examples are quite slow (the ones I found have parse the whole document on every keystroke). The way I've currently decided to go about it is to create a custom Inline element which can hold the formatting tags, and the contents. Hence I only have to parse the current paragraph and the runs in that paragraph for formatting tags. Is there a better way to achieve this? Note this isn't for code/syntax based documents (so AvalonEdit isn't appropriate). Cheers

    Read the article

  • CSS sprites navigation and User with image disabled.....

    - by metal-gear-solid
    I made a css menu with css sprites but the problem is with sprite we don't use inline image we use in background only so if images are disabled in browser then nothing will show . any solution for this ? For example : See this menu and turn off images : http://line25.com/wp-content/uploads/2009/css-menu/demo/demo.html (it will not be seen if images are disabled in browser) this menu is against on this quote Ensure your website works with images disabled Creating a site that relies too heavily on images is never a good idea. Although almost a thing of the past, there are still users who run at very low internet speeds. Also, if a user needs to—for whatever reason—disable images, can they still access all the content they need to? http://csswizardry.com/quick-tips/#tip-02 Shouldn't we use this type of navigation.

    Read the article

  • Disassemble Microsoft Visual Studio 2003 compiler output

    - by Carl Norum
    I'm seeing what I think is strange behaviour from object files output by the Microsoft Visual Studio 2003 tools. The file utility tells me: asmfile.obj: 80386 COFF executable not stripped - version 30821 For objects created by the assembler, but for objects coming from C files, I get just: cfile.obj: data Using Microsoft's dumpbin utility and the objdump I got from cygwin, I can disassemble the assembly-built file, but I get no useful results from either utility for the C-built files. I have a couple of questions related to this difference: What is the object file format generated by the MSVC2003 compiler? How can I disassemble that object file? I am particularly interested in getting the disassembly in AT&T syntax - I'm doing a port of a large source base to make it work with GCC, and I would like to use this method as a shortcut for some of the inline assembly routines in the project. Thanks!

    Read the article

  • unable to connect to Mailchimp services using java wrapper

    - by Nagesh
    I am using Java wrapper of mailchimp API for converting to inline CSS. I downloaded the java wrapper and tried with method inlineCss(); I register with Mailchimp and got the Api key. API Key: d5296efe2d4879e90d95b151804f8d30-us1 I am getting the below exception while calling the ping(apiKey) method. Could you please provide me the solution to resolve this problem. Exception in thread "main" com.nwire.mailchimp.MailChimpServiceException: Failed to read servers response: api.mailchimp.com at com.nwire.mailchimp.MailChimpServiceFactory$ClientFactory$1.invoke(MailChimpServiceFactory.java:190) at $Proxy0.ping(Unknown Source) at com.nwire.mailchimp.test.InlineTest.initialize(InlineTest.java:44) at com.nwire.mailchimp.test.InlineTest.run(InlineTest.java:36) at com.nwire.mailchimp.test.InlineTest.main(InlineTest.java:23) Below is the code I am using for connecting to Mailchimp. public void initialize() { mcServices = MailChimpServiceFactory.getMailChimpServices(); final String ping = mcServices.ping(apiKey); if (IMailChimpServices.PING_SUCCESS.equals(ping)) { logger.error("MailChimp connection pinged successfully"); } else { logger.error("Failed to ping MailChimp, response: " + ping); } } Regards, Nagesh.

    Read the article

  • Floating DIV elements is not lining up...

    - by Ben Sinclair
    I have dives that I am floating so that they show side by side. Here is my code: .serviceMembersPosition { width: 190px; float: left; display: inline; border: 1px solid #999; margin: 5px 5px 5px 0; padding: 5px; } It works however if one of the DIV's has more info than the others, it stuffs up the floats. See how there is a gap in my screenshot below. Is there any way to overcome this? I am using JQuery with my website. Maybe there is some code for this?

    Read the article

  • Zend Framework - tinyMCE - plugin folders are mistaken to be controllers? Help

    - by Ali
    Hi guys I'm trying to integrate the tinymce plugin however I'm running into problems such that almost every feature which requires a plugin to be rendered i.e the add url popup or add image pop up - it opens an empty pop up window. Even if I try to open it inline I get the same blank popup window.. I noticed that whenever I click on lets say url button in tinymCE it opens with reference to my localhost and because of that I'm assuming my application is mistaking the containing javascript folder to be some controller or action. How can I fix this please - I've set up mod rewrite to allow clean urls as well as ignore the javascript folder but this is a different issue altogether :( what should I be looking at here.. I can't notice any error sin firebug..

    Read the article

  • Qt undocumented method setSharable

    - by soxs060389
    I stumbled about a method which seems to be present in all DataObjects like QList, QQueue, QHash... I even investigated so far i can see the source code of it, which is inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } in qlist.h (lines 117) but what effect does it have on the QList, QQueue, QHash... ? And is it in any way related to threading? (which sounds reasonable) Thanks for any answer, and please only answer if you got actual knowledge.

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >