Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
|---|---|---|---|---|---|
3,253,135
| 3,253,136
|
Php and Javascript connection
|
<p>I'm very interested in if it is possible to connect javascript variables to php. I know that in php we can write javascript code, but on the contrary we could not. To express my aim better , lets bring example like that: </p>
<pre><code><form name="some" action="<?php $_SERVER['php_self']; ?>" method="post">
<input type="submit" name="but" value="Action">
</form>
</code></pre>
<p>My question is how to make after pressing submit button to confirm (alert) with javascript and if it is confirmed do something (with php) and if isn't cancel (php operation).</p>
|
php javascript
|
[2, 3]
|
2,979,468
| 2,979,469
|
Link button control using asp.net
|
<p>I have set of link buttons in my masterpage and one button in my content page.
i want when i click the any one of link button in the masterpage the value in the content page will change. How i can do this. Can any one able to help me because i am new in asp.net
Thank you </p>
|
c# asp.net
|
[0, 9]
|
2,237,389
| 2,237,390
|
An array is undefined in javascript
|
<p>I am actually trying to retrieve something for a sqlite database and store the results in an array. So I create an array and pass it as an argument to the function. Then after the function returns, the array remains undefined. What is the problem with that?</p>
<pre><code>function initGraphView()
{
var resultsArray=new Array(12);
getGraphData(defaultQueryString,resultsArray);
alert(resultsArray[0]); //undefined
}
</code></pre>
<pre>
getGraphData=function(queryString,resultsArray)
{
dbConnection.transaction(function(tx){
tx.executeSql(queryString, [],
function(SQLTransaction, data)
{
for(var i=0;i</pre>
|
javascript jquery
|
[3, 5]
|
1,787,222
| 1,787,223
|
ASP.NET proxy to access protected resources (other webapps)
|
<p>I am running an ASP.NET based CMS/portal site using mojoPortal (www.mojoportal.com, open source). Users log in and access content based on their group/role. Now I would like to add a different web application (a wiki, MediaWiki based for ease of maintenance, but essentially any other web application or site) that should only be accessible to certain roles within mojo.</p>
<p>A possible solution I figured out would be to hide the wiki completely from direct external access and proxy the requests through mojo, such that they are only accessible for the desired groups.</p>
<p>Having found this question: <a href="http://stackoverflow.com/questions/11460/asp-net-proxy-application">aspnet-proxy-application</a>, I am unsure whether a general proxy will do in this case. Is this the way to go or are there any easier solutions? I'd appreciate any thoughts or reading resources on how to implement this scenario. Thanks!</p>
|
c# asp.net
|
[0, 9]
|
5,574,761
| 5,574,762
|
JavaScript Resizing not initalizing on page load
|
<p>Below is my JavaScript cod and I am having an issue that I hope someone can help me with. The function columnConform does not fire and resize the divs until I resize the actual browser window. So the function is working but just doesn't happen until I trigger the window resize event handler. What can I do to make the function fire when all the page content and the DOM is loaded? Thanks in advance!</p>
<pre><code>$(document).ready(function() {
$(function(){
jumboSlide();
columnConform();
});
function jumboSlide() {
$('#jumboSlide').carousel()
}
function resetHeight() {
$('.row-equal > div').css("min-height", 0);
}
var currentTallest = 0,
currentRowStart = 0,
rowDivs = new Array();
function setConformingHeight(element, newHeight) {
element.css("min-height", newHeight);
}
function getOriginalHeight(element) {
return (element.data("originalHeight") == undefined) ? (element.outerHeight()) : (element.data("originalHeight"));
}
function columnConform() {
$('.row-equal > div').each(function() {
var $element = $(this);
var topPosition = $element.position().top;
if (currentRowStart != topPosition) {
for(currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) setConformingHeight(rowDivs[currentDiv], currentTallest);
rowDivs.length = 0;
currentRowStart = topPosition;
currentTallest = getOriginalHeight($element);
rowDivs.push($element);
} else {
rowDivs.push($element);
currentTallest = (currentTallest < getOriginalHeight($element)) ? (getOriginalHeight($element)) : (currentTallest);
}
for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) setConformingHeight(rowDivs[currentDiv], currentTallest);
});
}
$(window).resize(function(){
resetHeight();
columnConform();
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,649,680
| 4,649,681
|
Error using Jquery datepicker in ASP.Net
|
<p>I am trying to use the jquery datepicker in my asp.net solution but receive the following error:</p>
<p>Microsoft JScript runtime error: Object doesn't support property or method 'datepick'</p>
<p>I have the following markup in the head section of the site.master file:</p>
<pre><code> <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="scripts/jquery.datepick.js"></script>
<script type="text/javascript">
$(function () {
$('#startdate').datepick({ dateFormat: 'mm/dd/yyyy' });
$('#enddate').datepick({ dateFormat: 'mm/dd/yyyy' });
});
</script>
</code></pre>
<p>And the following markup within a CheckProgress.aspx page:</p>
<pre><code> <div id="content">
From
<asp:TextBox ID="startdate" class="field" runat="server" ClientIDMode="Static"></asp:TextBox>
To
<asp:TextBox ID="enddate" class="field" runat="server" ClientIDMode="Static"></asp:TextBox>
</div>
</code></pre>
<p>I tried loads of different things - putting the script tags inline with the div itself and moving the textboxes to different pages, but I end up getting the same error. I have checked that the jquery code paths are correct and also tried using the jquery files in a brand new asp.net solution where it works without error!</p>
<p>Any ideas how to debug this or determine what is happening here?</p>
|
jquery asp.net
|
[5, 9]
|
1,720,160
| 1,720,161
|
How to return the order that an item appears in a list in jQuery?
|
<p>I am trying to find out how to find the position that an item appears in a list. For example:</p>
<pre><code><ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
</code></pre>
<p>If I clicked on item 2, I would want to receive '2'. Is this possible?</p>
|
javascript jquery
|
[3, 5]
|
5,431,727
| 5,431,728
|
photogallery in ASP.NET window application/forms
|
<p>I have no experience in ASP.NET apps. I want to build photogallery in my ASP.NET windows app such that in one pane I can view thumbnails of images and when I click on any image i can view larger priview of that image on right hand side.</p>
<p>I am using ASP.NET c# to build this windows application.</p>
<p>I know I could do this easily in jquery or javascript in web app, but I have no idea how I can do this in ASP.NET windows app. </p>
<p>If I display thumbnails in gridview, how can I display larger preview on right hand side on click of thumbnail? Or If there is any better way to do this? Any new ideas or suggetions are welcomed..</p>
<p>I have done google for this but probably i dont know right keywords or there is very less information available for this.</p>
|
c# asp.net
|
[0, 9]
|
486,836
| 486,837
|
Address family not supported by protocol exception
|
<p>I'm trying to send a couple of values from an android application to a web service which I've setup. I'm using Http Post to send them but when I run the application I get the error- request time failed java.net.SocketException: Address family not supported by protocol.</p>
<p>I get this while debugging with both the emulator as well as a device connected by wifi. I've already added the internet permission using:</p>
<pre><code><uses-permission android:name="android.permission.INTERNET" />
</code></pre>
<p>This is the code i'm using to send the values</p>
<pre><code> void insertData(String name, String number) throws Exception {
String url = "http://192.168.0.12:8000/testapp/default/call/run/insertdbdata/";
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(url);
try {
List<NameValuePair> params = new ArrayList<NameValuePair>(2);
params.add(new BasicNameValuePair("a", name));
params.add(new BasicNameValuePair("b", number));
post.setEntity(new UrlEncodedFormEntity(params));
HttpResponse response = client.execute(post);
}catch(Exception e){
e.printStackTrace();
}
</code></pre>
<p>Also I know that my web service work fine because when I send the values from an html page it works fine -</p>
<p>
</p>
<p></p>
<pre><code><form name="form1" action="http://192.168.0.12:8000/testapp/default/call/run/insertdbdata/" method="post">
<input type="text" name="a"/>
<input type="text" name="b"/>
<input type="submit"/>
</code></pre>
<p>
</p>
<p>I've seen questions of similar problems but haven't really found a solution.</p>
<p>Thanks</p>
|
java android
|
[1, 4]
|
5,799,827
| 5,799,828
|
Modal Windows using jQuery
|
<p>I'm working on a web app where in I need to add some values inputted by the user.</p>
<p>When the user clicks on the Add button he sees a form and these values then show up on the page. Now to implement this I can do two things</p>
<ol>
<li>Use a modal window</li>
<li>Make a form inside the page itself(in a div) and toggle its visibility by the Add button.</li>
</ol>
<p>If I go with the former solution is it necessary to use Ajax or I can add elements on the main page directly itself? Are there any jQuery plugins to accomplish the same?</p>
|
javascript jquery
|
[3, 5]
|
678,692
| 678,693
|
add/remove class at same time in java script (php module)
|
<p>i am developing a module in PHP and i need to add/remove class at the same time using event onclick in javascript.
Please suggest.</p>
<p>Below is the code but it is not working,</p>
<pre><code>jQuery("#cat-block-id").show();
//jQuery("#product-block-id").hide();
jQuery(".fme_layered_attribute").click(function() {
jQuery("#product-block-id").show();
//jQuery("#cat-block-id").show();
})
</code></pre>
<p>Thanks,</p>
|
php javascript
|
[2, 3]
|
761,643
| 761,644
|
What's the best way to assemble Javascript modules server-side in Python?
|
<p>I'm planning an extensible web app where base objects are extended by JavaScript modules which plug in. Each JavaScript object may just be an independent bit of code, or I might be building a large object to simulate a module namespace. I'll be using a Django back-end and Backbone.js, since you asked.</p>
<p>The system should be easily modular, so adding a new module should be a question of just dropping in another file or database row or whatever. The person installing the module shouldn't have to edit a large JavaScript file manually (or run a special script, in an ideal world).</p>
<p>I have two options: just serve each JS file separately or get the server to assemble them. The first option will get ungainly when a large number of plugins is reached. </p>
<p>I'm looking into the best way to implement the second option: assembling a JavaScript file from a lot of small JavaScript snippets. I could just do some blind string concatenation, but there may be a Python library that can do this and take account of problems I haven't foreseen.</p>
|
javascript python
|
[3, 7]
|
4,202,397
| 4,202,398
|
how to get phone number from my Contacts on android programing
|
<p>i have EditText and button on my form.</p>
<p>how to do this: </p>
<p>when i press the button i want to open all my Contacts,</p>
<p>and when i pick one - i what that his phone number will be in the EditText</p>
<p>thanks in advance</p>
|
java android
|
[1, 4]
|
1,748,155
| 1,748,156
|
Mysterious problem on showing the jQuery datepicker in my form
|
<p>I am trying to add the jQuery Date Picker into my form, however I am having a problem on showing it. This is what I am using <a href="http://jqueryui.com/demos/datepicker/default.html" rel="nofollow">http://jqueryui.com/demos/datepicker/default.html</a> and below is my code structure. For a reason when I click into the textbox, the calendar is not showing.</p>
<p>In header.php there is the jQuery script that I use for several purposes (tested and working) like fancybox and a loading page based on the value of a drop down list.</p>
<p>In single.php I include the main.php that loads a page based on the value of a drop down list (Working), in my case testpage.php that is a jQuery datepicker script that popups when you click on the textbox. But as I said, is not showing up and I don't know why. </p>
<p>Thank you for your solutions.</p>
<p>header.php</p>
<pre><code><script src="http://jqueryui.com/jquery-1.5.1.js"></script>
</code></pre>
<p>single.php</p>
<pre><code><?php include('main.php'); ?>
</code></pre>
<p>main.php</p>
<pre><code><link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
<script src="http://jqueryui.com/ui/jquery.ui.core.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.datepicker.js"></script>
<form>
<select id="termid" class="selectfield">
<option>Choose</option>
<option value="testpage">Test Page</option>
</select>
<div id="reservationdetails" ></div>
</form>
</code></pre>
|
php jquery
|
[2, 5]
|
2,441,316
| 2,441,317
|
what is wrong with this snippet
|
<pre><code><?php } elseif($_SOMETHING == 1 && $_ANOTHER_THING == 2) { ?>
<?php $_NAME = urlencode($_NAME); ?>
<?php $_MGT_NAME = urlencode($_MGT_NAME); ?>
</div>
<?php } ?>
</code></pre>
<p>I am getting this error expected ';'</p>
|
php javascript
|
[2, 3]
|
5,338,734
| 5,338,735
|
DIsplaying DataSet in Editable format?
|
<p>assume I have a single row datatable with collums of diffrent type</p>
<p>I want to bind them to a contorl that will allow the user to easily edit the data, winform style for example if data is of type <code>datetime</code> it will diplay a <code>datepicker</code>. <code>boolean</code> will be displayed as <code>checkbox</code>, <code>free string</code> as <code>textbox</code> and so on..
and if data is constrained to forgien key it will idplay combobox and so on. is there a ready contorl that provies this functionality?</p>
<p>I cannot afford to pay for a control. third party free one would be awesome.</p>
|
c# asp.net
|
[0, 9]
|
2,226,694
| 2,226,695
|
set session timeout after inactivity
|
<p>I want to redirect back to the home page when there is no activity.
However, i dont have a user login or the need to have one. However, i want to be able to redirect back to the home page when theres no activity.</p>
<p>I set this in the web.conf</p>
<pre><code><system.web>
<sessionState mode="InProc" timeout="2">
</code></pre>
<p>then, i set this in the homepage</p>
<pre><code>Session["UserId"] = 1;
</code></pre>
<p>I also tried this but the function doesnt even fire.</p>
<pre><code>protected void Page_Init(object sender, EventArgs e)
{
CheckSession();
}
private void CheckSession()
{
if (Session["UserId"] == null)
{
Response.Redirect("KioskHome.aspx");
}
}
</code></pre>
<p>Could i use the global.asax file?</p>
<pre><code>void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
}
void Session_End(object sender, EventArgs e)
{
}
</code></pre>
<p>What is the simple solution? Thank you</p>
|
c# asp.net
|
[0, 9]
|
2,303,999
| 2,304,000
|
Is there a JQuery API for assigning the month name based on the number.?
|
<p>Am working on SharePoint List, fetching the date from the list, which is generally in this format : 2013-03-25.</p>
<p>I have split the date and assigned to an variable.</p>
<p>Code.</p>
<pre><code>var splitDate = resultRegionArr[x].NewsDate.split("-");
</code></pre>
<p>Now, i want to know if there is any Jquery API which returns me the string "March" on input of value "03" or splitDate[1].</p>
<p>Thanks in advance.</p>
|
javascript jquery
|
[3, 5]
|
117,104
| 117,105
|
UPDATE STATEMENT in asp.net using c#
|
<p><P>i am using asp.net with C# as code behind
<Pre><code>
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Documents and Settings\CJP\My Documents\Visual Studio 2005\WebSites\NewElligibleSoft\elligiblity.mdb;Persist Security Info=False");
cn.Open();
string sql = "UPDATE main SET s_name='"+TextBox1.Text+"',inst_code='"+DropDownList1.SelectedItem+"',ms_oms='"+Label7.Text+"',elligiblity='"+Label12.Text+"',Board='"+DropDownList5.SelectedItem+"',percentage='"+TextBox4.Text+"' WHERE elg_id = '"+DropDownList4.SelectedItem+"'";
OleDbCommand cmd = new OleDbCommand(sql, cn);
cmd.ExecuteNonQuery();
cmd.Dispose();
cn.Close();
Response.Write("alert('DATA UPDATED')");
</pre></code>
<p> i am getting error on </p>
<pre><code>cmd.ExecuteNonQuery();</code></pre>
<p>that Data type mismatch in criteria expression.</p>
|
c# asp.net
|
[0, 9]
|
76,382
| 76,383
|
Show tooltip only on the datapoint for line graph in MSCHART
|
<p>I am using mschart in C#4.0 to generate line chart and I am createing DataPoint to show the tooltip on points but the probelm is, tool tip is coming on each point of line however, I want only on my datapoint.</p>
|
c# asp.net
|
[0, 9]
|
3,886,028
| 3,886,029
|
window.outerWidth VS $(window).outerWidth()
|
<p>I'm just curious as to what the difference between <code>window.outerWidth</code> and <code>$(window).outerWidth()</code> is, if any.</p>
<p>I couldn't really find much info about this on Google, so I thought I'd appeal to the masses. This is just a general question, not a specific issue.</p>
|
javascript jquery
|
[3, 5]
|
3,632,286
| 3,632,287
|
Where will be a file created in android if I do it like this
|
<p>This function creates a file but I can't figure out where is the file created and if someone has a solution to create a file in a particular directory from the external storage is very welcomed :) thanks a lot </p>
<pre><code>private void writeFileToInternalStorage() {
String eol = System.getProperty("line.separator");
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new OutputStreamWriter(openFileOutput("myfile", MODE_WORLD_WRITEABLE)));
writer.write("This is a test1." + eol);
writer.write("This is a test2." + eol);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (writer != null) {
try {
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
</code></pre>
|
java android
|
[1, 4]
|
4,776,061
| 4,776,062
|
Javascript str.search("?") returns Unexpected Quantifier error
|
<p>I am able to search a string using <code>str.search("me");</code> and <code>str.search("=");</code></p>
<p>But when i serach for <code>str.search("?");</code></p>
<p>I get the error <code>Unexpected Quantifier.</code></p>
<p>Why is that?
How can i search for <code>"?"</code> using something other than a regular expression?</p>
|
javascript jquery
|
[3, 5]
|
5,427,861
| 5,427,862
|
How to programmatically create a <script> tag and a script inside an ASP.NET page?
|
<p>From time to time I run into situation in which I could solve a given problem by dynamicly creating piece of JavaScript, spesific to that instance of the page, that I could then insert in the final markup. Usualy this is because I want some behaviour to happen on the client side, rather than on the server side and creating a static JavaScript isn't an option.<br />
For example, when <a href="http://stackoverflow.com/questions/625524/how-to-submit-a-files-original-path-and-filename-without-submitting-the-file-its">trying to submit a files original path without submitting the file itself</a>, when trying to do it for multiple dynamicly created components.</p>
<p>How would you recommend me to create a <code>script</code> tag and populate it with, for example, JavaScript?</p>
|
asp.net javascript
|
[9, 3]
|
42,360
| 42,361
|
Can jQuery ready() function be used twice for the same element?
|
<p>I want to use jQuery <code>ready()</code> function for the document element. Here are my scripts:</p>
<p><em>1st page:</em></p>
<pre><code>$(document).ready(function(){
$('form#haberekle').ajaxForm(options);
});
</code></pre>
<p><em>2nd page:</em></p>
<pre><code> $(document).ready(function() {
var options = {
success:showResponse,
beforeSubmit:showRequest,
resetForm:true
};
$('#haberresmiekleform').ajaxForm(options);
});
</code></pre>
<p>These two pages are included in the same main page with <code><!--#include file=""--></code></p>
<p>Can these two functions work properly, or they block each other?
According to my experience they seem work properly.</p>
<p>For example: an <code>onclick</code> function of a button is only one.</p>
|
javascript jquery
|
[3, 5]
|
4,732,410
| 4,732,411
|
ASP.NET C# - Source File Parse Error - Could not load inherits type file
|
<p>How do I fix this error? </p>
<p>I'm running .NET Framework v4.0.30319 so the Framework shouldn't be an issue. I'm not using any DLL files or bin directories. How do I setup the IIS/Virtual Directory if I'm using Forms Authentication for the whole website using VS2010? </p>
<p>Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. </p>
<pre>Parser Error Message: Could not load type
'ACAWebApplication.Pages.State_Carrier_Search'.</pre>
<pre><code>Source Error:
Line 1: <%@ Page Title="ACA Web App - State Carrier Search" Language="C#"
MasterPageFile="~/Pages/User.Master" AutoEventWireup="true"
CodeBehind="State_Carrier_Search.aspx.cs"
Inherits="ACAWebApplication.Pages.State_Carrier_Search" %>
Line 2: <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent"
runat="server">
Line 3: <style type="text/css">
</code></pre>
<pre>Source File: /Pages/State_Carrier_Search.aspx Line: 1</pre>
<p>The Codebehind for State_Carrier_Search.aspx.cs file: </p>
<pre><code>namespace ACAWebApplication.Pages
{
public partial class State_Carrier_Search : System.Web.UI.Page
{
protected void Page_LoadS(object sender, EventArgs e)
</code></pre>
<p>The code for State_Carrier_Search.aspx file is as follows: </p>
<pre><code><%@ Page Title="ACA Web App - State Carrier Search" Language="C#" MasterPageFile="~/Pages/User.Master" AutoEventWireup="true" CodeBehind="State_Carrier_Search.aspx.cs" Inherits="ACAWebApplication.Pages.State_Carrier_Search" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</code></pre>
<p>thanks! </p>
|
c# asp.net
|
[0, 9]
|
469,922
| 469,923
|
jQuery creating and modifying elements
|
<p>I'm using an HTML snippet to insert some text into the element, then display it somewhere:</p>
<pre><code>var elemTemp = $('<span /><strong class="value unit" />').find('span').text('hi!').end();
elemTemp.appendTo('#someDiv');
</code></pre>
<p>I want to insert "hi" inside the <em>span</em> but could not get it working. The <em>find()</em> method doesn't seem to find the span.
</p>
|
javascript jquery
|
[3, 5]
|
4,869,003
| 4,869,004
|
How can I highlight a sentence that is spread over more than one tag
|
<p>If i have text some thing like below.. </p>
<pre><code>var str="Hi, How are you";
</code></pre>
<p>If i want to highlight this text in the below HTML in a single attempt rather than spliting it into an array. In document if my HTML is like below.. </p>
<pre><code><div> Hi, <span>How are</span> you</div>
</code></pre>
<p>Please help me on this..I want to search the sentence in document and want to add highlighted effect to it.</p>
|
javascript jquery
|
[3, 5]
|
2,612,896
| 2,612,897
|
Javascript order of execution - How come it does this?
|
<p>I am quite on lost on why Javascript does certain things in this way, or maybe I coded something wrong. But how come the code after $.getJSON gets executed before the callback is complete?</p>
<pre><code>window.ratingCallback = function(data){
if(data[0].code == 3){
ratingHTML = buildHTML(0);
console.log('a'+ratingHTML);
return;
}
ratingHTML = buildHTML(data[0].rating);
console.log('b'+ratingHTML);
return;
};
function buildHTML(pageRating){
for(counter = 1; counter <= 5; counter++){
if(counter == pageRating){
ratingHTML += '<input name="star1" type="radio" class="star" value="'+counter+'" checked="checked"/>';
} else {
ratingHTML += '<input name="star1" type="radio" class="star" value="'+counter+'"/>';
}
}
return ratingHTML;
}
$.getJSON("https://domain.com/"+data+"?jsoncallback=?");
console.log(ratingHTML+"WHY DOES THIS EXECUTE FIRST AND NOT AFTER THE CALLBACK SINCE IT IS PLACED AFTER getJSON????");
</code></pre>
<p>The reason I want this to be different is that I need ratingHTML to be a global variable.</p>
<p>I understand that the callback gets called when the remote server has given a response, but can I let the rest of the script wait with further execution? Without placing all code in the callback function or any function?</p>
<p>Thank you very much!</p>
<p>Ice </p>
|
javascript jquery
|
[3, 5]
|
1,578,165
| 1,578,166
|
JavaScript variable not is undefined in IE9
|
<p>Hello I have next JS code (this code not my own) </p>
<pre><code> function somename(f)
var procName = "";
var procParams = new Array();
var parseEl = "";
var parseEls = new Array();
var parseInd = 0;
var procParamsInd = 0;
var IsValRead = false;
for (i = 0; i < f.length; i++) {
if (f[i] == "(")
break;
else
procName = procName + f[i];
}
}
</code></pre>
<p>I will redo it to much better way to find data before "(", but i wounder why procName variable is always undefined in IE9 in all browsers all working well.</p>
|
javascript jquery
|
[3, 5]
|
3,609,589
| 3,609,590
|
Writing a really good ASP.Net Async HttpHandler
|
<p>Until recently I thought that I wrote some really smart IHttpAsyncHandler. The functionality of the handler boils down to bypassing cross domain restrictions to a predefined host for a full Ajax webapp. So the incoming request is validated and then immediately dispatched to the real server using an ordinary HttpWebRequest.BeginGetResponse.</p>
<p>Today during debugging I discovered that Thread.CurrentThread.IsThreadPoolThread returns true on the BeginGetResponse callback. Which means I've exchanged one ThreadPool Thread for another. Great :)</p>
<p>Anyone who could suggest an alternative implementation?</p>
|
c# asp.net
|
[0, 9]
|
4,345,611
| 4,345,612
|
Javascript: pass "this" as "dom" object, not "this" as "this" function
|
<p>This is may hard can explain this. Lets see this:</p>
<pre><code><a onclick="jsFunction (1, 'a', function() { callback(this); }"></a>
</code></pre>
<p>the callback needs to know the <code><a></code> where this call come from. But this "this" is not that "this" what I want.
There is a little workaround, I know:</p>
<pre><code><a onclick="var _this = this; jsFunction (1, 'a', function() { callback(_this); }"></a>
</code></pre>
<p>but I feel it unlucky. Is there a better solution?</p>
|
javascript jquery
|
[3, 5]
|
3,456,464
| 3,456,465
|
Focus on Javascript or Jquery?
|
<p>I am a student in college, and I notice that a lot of companies look for people who have experience with Javascript. Does this include Javascript's libraries, like JQuery? Or, are they looking for Javascript people only? It probably depends on the company, but what is the general advice for a student wanting to do some front end work?
Is Javascript more powerful than JQuery? I know Jquery is a library and simplifies many tasks, but is there some reason why you would use Javascript over Jquery?</p>
|
javascript jquery
|
[3, 5]
|
5,325,525
| 5,325,526
|
asp.net web application goes to login page after about 15 minutes
|
<p>I have a web application, and for some reason which I cannot figure out, It goes to the login page every 15 minutes (I believe the session is idle). I have no where web config file that specify a timeout even close to that. Has anyone ever had an issue like this or know where I could look to try and fix the problem? thanks for any help.</p>
<pre><code><authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx"
timeout="90"
defaultUrl="~/"
name=""
protection="All" />
</authentication>
</code></pre>
|
c# asp.net
|
[0, 9]
|
317,036
| 317,037
|
Problem in reconnecting Java client socket to python server socket
|
<p>I am creating a java client socket which connects to python server socket, and receives data from server also send acknowledgment to server and closes the connection, this work perfectly fine for the first time, but if i try to connect to same socket for second time, the connection is not getting made...</p>
<p>I am not understanding whats the problem, can anybody help??</p>
|
java python
|
[1, 7]
|
354,230
| 354,231
|
Replace text inside a div without affecting any HTML tags inside of it
|
<p>I see that this has been asked many times. But, unfortunately I have not come across a straight forward solution. Most solutions revolve around multiple nodes within the div.</p>
<p>So here's problem. I have the following markup:</p>
<pre><code><div class="test">Text1<span></span></div>
</code></pre>
<p>I need "Text1" to be replaced with "Text2" without affecting the span tag and event handlers attached to the span tag.</p>
<p>Doing something like <code>$('.test')html('Text2<span></span>')</code> does replace the text. But, removes the event handlers on the span tag, which is not desired. I am looking for a quick and efficient method for this one.</p>
|
javascript jquery
|
[3, 5]
|
206,498
| 206,499
|
PHP/jQuery: Fadein/refresh after insert
|
<p>i have a "wall" on each profile, and i wish to make it smarter, so you don't need to update the page to view your inserted message you just put up.</p>
<p>When you insert a message, it makes a ajax call and inserts to the database, and you receive a message about it has been inserted. But right now you need to refresh the page to see your inserted message. What i want to do is if you insert a new message, it should fadein /refresh the wall with messages that is right under the form.
How can I do this?</p>
<p>I have worked on it alittle and tried to make a new file, inserted all coding to show comments and then i set timeout to refresh each 2 seconds</p>
<pre><code> function ajax_update() {
var wrapperId = '#box';
var profileID = document.getElementById('profileID');
var postFile = 'showcomments.php?id='+ profileID.value;
_v++;
_v2++;
$.post(postFile, { v2: _v2 , v: _v},
function(data){
$(wrapperId).html(data);
});
setTimeout('ajax_update()', 2000);
}
</code></pre>
<p>but this isnt good, as it makes too many server calls, so hope you can help me out, since i dont know how i should do this in a cool way</p>
<p>Form with ajax call:
<a href="http://phpbin.net/x/838833504" rel="nofollow">http://phpbin.net/x/838833504</a></p>
<p>And my current php code that grab from db and list in messages:
<a href="http://phpbin.net/x/2145692361" rel="nofollow">http://phpbin.net/x/2145692361</a></p>
|
php javascript jquery
|
[2, 3, 5]
|
3,048,171
| 3,048,172
|
What's the difference between jQuery and JavaScript?
|
<p>What's the difference between jQuery and JavaScript?</p>
|
javascript jquery
|
[3, 5]
|
4,285,673
| 4,285,674
|
How to only show input fields if checkbox is checked?
|
<p>Basically, I want to only show these fields if checkbox is selected, if it becomes unselected, disappear.</p>
<pre><code><input type="checkbox" name="supplied" value="supplied" class="aboveage2" />
<ul id="date">
<li><input id="start" name="start" size="5" type="text" class="small" value="1" /></li>
<li><input id="end" name="end" size="5" type="text" class="small" value="2" /></li>
</ul>
</code></pre>
<p>I've tried something like:</p>
<pre><code>$('#supplied').live('change', function(){
if ( $(this).val() === 'supplied' ) {
$('.date').show();
} else {
$('.date').hide();
}
});
</code></pre>
<p>Any advice would be greatly appreciated =)</p>
|
javascript jquery
|
[3, 5]
|
489,559
| 489,560
|
jQuery slideshow not working, display:none;
|
<p>Im trying to get my jquery slideshow working only for some reason its outputting to the browser as display:none! </p>
<p>Theres quite a bit of code so ive made a fiddle...</p>
<p><a href="http://jsfiddle.net/uExdD/" rel="nofollow">http://jsfiddle.net/uExdD/</a></p>
<p>Can anbybody see where im going wrong? Im using this plugin </p>
<p><a href="http://basic-slider.com/" rel="nofollow">http://basic-slider.com/</a></p>
<p>I call my plugin with the following...</p>
<pre><code> $('.slideshow').bjqs({
'animation' : 'slide',
'width' : 960,
'height' : 335,
'showMarkers': true
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
858,670
| 858,671
|
How to animate a div at the same time as slideToggle hide/show
|
<p>I'm working on a new website, where I have a contact 'tab' coming from the top of the browser window. Here's the link: <a href="http://www.stefanhagen.nl/testlab/" rel="nofollow">http://www.stefanhagen.nl/testlab/</a>. If you click the tab, a contact form will appear (using slideToggle). But while the contact form appears, I want the tab to slide down with the contact form, as if the user 'pulls' the form inside the browser window. I now use slideToggle to show the contact form on clicking the tab. Where do I put the code to animate the tab itself? By the way: I have a liquid layout, so the tab isn't 'pushed down' like normal, because I use absolute positioning for every div. Thanx in advance, and here's my JQuery so far:</p>
<pre><code>$('div.contacttab').click(function(){
$('div.contactform').slideToggle('slow', function(){
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,126,141
| 5,126,142
|
PHP passing a class as a reference?
|
<p>in Python, you could do something like this:</p>
<pre><code>class SomeClass(object): pass
s = SomeClass
someClassInstance = s()
</code></pre>
<p>How could you accomplish the same effect in PHP? From what I understand, you cannot do this? Is this true?</p>
|
php python
|
[2, 7]
|
903,073
| 903,074
|
how to convert mouse events and touch events using java script
|
<p>Any idea about about how to use double click event in tablets or ipad. Like 'onmousedown' is equivalent to 'touchstart'.</p>
|
javascript jquery
|
[3, 5]
|
3,681,816
| 3,681,817
|
jQuery error?? How to get the first "td" in all rows that are visible
|
<p>I have a table and I am hiding some rows. I want to get the first td in all of the rows that are showing. I have the following statement</p>
<pre><code>$("table.SimpleTable tbody tr:visible td:first-child");
</code></pre>
<p>this works in FireFox but not in IE any ideas?</p>
|
javascript jquery
|
[3, 5]
|
3,383,568
| 3,383,569
|
Token based Web Site logins?
|
<p>I'm really not sure how this works and can't seem to find much info on it.</p>
<p>I play a PC exe game where I can be logged in in-game. I then click the store button. It opens my browser. I see some token stuff in the url then it logs me in to the site with my profile and everything.</p>
<p>How would something like this typically work or be implemented?</p>
<p>Thanks</p>
|
php c++
|
[2, 6]
|
4,786,829
| 4,786,830
|
Displaying image on a different page
|
<p>Hallo there</p>
<p>I have and imageField as part of a gridview and would like to know how I can view this image in a different page when I select the row with a button(field).
When I add the information to a database the imageUrl is added to the database and this I tie up with the name of an uploaded image and subsequently the image is displayed in the gridview.
Is it possible for me to display this image on a different web page as well</p>
<p>thanks</p>
|
c# asp.net
|
[0, 9]
|
5,058,401
| 5,058,402
|
How can I generate an alert/pop-up saying avoid clicking back button of browser before user clicks it
|
<p>As I have disabled the back button in my application,I want user not to click it (across all browsers).</p>
|
javascript jquery
|
[3, 5]
|
4,925,455
| 4,925,456
|
HTTP Get method based on parameters in java
|
<p>I am trying to implement a class that gets data from mysql via my web service. I have previously used a http post to get information from a table but this time I intend a user to input a string into an editText, press search and the textview to display the query.For example, Imagine there are two columns of the mysql table: Firstname and surname; I would like to be able to get the surname by searching the Firstname (Entering the Firstname into the EditText and displaying the surname of that person).I have developed the PHP script but is it possible to use the HTTP get method based on an input string? how? I've only seen tutorials directing straight to the php link </p>
|
java android
|
[1, 4]
|
3,668,391
| 3,668,392
|
Disabling/enabled textbox in GridViewRow
|
<p>I have a checkbox and a textbox in a GridView (for every row), and I'd like to be able to write some javascript that would enable and disable the textbox depending on the state of the checkbox (checked or unchecked). I guess I'd have to give JS the row index somehow. Is this possible?</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
5,780,447
| 5,780,448
|
Does Android application memory limit apply to entire app or per process of app?
|
<p>I am having an issue hitting the memory limit of my application. My question is if I break my application into a few processes will this allow each process to get a 24mb limit or will all processes add up to hit the 24mb limit?</p>
|
java android
|
[1, 4]
|
1,316,077
| 1,316,078
|
what rules does designer.cs generation use
|
<p>Folks, </p>
<p>what are the rules governing the generation of declarations in the designer.cs file in an asp.net project?</p>
<p>for example, I have<br>
- myfile.resx,<br>
- myfile.aspx,<br>
- myfile.aspx.cs. </p>
<p>these generate<br>
- myfile.aspx.designer.cs </p>
<p>which defines things like <em>protected global::system.web.ui.webcontrols.literal blahblah;</em> for my resources.</p>
<p>but until I reference something in myfile.aspx, it wont show up in the generated designer.cs, <em>even</em> if I'm refering to it in my myfile.cs (the codebehind class).</p>
<p>how can I force this, without taking ownership of that designer.cs file?</p>
<p>context: I have a someresource.text in my aspx, which i am constructing out of a bunch of other resources, which is why they dont show up explicitly in the aspx.</p>
|
c# asp.net
|
[0, 9]
|
837,111
| 837,112
|
access values of controls dynamically created on postback
|
<p>My problem is:
I've got a table, dynamically created, fill with a lot of dropdownlists witches IDs are dynamically created.</p>
<p>When a button is pressed, I need to scan all controls in the table and save their value.</p>
<p>But after the postback I can't no longer access to the table, and I've no idea how can I get those values...</p>
<p>Thanks!</p>
|
c# asp.net
|
[0, 9]
|
5,426,560
| 5,426,561
|
Why can't I use an int from a spinner in the same class?
|
<p>Ok so I am working on an android app and I have implanted spinners... I have a total of four spinners and I have learned that if the spinner reads the options from the strings it has a defined number for the selection(i.e the first option is "0" next is "1" and so on)</p>
<p>I have the following code for the spinner</p>
<pre><code> Spinner a = (Spinner) findViewById(R.id.spinner1);
a.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView adapter, View v, int a,
long lng) {
// do something here
Toast.makeText(adapter.getContext(), "You selected: " + a,
Toast.LENGTH_SHORT).show();
}
@Override
public void onNothingSelected(AdapterView arg0) {
// do something else
}
});
</code></pre>
<p>and another one but with the int "b"</p>
<p>but later on in the same class I want to use some maths to get e=a,b (i.e if a=6 and b=5 e=65, or a=4 and b=3 e=43)
This is easily done by executing </p>
<pre><code>int e=a*10+b;
</code></pre>
<p>The problem is I want to display this when you press a button, so I have the following code</p>
<pre><code>public void Calc(View v) {
int e = a * 10 + b;
Toast.makeText(this, "Value: " + e, Toast.LENGTH_LONG).show();
}
</code></pre>
<p>but results in the error ""a" & "b" cannot be resolved to a variable"
why is this and how can I create a button that will be able to read these variables?</p>
|
java android
|
[1, 4]
|
9,300
| 9,301
|
Should I learn C# or Java first?
|
<p>What is your advice? Should I learn Java or C# first? I know only PHP.</p>
<p>I would like to write desktop apps for Windows.</p>
<p>Thank you.</p>
<p>P.S. I noticed that C# tag has here on stackoverflow 200 000 times usage and java only 150 000. Does this fact mean that Java is not so widely used as is C#?</p>
|
c# java
|
[0, 1]
|
2,741,570
| 2,741,571
|
How to check if a string is a substring of any element in an array
|
<p>I have an array</p>
<pre><code>var months = ["January", "February", "March", "April", \
"May", "June", "July", "August", "September", "October", \
"November", "December"];
</code></pre>
<p>I have strings like "Nov", "October", "Jun", "June", "Sept", "Sep" etc. The point is, the string can be a substring of one of the months.</p>
<p>What is the best way to compare the string to be a substring of the array elements? How do I find out the index of the month?</p>
<p>I am looking at javascript/jQuery.</p>
<p>I know I can just loop through the array checking against each element using <code>search</code> and break when found. I want something better.</p>
|
javascript jquery
|
[3, 5]
|
2,702,003
| 2,702,004
|
Where do I put javascript when using an asp.net user control?
|
<p>I have a user control with a "More Info" link. When clicking that link, I want a div to appear which gives the user more information.</p>
<p>Where do I put the javascript? It doesn't appear to work when placing at the top of my user control. How do you handle javascript and jquery when you are using a user control? I have jquery included in my master page. My regular asp.net pages have javascript and those work.</p>
<p>EDIT: It appears that the way to do client side coding in a user control is to do output a script via server side, similar to how the asp.net server controls work. What is disappointing is that jquery is so awesome but all the examples are strictly embedded on the html/aspx page. Is there a resource out there for jquery with asp.net that I haven't found yet?</p>
|
asp.net javascript jquery
|
[9, 3, 5]
|
3,974,306
| 3,974,307
|
Why is return function different after click
|
<p>In following code <code>$('body').delegate('.submit',... passed = search && passed; ...</code> after click on button in form i have in var <code>passed</code> output as <code>true</code> in case var <code>result</code> in function search is <code>false</code> because data is '0'. How can fix it?</p>
<pre><code> function search(e) {
e.preventDefault();
$('input').live('keyup change', function () {
var result = true;
$.ajax({
type: 'POST',
dataType: 'json',
url: 'myUrl',
data: myData,
async: false,
cache: false,
success: function (data) {
//in the here data is 0
if (data == 0) {
alert('data is 0')
result = false;
} else {
alert('data is not 0')
}
}
})
alert(result) // Output this alert is 'false' because data is '0'
return result;
})
}
$('.myclass_1').live('click', search);
$('.myclass_2').live('keyup change', search);
$('body').delegate('.submit', 'submit', function () {
var passed = true;
//passed = required_selectbox() && passed;
//passed = required_rediuses() && passed;
passed = search && passed;
alert(passed); // This output is always 'true' !!!!!!!!!!!!!?
if (!passed) {
$('#loadingDiv, #overlay').hide();
return false;
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,859,222
| 5,859,223
|
jquery - get attributes of an element when clicked . The element contains inner divs so getting undefined error
|
<p>I have the html code like this : </p>
<pre><code><ul>
<li k="5" id="l">
<div>
<div>
Some Text
</div>
</div>
</li>
</ul>
</code></pre>
<p>From the above code, if I dont have any div's or spans or someother elements inside the <strong>li</strong> tag, then $(e.target).attr("k") will give correct value . But, as it has some other elements inside it, when I click the element, it gives undefined value . What is the solution ? </p>
|
javascript jquery
|
[3, 5]
|
277,437
| 277,438
|
Does picking a language to learn really matter? They all use similar techniques to solve problms?
|
<p>College student about to major in CS. Just want to know if it really matter what language you learn first?</p>
<p>Seems to me CS and the nature of our work is about problem solving. Different language seems to differ in syntax, libraries you can use, etc. etc. But when it comes down to it, if you know how to solve a particular problem in one language, you could do it in other languages as well right? I mean surely some languages are better tools and can do a more elegant job, but at the end of the day the ideas are still the same right?</p>
|
c# java c++
|
[0, 1, 6]
|
1,939,635
| 1,939,636
|
File, Save As for iPhone and Android
|
<p>I have an application written in HTML5 that uses localstorage. The user should be able to play this game in airplane mode, but right now it goes to my website to load the page.</p>
<p>Q: How do I save a web page onto a mobile device so that it doesn't require going to the Internet to dl it first?</p>
<p>Is the answer different for iPhone vs. Android?</p>
|
android iphone
|
[4, 8]
|
1,328,019
| 1,328,020
|
Application crashing when rendering sprites on Android
|
<p>I have recently been trying to learn Android programming in order to enhance my portfolio</p>
<p>I've built a couple of simple text based applications and have now decided to extend this into game programming</p>
<p>I've coded the following which should display the sprite named droid_1.png on screen</p>
<pre><code> public class IconApp extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(new Panel(this));
}
class Panel extends View
{
public Panel(Context context)
{
super(context);
}
@Override
public void onDraw(Canvas canvas)
{
Bitmap BMap = BitmapFactory.decodeResource(getResources(), R.drawable.droid_1);
canvas.drawColor(Color.CYAN);
canvas.drawBitmap(BMap, null, null);
}
}
}
</code></pre>
<p>Eclipse doesn't flag any errors but when I run the application, it crashes</p>
<p>My main.xml file under my layout folder currently looks like this - do I need to amend something here in order to cater for this new sprite?</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
</code></pre>
<p>Thanks</p>
|
java android
|
[1, 4]
|
3,427,477
| 3,427,478
|
Execute javascript
|
<p>I have used a script I have found. Where it should do some thing when the mouse hovers over the element</p>
<pre><code> $this.hover(
function () {
tip.html("<p>" + tTitle + "</p>");
setTip(tTop, tLeft);
setTimer();
},
function () {
stopTimer($this);
tip.hide();
}
);
</code></pre>
<p>But i want to execute it, without I have to hover the mouse over the element?</p>
<p>How can I do that?</p>
|
javascript jquery
|
[3, 5]
|
909,575
| 909,576
|
Create a thumbnail from only part of an image
|
<p>I'm creating a thumbnail right now like this:</p>
<pre><code>// create thumbnail and save
var image = Image.FromFile(Server.MapPath(imageFilename));
var thumb = image.GetThumbnailImage(image.Width / 10, image.Height / 10, () => false, IntPtr.Zero);
thumb.Save(Server.MapPath(Path.ChangeExtension(imageFilename, "thumb" + Path.GetExtension(imageFilename))));
</code></pre>
<p>All it does is take the image, create a thumbnail 1/10th of the size, and save it.</p>
<p>I'd like to be able to create a thumbnail out of only part of the image. So say I have an image that is 200px by 200px. How can I take a 100px by 100px crop out of the middle of the image, and create a thumbnail out of it?</p>
|
c# asp.net
|
[0, 9]
|
4,436,348
| 4,436,349
|
Making a datarow Select() Query
|
<p>The thing is i have a data row array which contains ID and parent id as its fields.</p>
<p>I have used the following code and it returned the correct values ,</p>
<pre><code>datarow [] dt = datarow.select(" Parent = '0' ");
</code></pre>
<p>I want to select only those rows which don't have the '0' as its Parent.I know sql i am not getting how the select function works. </p>
|
c# asp.net
|
[0, 9]
|
2,024,281
| 2,024,282
|
how to update my hidden division data when form is submitted without reloading page
|
<p>i want to know javascript code that is used for dynamic update on my site...
the problem is that,i have a hidden division which contain a form (like registration form )and
i validate this form using php.
but when i submit the form ,the page is reloaded and division is hide according to property,i want to see what is happening with form submission,i have to click again on link to show division then i m able to see about any error if occur.
i m using xmlHTTP object to do this but my division is not remain visible during form validation due to page reloading.i don't have any idea that how do visible division until complete submission of form.</p>
<p>i need whole source code,because i have code but unable to modify it according to my need.</p>
|
php javascript
|
[2, 3]
|
1,419,848
| 1,419,849
|
jquery <-> php logic on which side
|
<p>I have a question about where to put the logic between jquery and php. I´m writing a small website where users can input different values. Those values are added together and multiplied with an value saved in a mysql database and outputed again to the user.</p>
<p>My question is whats the better way for doing this.</p>
<blockquote>
<p>A:
Let Jquery serialize the form and send all values to php.
Php catches the Post vars and the value from the database,
calculates everything, writes the sum to the database and
gives everything back to the user.</p>
<p>B:
When the User starts the Script the value of the Database is send from PHP
to the User Form. Now Jquery does all calculations. When everything is ready,
the Sum is send back to PHP and written in the Database.</p>
</blockquote>
<p>The reason why I´m asking is A: seems to be safer with the validation of given values. But B: is more frindly to the server. (Jquery ajax is fired on Keyup, means the value would be queried from the database everytime the user edits the form.)</p>
<p>regards,</p>
<p>toni</p>
|
php jquery
|
[2, 5]
|
2,745,785
| 2,745,786
|
What is the exact error code for Type Mismatch Exception
|
<p>I am using Websphere Lombardi Edition 7.1. In this tool I am using Intermediate Exception Event,to handle Exceptions at Business Process Diagram (BPD) Level, I need to know error code for that particular Exception. So I need to know what is the exact error code for Type Mismatch Exception. Can anyone help me out.</p>
|
java javascript
|
[1, 3]
|
1,789,755
| 1,789,756
|
How to dynamic select element with JQuery by id
|
<p>I need to dynamic select element with JQuery, I get in code id of element. How to do that ?
I've tried:</p>
<pre><code>var sel='\'#'+id+'\'';
var elem+$(sel);
</code></pre>
<p>but it doesn't work ( id is string id of element).</p>
|
javascript jquery
|
[3, 5]
|
3,561,774
| 3,561,775
|
Converting Indonesian (id-ID) Date To English (en-US) Date
|
<p>I am facing problem while converting Indonesian Date to English Date.
Ex : I got an Date which is in Indonesian Language <code>i.e 24/mars/1958</code>
so I have to convert this date to English Date <code>i.e 24/mar/1958</code> I tried to convert the date by using following code</p>
<pre><code>string date = "24/mars/1958";
string newDate = DateTime.Parse(date, new CultureInfo("id-ID")).ToShortDateString();
</code></pre>
<p>but the above code is throwing error
so can any one let me know how to convert this date to English Date </p>
<p>Thanks in Advance
Nitesh Katare</p>
|
c# asp.net
|
[0, 9]
|
2,031,819
| 2,031,820
|
Response.End () doesn't abort current thread
|
<p>Anybody know why ASP.NET might not abort the current thread with a Response.End()?</p>
<p>Update: Reason being that there is code, albeit not well written, that is getting executed after Response.End(). I've never seen a case where Response.End () didn't stop the current thread from executing.</p>
<pre><code>
protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();
Response.Redirect("somewhere", true);
Response.End();
//Some other code get's executed here
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
2,723,713
| 2,723,714
|
How to store emails from outlook 2007 into MySQL Database?
|
<p>in my office, we have a computer which is receiving more than 10000 emails in outlook with windows xp.
Each email has a specific subject name.
What i want is to sort emails by subject name and then store them in a MySQL database.</p>
<p>So i don't know what langage to use for this task, maybe in java or php.</p>
<p>i need help please.
Thak you</p>
|
java php
|
[1, 2]
|
3,410,205
| 3,410,206
|
jQuery getJSON not populating HTML select properly
|
<p>I have an HTML <code><select></code>:</p>
<pre><code><div id="content">
<input type="button" id="get-btn" onclick="getData();"/>
<select id="attrib-type-sel"></select>
</div>
</code></pre>
<p>When the user clicks the following button, I want to use jQuery's <code>getJSON</code> method to hit my server, pull back data, and populate the <code><select></code> with options:</p>
<pre><code>$(document).ready(function() {
$.getJSON(
"some/url/on/my/server",
function(data) {
var optionsHTML = "";
var len = data.length;
for(var i = 0; i < len; i++) {
optionsHTML += '<option value="' + data[i] + '">'
+ data[i] + '</option>';
}
$('#attrib-type-sel').html(optionsHTML);
});
});
</code></pre>
<p>When I run this code, in Firebug, I see that the AJAX call is successful and returns the following JSON:</p>
<pre><code>[
{
"id":1,
"name":"Snoopy",
"tag":"SNOOPY",
"allowsAll":false
}
]
</code></pre>
<p>(Only returns 1 record).</p>
<p>However, when back in the UI, when this code fires it creates a <code><select></code> that has 1 options whose inner HTML reads <code>[object Object]</code>.</p>
<p>Can anyone spot what is going on here? It looks like my <code>getJSON</code> is OK, but the code to extract the JSON from the results and use it to populate my select is buggy. Thanks in advance!</p>
|
javascript jquery
|
[3, 5]
|
2,404,728
| 2,404,729
|
jQuery post() with serialize and extra data
|
<p>Okay, so I'm trying to find out if it's possible to post serialize() and other data that's outside the form.</p>
<p>Here's what I though would work, but it only sends 'wordlist' and not the form data.</p>
<pre><code>$.post("page.php",( $('#myForm').serialize(), { 'wordlist': wordlist }));
</code></pre>
<p>Anyone have any ideas?</p>
|
javascript jquery
|
[3, 5]
|
408,597
| 408,598
|
How to do autoplay(image) in jquery?
|
<p>I have 3 images. I want to show one by one through auto play with various time delay(first one 3 seconds,second one 5 seconds,third one 7 seconds). Finally i want to loop it.</p>
<p>I have no idea to do it. Please share ideas with me for it.</p>
|
javascript jquery
|
[3, 5]
|
1,982,792
| 1,982,793
|
what are the OOP features which are not in java but c++ has those features?
|
<p>Respected Sir!</p>
<p>As i have not learnt java yet but most people say that C++ has more OOP features than Java, I would like to know that what are the features that c++ has and java doesn't. Please explain.</p>
|
java c++
|
[1, 6]
|
1,070,759
| 1,070,760
|
When I add jQuery library it invalidates my other jQuery on the same page
|
<p>I am trying to create a page that has a scroller of images and a voting system (which I copied from here: <a href="http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/" rel="nofollow">http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/</a>).</p>
<p>The scroller was working just fine until I added the voting pop-up. Essentially, when I add the library </p>
<pre><code><script src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js" type="text/javascript">
</code></pre>
<p>needed for the pop-up to work, the scroller images disappear and the page seems to re-load whenever I hit the scrolling arrows. If I comment out the library above then the scroller re-appears (but the pop-up window does not work). Here are the directories for the other files.</p>
<ul>
<li>public/scripts/general0.js - init for scroller</li>
<li>public/script/woo-jcar.js - scroller function</li>
<li>public/scripts/popup.js" - pop-up javascript</li>
</ul>
<p>Please Help! I am a newby so this might just be a dumb thing like adding to conflicting libraries or something.</p>
<p>Thanks,</p>
|
javascript jquery
|
[3, 5]
|
4,561,746
| 4,561,747
|
android getInputType in JAVA code
|
<p>I defined a EditText in XML with attribute <strong>android:inputType="numberSigned"</strong>, so, when I try to get it in Java Code like: <p></p>
<blockquote>
<p><code>int type = mEditText.getInputType();</code><br>
<code>switch(type){</code><br>
<code>case InputType.TYPE_NUMBER_FLAG_SIGNED:</code><br>
<code>//do when I get EditText defined with 'numberSinged'</code><br>
<code>//do something</code><br>
<code>break;</code><br>
<code>}</code></p>
</blockquote>
<p>But, It doesn't work for me. So I try to check Android source code, <code>TYPE_NUMBER_FLAG_SIGNED=4096</code>. When I try to print <code>println(mEditText.getInputType())</code>,it turns to be <code>4098</code>. And I can't find any variable equals <code>4098</code>. <br>
Can anybody tell me the reason?
<br>
<p>
<i>I'm not good at English, may you can understand me! Thanks!</i></p>
|
java android
|
[1, 4]
|
1,127,955
| 1,127,956
|
Why does LinearLayout instance.getLayoutParams look to have a wrong class?
|
<p>If I declare <code>LinearLayout linearLayout</code> and look at <code>linearLayout.getLayoutParams()</code>, it gives me <code>ViewGroup.LayoutParams</code>, not <code>LinearLayout.LayoutParams</code>.</p>
<p>So I have to use the repeating (and thus bad) style construction of:</p>
<pre><code>int lm = ((LinearLayout.LayoutParams) linearLayout.getLayoutParams()).leftMargin?
</code></pre>
<p>Do I really have to use it, if I want to reach margins, for example?</p>
<p>Is it my misunderstanding of Android or Java, or both or something else?</p>
|
java android
|
[1, 4]
|
2,725,588
| 2,725,589
|
Hide groupIndicator of expandable listview based on listview positions
|
<pre><code><ExpandableListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:groupIndicator="@drawable/group_indicator"
android:background="#ffffff"
/>
</code></pre>
<p>I have used an expandable list view with group Indicator...
if in list view fourth position, there is no child for a group ...then it should not show the indicator in fourth position ...how to go with it</p>
|
java android
|
[1, 4]
|
2,202,030
| 2,202,031
|
Cannot use php tag in javascript tag
|
<p>I'm trying to use php tag in a javascript function. But unfortunately its not working. I even used <code><?php</code> but still not working. I checked php.ini file and there the short tag is already enabled.</p>
<p>Any sort of suggestion will be appreciated. </p>
|
php javascript
|
[2, 3]
|
1,366,939
| 1,366,940
|
Help with JavaScript reading checkbox with []
|
<p>i have written/modified a script to count checkboxes checked it works fine but i know need the checkbox name to read r1[] for my php scripts and now it doesn't work please help with java script...</p>
<p>THIS WORKS</p>
<pre><code><input name='r1' type='checkbox' value='' onClick='return GetSelectedItem2()' />
</code></pre>
<p>THIS DOES NOT WORK</p>
<pre><code><input name='r1[]' type='checkbox' value='' onClick='return GetSelectedItem2()' />
</code></pre>
<p>JAVASCRIPT</p>
<pre><code>function GetSelectedItem2() {
chosen = ""
numCheck = 0
len = document.f1.r1.length
for (i = 0; i < len; i++) {
if (document.f1.r1[i].checked) {
numCheck++
if (numCheck == 3) {
alert("Only pick two date")
document.f1;
return false;
}
}
}
}
</code></pre>
|
php javascript
|
[2, 3]
|
234,978
| 234,979
|
How do I strip the first character
|
<p>I am constructing a URL and I have</p>
<pre><code>escape($('#count_of_stations').html()
</code></pre>
<p>The problem is the value will come in like this </p>
<pre><code>1 station
2 stations
</code></pre>
<p>I need to strip everything other then the first character, so is there a way to sent it with the " station(s)"?</p>
|
javascript jquery
|
[3, 5]
|
404,420
| 404,421
|
How to get the left navigation to follow user as they scroll down the page
|
<p>Please take a look at this example:</p>
<p><a href="http://jsfiddle.net/3YrDD/" rel="nofollow">http://jsfiddle.net/3YrDD/</a></p>
<p>I'm trying to get the left "SideBar" content to follow the user as they scroll down the "Main content".<br>
Is there a way that I can do this?</p>
<p>thanks</p>
|
javascript jquery
|
[3, 5]
|
3,136,585
| 3,136,586
|
how to get empty row in DropDownList
|
<p>i have this citys in my database:</p>
<pre><code>city1
city2
city3
city4
</code></pre>
<p>i what to see this in my DropDownList:</p>
<pre><code>[empty]
city1
city2
city3
city4
</code></pre>
<p>this is my bind code:</p>
<pre><code>SQL = "select distinct City from MyTbl order by City";
dsClass = new DataSet();
adp = new SqlDataAdapter(SQL, Conn);
adp.Fill(dsClass, "MyTbl");
adp.Dispose();
DropDownList3.DataSource = dsClass.Tables[0];
DropDownList3.DataTextField = dsClass.Tables[0].Columns[0].ColumnName.ToString();
DropDownList3.DataValueField = dsClass.Tables[0].Columns[0].ColumnName.ToString();
DropDownList3.DataBind();
</code></pre>
<p>how to do it (asp.net C#) ?</p>
<p>thanks in advance</p>
|
c# asp.net
|
[0, 9]
|
3,444,728
| 3,444,729
|
How to count # words in a textarea
|
<p>I am wondering whether there is any javascript and PHP code to count number of words which are encoded in unicode.</p>
|
php javascript
|
[2, 3]
|
2,689,217
| 2,689,218
|
javascript: function call to itself
|
<p>I suppose the following code:</p>
<pre><code>jQuery("#mybutton").click(function(){
//do something
});
</code></pre>
<p>How could I recall to this function "anonymous"?, I can not put a name to this function:</p>
<pre><code>var xfun = function(){
//do something
}
jQuery("#mybutton").click(xfun);
</code></pre>
<p>I can do something like this:</p>
<pre><code>var working = false;
jQuery("#mybutton").click(function(){
if (working){
var _this = this;
_this._eventType = e.type;
setTimeout(function() { jQuery(_this).trigger(_this._eventType); }, 200);
return false;
}
//do something
});
</code></pre>
<p>what I need is something like this:</p>
<pre><code>var working = false;
jQuery("#mybutton").click(function(){
if (working){
setTimeout( this_function, 200);
return false;
}
//do something
});
</code></pre>
<p>thanks.</p>
<p><strong>EDIT:</strong></p>
<p>Solution:</p>
<pre><code>jQuery("#mybutton").click(function(){
if (working){
var fn = arguments.callee;
var _this = this;
setTimeout(function(){fn.call(_this);}, 200);
return false;
}
//do something
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,411,045
| 1,411,046
|
Changing up and down arrow with jquery
|
<p>Why won't this jQuery change my image to a down arrow like I want it to? When a user opens a drop down, the up arrow changes to a down arrow. I'm doing this with an if else because I don't know any easier way, but it's not working. The arrow stays up the entire time, no matter how many times I click. Here is the jQuery. Should be all thats needed. Thanks!</p>
<pre><code> $("h3#mpcClients").click(function() {
$("#hidden0").slideToggle(500);
var up = true;
if (up == true) {
$("td h3").css("background-image", "url(http://www.crm-newsletter.com/client-emails/images/arrowDown.png)");
up=false;
}
else if(up == false) {
$("td h3").css("background-image", "url(http://www.crm-newsletter.com/client-emails/images/arrowUp.png)");
up=true;
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,042,751
| 5,042,752
|
print() an element based on its id
|
<p>I would like to print only a table from a webpage whose id is <code>"test1"</code></p>
<pre><code>function printPage() {
$var = document.getElementById('test1');
print($var);
}
</code></pre>
<p>In print preview, the whole document is appearing and not the table. Most likely the entire page will be printed while all I want is my table to be printed.</p>
|
javascript jquery
|
[3, 5]
|
1,073,615
| 1,073,616
|
slideToggle is creating a wobble at the end of an accordion
|
<p>Creating an accordion - on the slide - the elements underneath the element that is sliding seem to move down a px and then back up, creating a juddering effect.</p>
<pre><code>$(document).ready(function() {
//Promos banners rotation and accordion
$(function(){
var $accordionList = $('.accordion').find('li');
var numberOfItems = $accordionList.length;
var currentItem = 0;
// Set first item to active
$accordionList.eq(currentItem).addClass('active').find('.content').slideToggle(800, function() {});
// Loops through promos
var infiniateLoop = setInterval(function() {
if(currentItem == numberOfItems - 1){
currentItem = 0;
}
else {
currentItem++;
}
// Remove active class, if is has it, and close content
$accordionList.parent().find('li.active').removeClass('active')
.find('.content').slideToggle(800, function() {
});
// Add active class and open content
$accordionList.eq(currentItem).addClass('active').find('.content').slideToggle(800, function() {
});
}, 4000 );
// Click to show promo
$accordionList.on('click', function () {
// Stop rotation
clearInterval(infiniateLoop);
var $accordionHead = $(this);
// Remove active class, if is has it, and close content
if($accordionHead.hasClass('active')) {
// Do nothing
}
else {
$accordionHead.parent().find('li.active').removeClass('active')
.find('.content').slideToggle(800, function() {
});
// Add active class and open content
$accordionHead.addClass('active').find('.content').slideToggle(800, function() {
});
};
});
});
});
</code></pre>
<p><a href="http://jsfiddle.net/chrism/6tmL3/3/" rel="nofollow">Fiddle here demonstrating the problem</a></p>
<p>I've seen some suggestions that you fix the height of the content div - but the site is responsive so that won't work.</p>
|
javascript jquery
|
[3, 5]
|
1,561,028
| 1,561,029
|
How to auto submit javascript form
|
<p>There is a search button a a webpage : </p>
<pre><code><td><table border="0" cellpadding="0" cellspacing="0"><tr><td dir="ltr" width="10" height="21"><img src="/global/images/ButtonLeftDove.gif" border="0" alt="" height="21" width="10" /></td><td height="21" align="center" valign="middle" class="ButtonDove" nowrap="nowrap"><a href="javascript:__doPostBack('mobjTemplate$ctl01$btnSearch2','')" onmouseover="window.status='Search';return true;" onmouseout="window.status='';return true;">Search</a></td><td dir="ltr" width="10" height="21"><img src="/global/images/ButtonRightDove.gif" border="0" alt="" height="21" width="10" /></td></tr></table></td>
</code></pre>
<p><strong>it is calling a javascript function javascript:__doPostBack('mobjTemplate$ctl01$btnSearch2','')</strong></p>
<p>the java function is as following:</p>
<pre><code>function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
</code></pre>
<p>I need to auto click that search button. </p>
<p>I tried this code but it does not work:</p>
<pre><code>HtmlElementCollection elemColl2 = null;
HtmlDocument doc = webBrowser.Document;
elemColl2 = doc.GetElementsByTagName("form");
foreach (HtmlElement elem in elemColl2)
{
elem.InvokeMember("submit");
}
</code></pre>
<p>How can I do that??</p>
<p>Thanks for help in advance..</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
1,861,323
| 1,861,324
|
When to use jQuery wrapper methods instead of built-in javascript methods
|
<p>Which jQuery methods should be avoided in favour of built-in methods / properties?</p>
<p>Example:</p>
<pre><code>$('#el').each(function(){
// this.id vs $(this).attr('id');
// this.checked vs $(this).is(':checked');
});;
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,176,779
| 5,176,780
|
activate readonly back after editing the input jquery
|
<p>how can i activate the readonly back after finishing the edit of the input ?</p>
<p>this is my code for now :</p>
<pre><code><script type="text/javascript">
$(document).ready(function () {
$("input").bind('click focus', function(){
$('input').each(function(){
$(this).attr("readonly", false);
});
});
});
</script>
</code></pre>
<p>an input like this :</p>
<pre><code><input type="text" class="m" readonly="readonly" id="anchor_text">
</code></pre>
<p>i think something with focusout, i need to put readonly back when i go to the next input, so the edited input can't be change unless i hit again click on it.</p>
|
javascript jquery
|
[3, 5]
|
1,899,094
| 1,899,095
|
Simple way to check if input is in focus and to disable mouseleave function if true
|
<p>I have to admit that I'm definitely no jQuery genius but what seems like asimple solution has just totally eluded me.</p>
<p>Basically I have a drop down script working on a nested ul to display on rollover of its parent. In one of the nested ul I have a form that I would like to stop the mouseleave event if any of the inputs in the form are being entered into.</p>
<p>Here's the original code:</p>
<pre><code>$(document).ready(function() {
/*------- navigation -------*/
$('.top_menu li').hover(function(){
var index = $('.top_menu li').index(this);
if($(this).children('ul').length != 0)
{
$(this).children('ul').show();
}
});
$('.top_menu li').mouseleave(function(){
$(this).children('ul').hide();
});
$('.login_cart li,.login_cart_captu li').hover(function(){
var index = $('.login_cart li').index(this);
if($(this).children('ul').length != 0)
{
$(this).children('ul').show();
}
});
$('.login_cart li,.login_cart_captu li').mouseleave(function(){
$(this).children('ul').hide();
});
});
</code></pre>
<p>I'm really only concerned with the .login_cart li portion of the script - that's the only one that has the form within it.</p>
<p>I've tried with a simple if/else statement to not hide if an input has focus but that hasn't worked so far.</p>
<p>Any help anyone could give me or to shed some light on this would be absolutely wonderful.</p>
<p>Thanks in advance!</p>
|
javascript jquery
|
[3, 5]
|
771,961
| 771,962
|
Trigger javascript function through PHP
|
<p>I'm trying to call a JavaScript function through PHP and have met some problems. I have got three code snippets for your understanding:</p>
<p>1) My javascript function:</p>
<pre><code>function addPoints(radiobutton){
//code
}
</code></pre>
<p>The parameter is an actual button and inside the function is a lot of code reading button value and name and taking care of checked status of the button.</p>
<p>2) My php-code creating the button looks like this. Notice that i send 'this' to the function.</p>
<pre><code>echo "<input type=\"radio\" name=\"X\" value=\"Y\" onClick=\"addPoints(this)\"/>";
</code></pre>
<p>3) Finally I have this code at the very end of the document for triggering the javascript function when page is loaded.</p>
<pre><code>echo "<SCRIPT LANGUAGE='javascript'>addPoints();</SCRIPT>";
</code></pre>
<p>If <code>addPoints</code> only consisted of an alert, this would work. But my problem is that I need to send an actual button as parameter to the function. I need both triggering the function on page load (to load some data from a database) and the normal button onClick-event.</p>
<p>Is there any solution for this if I don't use another server request to catch the desired button? It's important that I get the button created above (in fact I've got a lot of buttons, but let's think of is as one) and send it as parameter.</p>
|
php javascript
|
[2, 3]
|
886,644
| 886,645
|
making the menu stay and not disappear on hovering out of the area
|
<p>Hi I have a header with a menu to its side, right now the menu gets displayed by dropping down once I hove on the arrow on the side of header and disappears once I move my cursor out of the menu dropdown area.</p>
<p>How do I make the menu stay until I click like the arrow button on the top again or have a button in the menu like 'ok' which will slide up the menu?</p>
|
javascript jquery
|
[3, 5]
|
3,842,919
| 3,842,920
|
Getting value in <select>, using JQuery
|
<p>I need to get a current value of SELECT tag. And for this I'm using <code>$('select').val()</code>, but this return only default value and it's don't changed. May be I can help me?</p>
<pre><code>$('div#buy input').fancybox({
ajax : {
type : "POST",
data : {
id: $('input[name="id"]').val(),
count: $('#count').val()
}
}
});
<select id="count">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,108,078
| 1,108,079
|
set outer scoped variable from inner scope in javascript
|
<pre><code>var lat = 0.0;
var lng = 0.0;
var jsonData = null;
var geocoder = new google.maps.Geocoder();
var miles = $('#milesAway').val();
// find what the user is locating by
if ($('#zipCode').is(':visible'))
{
var zipText = $('#zipCode').val();
if (isValidUSZip(zipText))
{
geocoder.geocode( {
'address': zipText
}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
lat = results[0].geometry.location.lat();
lng = results[0].geometry.location.lng();
map.setCenter(results[0].geometry.location);
} else {
alert("Zip Code couldn't be located.");
}
});
}
else
{
alert('Please enter a valid US zip code.');
}
}
</code></pre>
<p>lat and lng are still set as 0.0 after this thing runs through, why? Shouldn't I be able to set these like this?</p>
<p>Edit: I get to the point where they are supposed to be set too, if I put an alert there I can see the values that they are supposed to be set to.</p>
|
javascript jquery
|
[3, 5]
|
1,280,034
| 1,280,035
|
Finding Difference of 2 sets in Java
|
<p>I have two hashsets in Java, of which I want to find the difference</p>
<p>I tried the following code as recommended by Oracle's doc</p>
<pre><code> HashSet<RunningTaskInfo> difference = new HashSet<ActivityManager.RunningTaskInfo>(newRunningTasks);
HashSet<RunningTaskInfo> oldRunningTaskInfos = new HashSet<ActivityManager.RunningTaskInfo>(oldRunningTasks);
difference.removeAll(oldRunningTaskInfos);
for(RunningTaskInfo d : difference){
ComponentName cn = d.baseActivity;
Log.d("com.manugupt1.fua","Comparing : " + i + cn.getPackageName() + "****" + cn.getClassName() + "****" + cn.getShortClassName());
}
</code></pre>
<p>Only those data values that are not in oldRunningTasks should be shown but I get only the elements from oldRunningTasks. Any suggestions</p>
|
java android
|
[1, 4]
|
163,622
| 163,623
|
Php vars within javascript
|
<p>I have a bit of code to record a certain action</p>
<pre><code>$('#record').click(function(){
$.get("../confirm.php", { "id": '<?php echo $record; ?>' }, function(data){});
});
</code></pre>
<p>Which works fine, but i don't want the page to be full of javascript and such as i have other things like this on it too, so i am trying to move it to a js file.</p>
<p>In the php file</p>
<pre><code><script type="text/javascript">var record = "<?= $record ?>";</script>
<script type="text/javascript" src="jsfile.js"></script>
</code></pre>
<p>In the js file</p>
<pre><code>$('#record').click(function(){
$.get("../confirm.php", { id: record}, function(data){});
});
</code></pre>
<p>But it doesnt want to play ball, any ideas how to do this?</p>
|
php javascript
|
[2, 3]
|
4,022,697
| 4,022,698
|
dynamic form with php and javascript
|
<p>I want to create a dynamically changing form, when someone select first option, it makes query on mysql and change secont option automatically based on first.</p>
<p>I don't know how to make things in java so I found it.
I found tutorial like this <a href="http://student-plus.blogspot.com/2011/05/dynamic-select-box-with-jquery-php.html" rel="nofollow">manual</a></p>
<p>but problem is, it's not working
in block </p>
<pre><code> $query = "select * from tbl_class";
$result = mysql_query($query) or die("Error in Query! ".mysql_error());
while($row = mysql_fetch_array( $result ))
{
echo "<option "'="" .="" id']="" value="" . $row[">" . $row['name'] . " </option>";
}
</code></pre>
<p>in row echo option... is error syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'
Can you help me please ? :(</p>
|
php javascript
|
[2, 3]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.