what field in the django models class should be used if the type of data (text/images/html) is unknown? i'm looking for a field that can handle copy and pasted html code, images, text, etc.
I've tried to write a post using a link list layout that I've created but couldn't get jekyll to generate properly. The problem should be in the index.html but I can't make the index page to generate both layout together.
{% for post in paginator.posts %}
{% include post.html %}
{% endfor %}
I have a button (outside of a form) that redirects to another page using the onclick attribute that calls window.location to redirect the user to another page. This time I can't change the HTML. I am using Safari 4 for testing. How can I click a button that uses the onclick attribute and window.location to redirect using Safari 4 and Selenium RC PHPUnit Extension?
Here's my HTML:
<input type="button" onclick="window.location='/registrations/new'" value="Start a new registration" id="create">
I have a jquery-tmpl defined:
<script id="postTemplate" type="text/x-jquery-tmpl">
<div class="div-msg-actions-inner">
@Html.ActionLink("Edit", "Edit", "Post", new { postId = "${PostId}" }, new { @class = "button" })
@Html.ActionLink("Reply", "Reply", "Post", new { topicId = "${TopicId}" }, new { @class = "button" })
</div>
</script>
The action link results in the "$" being encoded into "%24". Is there a way around this so the ID in my action link will get replaced correctly?
I'm new to Django and setting up my first site. I have a Share model and a template called share_list.html that uses an object_list like this:
{% for object in object_list %}
I setup haystack using their tutorial and the search template looks like this:
{% for result in page.object_list %}
I would like to modify the search.html template to have an include of the share_list so I don't have to repeat myself. How can I make it use the same object_list?
I'm a little bit confused about the difference between the two. An example of the Calendar API is supposedly located here: http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/instructions.html, but the author himself suggests using the Calendar Provider API, details about which are here: http://developer.android.com/guide/topics/providers/calendar-provider.html.
Can someone explain to me the difference between the two, and which would be better for me to use for a simple calendar app?
I want to stop people from viewing the contents of my images directory. I've built an app using Codeigniter and notice that they just have index.html pages with a 403 Forbidden message in all directories - is this a secure method to use? Is an index.html page in the directory sufficient or do I need to update config or .htaccess?
Hi Folks,
I'm trying to run a virtual host on a WAPP stack. My virtual host has the FollowSymLinks option, but in Windows, all those symbolic links (I'm using shortcuts, and I think this may be the problem) have the .lnk extension. So if I'm trying to access settings.html, Apache can't find it because all i have sitting there is settings.html.lnk. Apologies if my question is unclear.
I can't figure out why this list is not displaying properly in IE7.
The website: http://ada.kiexpro.com/html/about.html
The background image is covered by the div below and the div in the bottom is not displayed.
Thanks in advance!
I have a simple array with x number of items. I am displaying them individually via a link click... I want to update a number that say 1 of 10. when the next one is displayed i want it to display 2 of 10 etc...
I have looked all around and my brain is fried right now... I know its simple I just cant get it out.
<!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" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Page Title</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8"/>
<script type="text/javascript">
var quotations = new Array()
quotations[0]= "1"
quotations[1]= "2"
quotations[2]= "3"
quotations[3]= "4"
quotations[4]= "5"
quotations[5]= "6"
quotations[6]= "7"
numQuotes = quotations.length;
curQuote = 1;
function move( xflip ) {
curQuote = curQuote + xflip;
if (curQuote > numQuotes)
{ curQuote = 1 ; }
if (curQuote == 0)
{ curQuote = numQuotes ; }
document.getElementById('quotation').innerHTML=quotations[curQuote - 1];
}
var curPage = //this is where the current index should go
</script>
</head>
<body>
<div id="quotation">
<script type="text/javascript">document.write(quotations[0]);</script>
</div>
<div>
<p><a href="javascript();" onclick="move(-1)">GO back</a>
<script type="text/javascript">document.write(curPage + " of " + numQuotes)</script>
<a href="javascript();" onclick="move(1)">GO FORTH</a></p>
</div>
</body>
</html>
I am creating a downloadable zip file.
In that zip, I want to add php, html, and images and videos.
All of them are in other folders.
I can read and write php and html files from other files/folders.
But I don't know how to read and write (or move from one folder to anther folder) images and videos.
I will appreciate any help.
Thanks in advance.
Hi,
I have 2 scripts working ok separately but can't get them working together -
What I'm after is expanding menus where if the items exceed 10 a 'more' link appears that expands the list, which can also then be hidden.
http://www.brianfitzer.ie/test2/
expanding menu is file test12.html
toggle+limit:
toggle is file test13.html
(I have these working separately)
And then I need this to be able to be applied in multiple instances as I'll have multiple categories.
Any code help greatly appreciated! (i'm a jquery newbie so if you have full code that would be xtra handy)
This is the code I have set up to scan a directory of files:
Dim fileArray() As String
fileArray = Directory.GetFiles(System.AppDomain.CurrentDomain.BaseDirectory & "help\")
And it successfully gets all files in the directory, but it gets their absolute paths aswell. For example, one of the entries in fileArray() is:
F:\Project\Project\bin\x86\Debug\help\book_troubleshoot.html
And I want it to just be:
book_troubleshoot.html
Is there a way to do this without parsing through all the array entries to trim off the path?
Thanks.
Hi lads,
After obtaining the urls for various blogspots, tumblr and wordpress pages, I faced some problems processing the html pages. The thing is, i wish to distinguish between the content,title and date for each blog post. I might be able to get the date through regex, but there are so many custom scripts people are using now that the html classes and structure is so different.
Does anyone has a solution that may help?
I have a group of divs which I'm dynamically generating when a button is clicked with the class, "brick". This gives them dimension and starting position of top: 0. I'm trying to get them to animate to the bottom of the view using a css transition with a second class assignment which gives them a bottom position: 0;. Can't figure out the syntax for adding a second class to elements with a pre-existing class. On inspection they only show the original class of, "brick".
HTML
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="container">
<div id="button" >Click Me</div>
</div>
</body>
</html>
CSS
#container {
width: 100%;
height: 100vh;
padding: 10vmax;
}
#button {
position: fixed;
}
.brick {
position: relative;
top: 0;
height: 10vmax;
width: 20vmax;
background: white;
margin: 0;
padding: 0;
transition: all 1s;
}
.drop {
transition: all 1s;
bottom 0;
}
The offending JS:
var brickCount = function() {
var count = prompt("How many boxes you lookin' for?");
for(var i=0; i < count; i++) {
var newBrick = document.createElement("div");
newBrick.className="brick";
document.querySelector("#container")
.appendChild(newBrick);
}
};
var getBricks = function(){
document.getElementByClass("brick");
};
var changeColor = function(){
getBricks.style.backgroundColor =
'#'+Math.floor(Math.random()*16777215).toString(16);
};
var addDrop = function() {
getBricks.brick = "getBricks.brick" + " drop";
};
var multiple = function() {
brickCount();
getBricks();
changeColor();
addDrop();
};
document.getElementById("button").onclick = function() {multiple();};
Thanks!
I have a middleware that does some processing. On certain conditions it raises an exception and the user sees my 500.html template - correctly responding to 500 http status.
Now, on some exceptions I would like to render different template than default 500.html. Is it possible/how to achieve that?
Hi Everyone,
I'm using JqueryUI for drag and drop on one of my pages and for some reason I can't seem to get an attribute of the ui.draggable object being passed into my droppable drop event.
ui.draggable.attr("src") and $(ui.draggable).attr("src") both return undefined, however if I type ui.draggable.html() I will get the html back. Any ideas?
var html = "<div>"+title+"<br/>";
document.write(title.replace(/ /g,"-"));
html+= '<p><a href="go.aspx?title=' + title + '">Details<\/a></p></div>';
hi all,i want to replace title space with dash
according to http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/clopts.html it should be possible to enable -XX:+HeapDumpOnOutOfMemoryError using JConsole in runtime. How?
I assume its somewhere under MBeans tab and the com.sun.management - HotSpotDiagnostic - Operations - setVMOptions ?
I'm looking for a simple way to forget that I'm using a WebView to have justified text in my TextView. Has someone made a custom view for this? I'm well aware that I can do something like this:
WebView view = new WebView(this);
view.loadData("my html with text justification","text/html","utf-8");
But it gets ugly when you want to set the size, the color or other common properties of the TextView, there must be a more convenient way of doing it.
i am extracting file names of html files using line:
filename = File.basename(input_filename, ".*")
which currently prints full file name excluding .html extension
All files are stored in the form of http^x.x.edu^1^2 all file names begin with http^ and contain edu^ what i want is to extract 2 (which changes) but it is always the second element after .edu I have attempted destructive gsub! but i m weak with regular expressions.
Chrome appends an stylesheet and it make a lot of problems for me. for example this selector
html>body, html>body * {background-color:#ffffff !important}
is one oe the things I can't override in my own styles. Anyone has a solution for that?
My question is, I have installed the SEO component successfully, and its working well but;
On homepage, the Latest Products module shows the url like
http://www.domain.com/product-21.html
On category page, the product shows the url like
http://www.domain.com/category/product-21.html
I want to put the category URL in the latest products module so it will be the same as on category page. Does anybody have any ideas about this?
It is aligned in Chrome and Firefox but in IE7 it looks like this:
http://ada.kiexpro.com/html/list.html
(I already fixed the z-index issue I just want to align the list vertically.