I have a tooltip that has a link to an anchor but it seems like it is not going to the right anchor. Rollover the person and click on the "[+]" inside the tooltip.
To view the sample click here
Hi,
I'm trying to create an infinite scroll component.
I'm using this site as a tutorial, but it seems that I can only get the infinite scroll on one way, because when I add elements to the leftmost side, the scrollLeft property auto-adjusts thus the page gets a quirky scroll, jumping instead of making a smooth movement.
Is there any way of achieving infinite scroll both-ways? I don't plan to use scrolling buttons, just mouse drag for moving the scroll view.
Hello...I am new to PHP (never really used it before tonight) and I need to use a PHP script to read the contents of a file on my website (http://kylemills.net/Geocaching/BadgeGen/MacroFiles/BadgeGenBeta.gsk) and then take some specific varying data and output it.
For example: If my file contains the text:
random text
Here is some text
#There is some text here too
$Version = "V2.2.23 Beta"
random text
#some more text
$Text="some text"
If the above was the contents of my file, I need the script to return "V2.2.23 Beta" (without quotes). The idea is that as I update the file, the version changes and I want this to be reflected across my site.
I am sorry if I don't make any sense...any help would be appreciated :)
-Thanks so much,
Kyle
TLDR: Want to check if cookie exists, if it doesn't create it.
Am using jquery1.4.2 and jquery cookie,
I know this is probably very simple but I just cant get my head right at the moment.
I want to:
Check to see if a cookie with name of "query" exists
If so nothing.
If not create a cookie "query" with a value of 1.
But only if it doesn't already exist.
Thanks in advance
Say I have 2 divs side by side: 1 float left, and the other float right. Now say I fix the size of the left floating div to say 200px. How do I force the right floating div to "maximize" itself or occupy the rest of the horizontal screen space (regardless of the size of the browser window?
I have a simple form that generates a new photo gallery, sending the title and a description to MySQL and redirecting the user to a page where they can upload photos.
Everything worked fine until the ampersand entered the equation. The information is sent from a jQuery modal dialog to a PHP page which then submits the entry to the database. After Ajax completes successfully, the user is sent to the upload page with a GET URL to tell the page what album it is uploading to --
$.ajax ({
type: "POST",
url: "../../includes/forms/add_gallery.php",
data: $("#addGallery form").serialize(),
success: function() {
$("#addGallery").dialog('close');
window.location.href = 'display_album.php?album=' + title;
}
});
If the title has an ampersand, the Title field on the upload page does not display properly. Is there a way to escape ampersand for GET?
Thanks
I seem to have somehow messed up when wordpress calls the post class. I looked in "Main Index Template" but that just says "<div <?php post_class() ?> id="post-<?php the_ID(); ?>">" So I don't know what to do.
I use firebug to check colors on webpages, but sometimes the color is from an image. Is there a firefox plugin like firebug that can act as a color sampler this way?
I've found several tutorials online about implementing file drag/drop with Firefox 3.6 (they involve using a FileReader object to get the file binary data). However, I cannot create a FileReader object in Chrome on Windows or Mac.
Does anyone know what the API is to read and manipulate data from a drag-and-dropped file in Chrome? If I can get the binary data of the file, I already have the rest of the code to perform the upload.
Note: I've also tried using the getAsBinary() function call on the file object of the drag event (event.dataTransfer.file) but I believe that is a Mozilla-specific function and not implemented in Chrome.
Also, I'm not interested in a solution using google gears or one that requires a user to select files from a dialog. I'm specifically trying to implement a drag-and-drop file upload.
Given a div of arbitrary aspect ratio, what's the best way to place and style an image (also with an arbitrary aspect ratio) inside such that:
It is both inscribed and centered
Its dimensions and position are set using relative values so that the image will remain inscribed and centered automatically when the frame is uniformly scaled (javascript should only be required when the image is initially inserted, or if the frame's aspect ratio changes)
Extra markup is minimized
Here's the result we want:
Here's a fiddle template, which is just:
Markup
Should pillarbox
<div class="frame">
<img src="http://www.placekitten.com/200/300" />
</div>
Should letterbox
<div class="frame">
<img src="http://www.placekitten.com/300/200" />
</div>
CSS
.frame {
width: 200px;
height: 200px;
border: 2px solid black;
margin: 10px 0px 100px 0;
}
I have this form with a button that allows you to add fields to the form.
<form id="contact" name="contactForm" action="newPoll.php" method="post">
<fieldset>
<legend>Create A Poll</legend><br style="clear:both;">
<ol>
<li><lable for=pollTitle>Poll Title:</lable><input name="pollTitle" id="pollTitle" type="text" size="66" /> </li>
<li><lable for=question>1st Question:</lable><input name="question" id="question" type="text" size="66" /> </li>
<li><lable for=answerType>Constrained:</lable><input name="answerType" id="answerType" value="Constrained" type="radio" size="66" /><span style="margin: 0 0 0 40px;">
Unconstrained: <input style="margin-right: 30px;" name="answerType" value="Unconstrained" id="question" type="radio" size="66" /></span>(Allow multiple answers) </li>
<li><lable for=answer1>Answer:</lable><input name="answer1" id="answer1" type="text" size="66" /> </li>
<li><lable for=answer2>Answer:</lable><input name="answer2" id="answer2" type="text" size="66" /> </li>
<li><lable for=answer3>Answer:</lable><input name="answer3" id="answer3" type="text" size="66" /> </li>
<li><lable for=answer4>Answer:</lable><input name="answer4" id="answer4" type="text" size="66" /> </li>
</ol><br />
</fieldset>
<input type="button" value="Add More Answers" name="addAnswer" onClick="generateRow()" /><input type="submit" name="submit" value="Add Another Question">
</form>
And here is generateRow():
var count = 5;
function generateRow() {
var d=document.getElementById("contact");
var b = document.getElementById("answer4");
var c =b.name.charAt(0);
var f = b.name.substr(0, 6);
var y = f + count;
count = count + 1;
d.innerHTML+='<li><lable for=' + y + '>Answer:</lable><input name="' + y + '" id="' + y + '" type="text" size="66"/> </li>';
}
The issue is whenever a new row is added, it erases any input that may have been typed in any of the un-original (added) text fields. It should leave the data in form elements
I'm writing an iPhone app with a UIWebView which should display various html files I have in the app resource folder. In xcode my project overview, these html files are displayed like this:
dirA
|---> index.html
|---> a1.html
|---> a2.html
|---> my.css
|---> dirB
|---> b1.html
|---> b2.html
|---> dirC
|---> c1.html
|---> c2.html
These resources where added to the project as such:
- Checked "Copy items into destination groups folder (if needed)".
- Reference type: Default.
- Text encoding: Unicode (utf-8).
- Recursively create groups for any added folders.
The links in my html are relative, meaning they look like this:
<a href="a1.html">a2</a>
<a href="a2.html">a2</a>
<a href="dirB/b2.html">b2</a>
<a href="dirC/c1.html">b2</a>
In order to display the index.html when the app starts up, I use the following code:
NSString *path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
This works fine. Following links from the index file also works fine, as long as the html files requested are directly under dirA. If the link followed points to a file in a sub-directory, then didFailLoadWithError will catch the situation and report that the requested file does not exist.
Note that
[webView loadHtmlString:myHtml];
cannot be part of the solution, as I need back and forward buttons to work in my web view.
So the question is: How can I follow a relative link to an html file in a sub directory within my resources?
I've been all over stackoverflow and the rest of the tubes for the past few days trying to figure this one out, but nowhere have I come across the solution to this exact problem. Any insight at all would be very, very much appreciated!
Hi,
Me website contains drop down menus at the top right corner. Dropdwon is displayed fine but when I hover over elements of drop down then IE is causing issue on rendering them on the other hand Firefox is displaying the way i want. website is http://www.textsensor.com/test. Can anybody tell me what is causing IE issue on its menu.
Here is the details. Each parent at top has child div which contains child elements in a ul. I am displaying them inline with width of div container fixed so that two of them are being displayed in one line. Each child li contains two images and an anchor in between. These two images are providing rounded corners whereas anchor contains span which contains text of sub-menu item. On mouseover on span I am showing its parent anchor sibling images through javascript and also setting its bg-image to white. Images are not aligned correctly and span tag got down about 10px from top on IE only. Javascript is listed below
$("#jsddm li ul li a span").hover(function(){
$(this).parent().siblings("img").show();
$(this).parent().css("border-bottom", "#a00 5px double");
}, function(){
$(this).parent().siblings("img").hide();
$(this).parent().css("border-bottom", "none");
});
Cheers
Ayaz Alavi
Hi, I have a problem when I try to center the div block "products" because I don't know in advance the div width. Anybody have a solution?
Update: The problem I have is I don't know how many products I'll display, I can have 1, 2 or 3 products, I can center them if it was a fixed number as I'd know the width of the parent div, I just don't know how to do it when the content is dynamic.
<style>
.product_container {
text-align: center;
height: 150px;
}
.products {
height: 140px;
text-align: center;
margin: 0 auto;
clear: ccc both;
}
.price {
margin: 6px 2px;
width: 137px;
color: #666;
font-size: 14pt;
font-style: normal;
border: 1px solid #CCC;
background-color: #EFEFEF;
}
</style>
<div class="product_container">
<div class="products" id="products">
<div id="product_15">
<img src="/images/ecommerce/card_default.png">
<div class="price">R$ 0,01</div>
</div>
<div id="product_15">
<img src="/images/ecommerce/card_default.png">
<div class="price">R$ 0,01</div>
</div>
<div id="product_15">
<img src="/images/ecommerce/card_default.png">
<div class="price">R$ 0,01</div>
</div>
</div>
</div>
I'm trying to create the primary navigation menu for a website that will have a variable amount of primary menu items. The navigation bar is horizontal and has a width of 738px. I would like to have the leftmost item 18px from the left and the rightmost item 18px from the right edge of the element, with the other menu items spread evenly between them. I'm using a tableless layout.
So far I haven't been able to make it work exactly like I want. Setting margin: auto doesn't seem to help, and I can't keep the 18px margin on both sides using a table. One idea was to use text-align: justify but it doesn't justify single lines.
Is there a simple or less simple way of doing this, or am I going to have to ask the AD to relax his visual requirements?
Hi,
I have tried a few things to solve this problem but I can't seem to get it working.
The problem is that I have 2 columns as the main part of my website, right and left. On some pages, there is a lot of text in the left column, therefore it is very long, the problem is that the right column doesn't elongate with the left column.
Both columns have the same background colour and a footer s displayed across the width of both columns after the columns finish.
My first thought was to put both columns inside a div which would have the same background colour as them and therefore if the left column became 1500px long in total and the right column stayed at around 600px (due to the elements inside it) then this wouldn't show as the new, outer div would elongate along with the left column. But for some reason this didn't work. Could it be because the columns are floated?
Does anyone have any other ideas?
Here is the website (Obviously not finished yet): Beansheaf Hotel
I have chosen a page where there is a lot of text in the left column so the problem is apparent.
Thanks in advance,
InfinitiFizz
I am using jquery ui tabs, which requires the tabs to be <li> elements, by default at least.
I only need 2 tabs, but I am not able to size them so that they are both equal and take up 100% of available width of the ul.
here is my code.
<div id="intro_tabs" class="tabs">
<ul id="intro_nav">
<li>
<h3><a href ="#tabs-1" class="null_link"><%= t('home.index.what_is_it') %></a></h3>
</li>
<li>
<h3><a href ="#tabs-2" class="null_link"><%= t('home.index.how_works') %></a></h3>
</li>
</ul>
<div id="tabs-1">
<%= simple_format t 'home.index.what_intro_details' %>
</div>
<div id="tabs-2">
<div id="intro_accordion">
<h3><a href="#">Users</a></h3>
<div>
<%= t 'home.index.how_intro_details_user' %>
</div>
<h3><a href="#">Merchants</a></h3>
<div>
<%= t 'home.index.how_intro_details_merchant' %>
</div>
</div>
</div>
</div>
I have tried using css property width:50%, on both li's but it doesn't work.
Thanks
I have a span element as follows: <span id="download">Download</span>. This element is controlled by a few radio buttons. Basically, what I want to do is have 1 button to download the item selected by the radio buttons, but am looking to make it a little more "flashy" by changing the text inside the <span> to say more specifically what they are downloading. The span is the downloading button, and I have it animated so that the span calls slideUp(), then should change the text, then return by slideDown().Here is the code I am using that does not want to work.
$("input[name=method]").change(function() {
if($("input[name=method]").val() == 'installer') {
$('#download').slideUp(500);
$('#download').removeClass("downloadRequest").removeClass("styling").css({"cursor":"default"});
$('#download').text("Download");
$('#download').addClass("downloadRequest").addClass("styling").css({"cursor":"pointer"});
$('#download').slideDown(500);
}
else if($("input[name=method]").val() == 'url') {
$('#download').slideUp(500);
$('#download').removeClass("downloadRequest").removeClass("styling").css({"cursor":"default"});
$('#download').text("Download From Vendor Website");
$('#download').addClass("styling").addClass("downloadRequest").css({"cursor":"pointer"});
$('#download').slideDown(500);
}
});
I changed the code a bit to be more readable so I know that it doesn't have the short code that jQuery so eloquently allows. Everything in the code works, with the exception of the changing of the text inside the span. I'm sure its a simple solution that I am just overlooking.
Any help is appreciated,
Eric R.
How to align the the button in center of div in IE8. Works fine in IE7 but not in IE8
<div id="dPopupFooter" style="background-color: #d9d9d9; position: absolute; z-index: 5;
bottom: 0px; width: 100%; height: 30px; border-top: solid 1px #acacac; text-align: center; padding-top: 3px;">
<table><tr><td><xrx:CustomButton id="btnClose" runat="server" OnClientClick="ClosePopup();" /></td></tr></table>
</div>
Hey,
I have an input text :
<input name="Email" type="text" id="Email" value="[email protected]" />
I want to put a default value like "What's your programming question ? be specific." in StackOverFlow, and when the user click on it the default value disapear.
Hi All,
I need to change the locale/language of the browse button in input type="file"
We have a special function to change the locale of any text to the browser language such as en-US es-MX etc.
Say
changeLang("Test"); // This will display test in Spanish if the browser
// locale is es-MX
What I need to do is to change the language of the browse button.
Since it is not displayed, I can't code it like
changeLang("Browse...");
That's why I need to get the code of this input type and override so that I can apply my function to Browse text.
It will be appreciated if you can give a solution for this.
Thanks!
Jay...
i just started with android and i'm working on a simple app that should download contents of a html file. I'm using AsyncTask as suggested, but i'm encountering one problem. In the following code (i followed a tutorial code), i get tv cannot be resolved for the onPostExecute method. How to access the downloaded file? Thank You:
public class FlashResults extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
setContentView(tv);
readWebpage(tv);
}
protected class DownloadPage extends AsyncTask<String, Void, String> {
protected String doInBackground(String... urls) {
String responseStr = null;
try {
for (String url : urls) {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet get = new HttpGet(url);
HttpResponse httpResponse = httpClient.execute(get);
HttpEntity httpEntity = httpResponse.getEntity();
responseStr = EntityUtils.toString(httpEntity);
}
} catch (UnsupportedEncodingException e) {
} catch (ClientProtocolException e) {
} catch (IOException e) {
}
return responseStr;
}
protected void onPostExecute(String result) {
tv.setText(result);
}
}
public void readWebpage(View v) {
DownloadPage task = new DownloadPage();
task.execute(new String[] { "http://seznam.cz" });
}
}
Here is the site mock-up I'm working on for my job: http://dev.arm.gov/~noensie/dqhands/cgi-bin/explorer. I'm still a novice in web developing and I need help with placing form values in a list item to pass on to another page.
I'd rather not go in great detail the purpose of this website, but in terms of its basic use, select the parameters in the middle column for a request and add it to the list on the right column by pressing on "add request" button when it appears. After the list have been populated, a user would submit the selected requests, which will direct them to another page based on the requests selected (or added to the list, same thing).
That last sentence is where I'm having a problem. Right now, each of request in the list in the right column are <li> elements and I assign them attribute values that needed to be passed on to the next page. I tried inserting a hidden input with same values, but I'm still not sure how to utilize that; I'm not even sure using the hidden input is the correct way.
Also the "submit request" button is located outside the <form> block. I was going to utilize javascript and jQuery to enable the button to serialize the values in the <form> block, but I don't know quite how to do that.
Go ahead and take a look at my javascript code (index.js) and slay me, or, I mean, my code. It's still pretty elementary and short (~260 lines, that's short right?). I will take any help for this problem (as the matter of fact, if you see any other problems or a better way of implementation of something, go ahead and mention that too); tips, advice, code samples, or whatever else you can contribute, it will be greatly appreciated.
Tri
For smarty's html_options function, is there a way to avoid having to do this (other than not using smarty that is)?
{if $smarty.post}
{html_options name=option_1 optins=$options selected=$smarty.post.option_1}
{else}
{html_options name=option_1 optins=$options}
{/if}
I realize that it won't show up in the template, but it seems like a bad practice to leave something that is not defined in the template (it also fills up my error logs with noise about undefined indexes).