I've noticed that the Title or Body part is remembered if I come back to the Ask Question page by pressing Back button of my browser.
How can I approach that effect?
Mostly interested in how to hide the SharePoint "particulars". For example whether to use the base site as "Wiki" and in this case - how to hide the "SitePages" folder and other SharePoint specifics.
And links to any pages / Documents helping there ;)
I am developing an application using jQuery mobile 1.1.0 RC1 and phonegap 1.5.0
I have a single HTML page which contains all the pages in it as a div(through data-role="page")
here is my code
<!DOCTYPE HTML>
<html>
<head>
<title>Index Page</title>
<!-- Adding viewport -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Adding Phonegap scripts -->
<script type="text/javascript" charset="utf-8"
src="cordova/cordova-1.5.0.js"></script>
<!-- Adding jQuery mobile and jQuery scripts & CSS -->
<script type="text/javascript" src="jquery/jquery-1.7.1.min.js"></script>
<link rel="stylesheet"
href="jquerymobile/jquery.mobile-1.1.0-rc.1.min.css" />
<script type="text/javascript" src="jquery/jquery.validate.min.js"></script>
<script type="text/javascript"
src="jquerymobile/jquery.mobile-1.1.0-rc.1.min.js"></script>
<link rel="stylesheet" href="css/colors.css">
<script type="text/javascript">
function page1(){
$.mobile.changePage("#page2", {
transition : "slide"
});
}
function page2(){
$.mobile.changePage("#page1", {
transition : "slide"
});
}
$("#page1").live("pageshow", function(e) {
$.ajax({
type : 'GET',
cache : false,
url : "http://192.168.1.198:9051/something.xml"
+ "?time=" + Date.now(),
data : {
key : "value"
},
dataType : "xml",
success : function(xml) {
console.log("Success Page1");
},
error : function(xhr) {
}
});
});
$("#page2").live("pageshow", function(e) {
$.ajax({
type : 'GET',
cache : false,
url : "http://192.168.1.198:9051/something.xml"
+ "?time=" + Date.now(),
data : {
key : "value"
},
dataType : "xml",
success : function(xml) {
console.log("Success Page2");
},
error : function(xhr) {
}
});
});
</script>
<body>
<div data-role="page" id="page1">
<div data-role="header">Page 1</div>
<div data-role="content">
<input type="text" name="page1GetTime" id="page1GetTime" value="" /><a
href="#" data-role="button" onclick="page1()" id="gotopage2"> Go to Page 2 </a>
</div>
</div>
<div data-role="page" id="page2">
<div data-role="header">Page 2</div>
<div data-role="content">
<input type="text" name="page2GetTime" id="page2GetTime" value="" /><a
href="#" data-role="button" onclick="page2()" id="gotopage1">Go to Page 1</a>
</div>
</div>
</body>
Now when i click to "Go to page2" then page2 will be shown along with one ajax request .. If i keep on moving from one page to another then a ajax request is made.. This request stops responding after 4 to 5 request... Why is it happening?
When a user clicks a button I need to create a .bmp file on the server. After the .bmp file is created I will load it into the html page. Would Ajax be the best way to accomplish this?
I want to download file on client side from api
apicontroller:
public HttpResponseMessage PostOfficeSupplies()
{
string csv = string.Format ("D:\\Others\\Images/file.png");
HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK);
result.Content = new StringContent(csv);
result.Content.Headers.ContentType = new MediaTypeHeaderValue ("application/octet-stream");
result.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment");
result.Content.Headers.ContentDisposition.FileName = "file.png";
return result;
}
1.How can I popup a download with jquery(octet-stream) from api controller?
my client side code:
$(document).ready(function () {
$.ajax(
{
url: 'api/MyAPI'
, type: "post"
, contentType: "application/octet-stream"
, data: ''
, success:
function (retData) {
$("body").append("<iframe src='" + retData + "' style='display: none;' ></iframe>");
}
});
});
but it was not work!!!Thanks!!
I've made a footer wrap outside the content wrap (which everything else is in). I would like to make the footer wrap extend to fill the width of the page and I would like it to be fixed on the bottom. Here's the code:
footerWrap {
background-color:#000;
width: auto;
}
footer {
margin: auto;
text-align:center;
width:965px;
height:150px;
background-color:#000;
border:#000 inset medium;
}
The website is item9andthemadhatters.com please let me know if you need any other code or info. Thanks!!
update:
html {
padding:0;
height:100%;
width: 100%;
}
body{
margin: -1px 0 0 0;
background-color:#FFF;
font-family: calibri;
background-image:url(images/item9HeaderSideFiller.gif);
background-repeat: repeat-x;
padding:0;
height:100%;
width: 100%;
}
wrap {
width: 965px;
margin:auto auto;
min-height:462px;
max-height:4000
px;
footerWrap {
background-color:#000;
position:absolute;
bottom:0;
width:100%
}
footer {
margin: auto;
text-align:center;
width:965px;
height:150px;
background-color:#000;
}
}
I need to put a map in a webpage and I need that when the users clicks on certain area inside city limits on the map the user is redirected.
Wich is the best way without using Flash?
Define Hover polingons on a image.
SVG on the browser.
Some sort of Javascript, jQuery magical plugin out there?
Google Maps?
And example could be this but It's flash.
hey all ,
background -
I'm using an activx that allow me to access some information on the client side,
By using the activex events and callback i'm updating server side from client.
i wrote a user control that register all activex's events so when one of the events occuer there is a callback to the server that handle this event.
I need to write some other user controls based on this control so on every callback this user controls will be render on the client side.
My question is -
what is the best way to make a shared infrastructure that handle this events and render the right content base on user controls?
is there any other ways i can use ?
thanks!
In my urls.py I have this:
(r'^myapp/$', 'myapp.views.views.index'),
(r'^myapp/login/$', 'myapp.views.views.login_user'),
In my settings.py I have this:
LOGIN_URL = '/myapp/login'
In my views.py I have this:
@login_required((login_url='/myapp/login/')
def index(request):
return render_to_response('index.html')
def login_user(request):
#login stuff
return render(request, 'registration/login.html', {'state':state, 'username': username})
I can go to mysite.com/myapp/login and the login page works. However, when I go to mysite.com/myapp/index I do not get redirected to the login page even though I am logged out. Why is that and how do I fix it?
How do you send the content of a website form to an email address without disclosing the email address to the user.
Thanks!
PS: If at all possible, I would like this to be in HTML.
I develop a simple mobile page; the font displayed is very samll although I set it as 33px and the screen resolution for iPhone is 320 X 480.
Does anyone know why it is so small?
Or the screen resolution is not 320 X 480 since it can be zoomed. Then how do I make the font to be adapted to the resolution automatically?
I was writing a "pluginable" function when I noticed the following behavior (tested in FF 3.5.9 with Firebug 1.5.3).
$.fn.computerMove = function () {
var board = $(this);
var emptySquares = board.find('div.clickable');
var randPosition = Math.floor(Math.random() * emptySquares.length);
emptySquares.each(function (index) {
if (index === randPosition) {
// logs a jQuery object
console.log($(this));
}
});
target = emptySquares[randPosition];
// logs a non-jQuery object
console.log(target);
// throws error: attr() not a function for target
board.placeMark({'position' : target.attr('id')});
}
I noticed the problem when the script threw an error at target.attr('id') (attr not a function). When I checked the log, I noticed that the output (in Firebug) for target was:
<div style="width: 97px; height: 97px;" class="square clickable" id="8"></div>
If I output $(target), or $(this) from the each() function, I get a nice jQuery object:
[ div#8.square ]
Now here comes my question: why does this happen, considering that find() seems to return an array of jQuery objects? Why do I have to do $() to target all over again?
[div#0.square, div#1.square, div#2.square, div#3.square, div#4.square, div#5.square, div#6.square, div#7.square, div#8.square]
Just a curiosity :).
To learn from good examples, what are the best open source Google App Engine applications out there?
I don't care if it is Java or Python based.
Please one app per answer. Feel free to add a link to the live app (if there is) and to the project page.
Hi there!
I was looking for some opinions on the best remote method invocation practices when developing iPhone applications that communicate with Java (java EE) servers.
Many iphone applications these days typically talk to a server back end. I typically prefer to write my servers in java using some Spring libraries. So far I have not found or stuck to a definitive practice for iphone-java server communication.
What are some technical solutions and libraries that you have used to implement this kind of client-server communication?
One thing I always keep in mind is that I want the communication protocols to be simple so that multiple platforms can be added for example, in future adding Android and possibly Blackberry clients, that can use the same protocol to talk to the server.
Hi,
I need to run an image processing application on a .NET server.
Do you have any tips what I should/can do?
I implemented the code in a webservice, but performance is very slow (at least 10x slower than when executed in a windows application).
Any help will be greatly appreciated.
thanks
hi, i have a general design question.
we have a fairly big data model that represents an clinical object, the object itself has 200+ child attributes in the hierarchy.
and we have a SetObject operation, and a GetObject operation. my question is, best practice wise, would it make sense to use that single data model in both operations or different data model for each? Because the Get operation will return much more details than what's needed for Set.
an example of what i mean: the data model has say ProviderId, and ProviderName attributes, in the Get operation, both the ProviderId, and ProviderName would need to be returned. However, in the Set operation, only the ProviderId is needed, and ProviderName is ignored by the service since system has that information already. In this case, if the Get and Set operations use the same data model, the ProviderName is exposed even for Set operation, does that confuse the consuming developer?
I'm wondering what the best way would be to customize the less files in Bootstrap and, at the mean time, keep it easy to be updated to future Bootstrap versions.
It's straightforward to just modify the less files, but the problem is that when the next version of Bootstrap comes out, it might be painful to upgrade (because all the changes are already deeply mixed with the original sources.)
Another approach would be similar to the open closed principle, that is, keeping the original less files unchanged, and adding my customized less files to overwrite the CSS rules I need. When Bootstrap gets updated, (hopefully) I can simply replace the less files and everything would work magically. However, regardless of the correctness of my assumption, the same CSS rules would be scattered in even more places and hard to manage. Also, the more we overwrite the CSS (not for compatibility or other purposes), the more bandwidth we waste.
I know this highly depends on how the author of Bootstrap would handle the structure of the framework or even the naming of CSS rules, but I'd still like to hear everybody's opinions.
Thanks.
I would like to only work with UTF8. The problem is I don't know the charset of every webpage. How can I detect it and convert to UTF8?
<?php
$url = "http://vkontakte.ru";
$ch = curl_init($url);
$options = array(
CURLOPT_RETURNTRANSFER => true,
);
curl_setopt_array($ch, $options);
$data = curl_exec($ch);
// $data = magic($data);
print $data;
See this at: http://paulisageek.com/tmp/curl-utf8
What is magic()?
I'm using Struts 2 and I'd like to determine the page generation time without an external profiler. I can easily profile the actions execute() method, but I don't know how to include the time spent before (in dispatchers, interceptors...) and after (time taken by the servlet corresponding to the view ("jsp time")).
Is there simple way to do this ? And if there isn't, how could I, at least, profile the "jsp time" (maybe a tag I'm not aware of ?) ? I think it would be accurate enough to just take in account action time + jsp time.
Thanks.
I'm going to be using S3 to store user uploaded photos. Obviously, I wont be serving the image files to user agents without resizing them down. However, not one size would do, as some thumbnails will be smaller than other larger previews. So, I was thinking of making a standard set of dimensions scaling from the lowest 16x16 to some highest 1024x1024. Is this a good way to solve this problem? What if I need a new size later on? How would you solve this?
I'm currently finishing up testing a new Ruby on Rails app. Just recently, some of the pages do not seem to finish downloading in IE8. In FireFox, Chrome and Safari, everything works perfectly. The pages all validate successfully using the W3C validator.
When I view the page source in IE8, the page has been chopped off around 75% of the size it should be. IE8 claims the page is finished loading, and doesn't give any errors, but of course the page isn't rendering properly.
Has anyone seen this before? I'd really appreciate any help.
I am looking fr someone to make me two website templates for my site for free.
Here is a quick design of what I want:(Took me 2 minutes in Paint)
http:/ /i50.tinypic.com/33p9aut.jpg (You have to push backspace on the first link to join up the http:/ and the other /)and http://i50.tinypic.com/2qmogoo.jpg
Email me at [email protected] or [email protected] for more information