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,434,025
3,434,026
Java/Android: DatagramChannel is already set non-blocking, receive() still blocks
<p>I set the <code>datagramchannel</code> non-blocking by instance method <code>configureBlocking(false)</code>, But when I use instance method <code>receive(buffer)</code>, it still hangs there for incoming packet. Anyone could tell me what's going on?</p> <p>Thanks.</p>
java android
[1, 4]
5,347,841
5,347,842
JQuery : Play notification sound : IE8 Error
<p>This code works perfect for crome and firefox.. but error in IE8</p> <pre><code>if($('#soundcheck').is(':checked')){ //alert('checked'); var audio = document.createElement('audio'); document.body.appendChild(audio); audio.src = system_base_url+'/sound/horn.wav'; audio.play(); } </code></pre> <p>IE8 says: Object doesn't support this property or method, and it points to :</p> <pre><code>audio.play(); </code></pre> <p>Anyone having similar experience with IE8?</p> <p>Regards</p>
php javascript jquery
[2, 3, 5]
1,758,253
1,758,254
setInverval and delay
<p>I am trying to make a div bounce every 4 seconds and after 15 seconds fadeOut. The code bellow makes the div disappear and the bounce doesn't happen.</p> <pre><code>$(document).ready(function(){ function salta() { $('.recomenda').effect("bounce",{ times:4 },300); } setInterval(salta, 4000); $('.recomenda').delay(15000).fadeout('slow'); }); </code></pre> <p>This isn't doing the job, any hint you can give me?</p> <p>Kind regards.</p> <p>With the help of Matt i figured how to do it:</p> <pre><code>function salta() { $('.recomenda').effect("bounce",{ times:4 },300); } var interval = setInterval(salta, 3500); setTimeout(function (){ clearInterval(interval); $('.recomenda').fadeOut('slow'); }, 15000); </code></pre>
javascript jquery
[3, 5]
2,944,720
2,944,721
Does javascript allow me to use default parameters?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/148901/is-there-a-better-way-to-do-optional-function-parameters-in-javascript">Is there a better way to do optional function parameters in Javascript?</a><br> <a href="http://stackoverflow.com/questions/894860/how-do-i-make-a-default-value-for-a-parameter-to-a-javascript-function">How do I make a default value for a parameter to a javascript function</a> </p> </blockquote> <p>I have the following function:</p> <pre><code>function gridClick(link, action) { ... ... </code></pre> <p>Called like this:</p> <pre><code>gridClick(this, action) </code></pre> <p>I would now like to add another parameter to the function to make it like this:</p> <pre><code>function gridClick(link, action, mce) { ... ... </code></pre> <p>If I do this then will I need to change all the function calls or is there some way that I can have the function default to the value of true for the parameter mce if the function is called with just the first two arguments?</p>
javascript jquery
[3, 5]
4,376,954
4,376,955
Resources Not Found Exception
<p>I have a variable int nextvalue. This is set via</p> <pre><code>nextvalue = b.getInt(b.getColumnIndex("nextq")); </code></pre> <p>It is definitely being set correctly as a following query relies on this value. The problem is occurring when I am trying something like</p> <pre><code>text.setText(nextvalue); </code></pre> <p>Am I going crazy is there something simple im missing?</p>
java android
[1, 4]
5,759,385
5,759,386
Caching data in fields in form input
<p>I have a small form with two fields: login + password. I would like when a user gets connected by entering valid credentials, and when he comes back for new login, to cache data in form fieds. Like when we go to the gmail interface and find the email address and password are already in the fields and we just have to submit.</p> <p>This does not work on my website.</p>
php javascript
[2, 3]
664,029
664,030
android: start in symbol keyboard mode, but don't restrict to numbers-only input
<p>I want to specify that Android should start the soft keyboard for a given EditText in the numeric/symbols mode. I know this can be done by setting the input type of the EditText to be numeric using EditText.setInputType() except that I do not want to restrict the input type for the EditText to numeric input only**. Is there another way to tell Android what keyboard it should open for a given EditText?</p> <p>** I want essentially a Math class of numeric input, accepting arbitrary mathematical expressions, including [0,9.+-/*()@:].</p>
java android
[1, 4]
3,599,865
3,599,866
asp.net, c# with mappath
<p>i have 10 rows like (E:\DocumentManager\Upload\rzgtlxvmuolmhej4ibvyif2o.pdf") already in the database. so I have dataset to pick it up, and now I want to know how to display/show on the browser (E:\DocumentManager\Upload\rzgtlxvmuolmhej4ibvyif2o.pdf") on the web using aspx/c# code behind.</p>
c# asp.net
[0, 9]
4,466,229
4,466,230
How to Add Horizontal line in Javascript
<p>I would like to add a horizontal seperating line on a dynamic populated table. How do I do this? Below is a snippet.</p> <pre><code> function addNewRow() { $('#displayTable tr:last').after('&lt;tr&gt;&lt;td style="font-size:smaller;" class="dataField1"&gt;&lt;/td&gt;&lt;td style="font-size:smaller;" class="dataField2"&gt;&lt;/td&gt;&lt;td style="font-size:smaller;" class="dataField3"&gt;&lt;/td&gt;&lt;/tr&gt;'); var $tr = $('#displayTable tr:last'); $tr.find('.dataField1').text($('#txtName').val()); $tr.find('.dataField2').text($('#txtAddress').val()); $tr.find('.dataField3').text('document.write("&lt;tr&gt;&lt;td colspan=\"2\"&gt;&lt;hr \/&gt;&lt;\/td&gt;&lt;\/tr&gt;"); } </code></pre>
javascript jquery
[3, 5]
5,856,305
5,856,306
What is the way to show the progress of calculations?
<p>I would like to monitor my program which is running on the web server. Can I draw the progress bar or simply show the percentage which is returned by my code? The php script is spawning the external code with parameters.</p> <pre><code> $Status="rendering..."; $cmd = "cd $rpath &amp;&amp; $envopts /home/arm2arm/bin/sph2grid"; $shellcmd=$cmd.$params.'| tee sph2grid.log '; echo '&lt;strong&gt;'.$shellcmd.'&lt;/strong&gt;'; $tmp=shell_exec($shellcmd); </code></pre> <p>then after all I am showing the log file:</p> <pre><code> &lt;?php function ViewLog() { $string = file_get_contents('../../PHP-Login/tmp/sph2grid.log'); $string = str_replace("\n", '&lt;br&gt;', $string); echo $string; } ?&gt; </code></pre> <p>Can I bind the output of my application to some <code>"&lt;div&gt;"</code>?</p> <p>Thanks in advance.</p> <p>Arman.</p>
php jquery
[2, 5]
5,458,727
5,458,728
Delete old divs if there are more than 20 | jQuery
<p>I need some help with my jQuery script. I have a page that refreshes every 10 seconds and new divs from a feed are getting appended at.</p> <p>My script counts the divs and removes the last div when there are more than 20 divs. This works fine if the feed just appends 1 div at a time. But the feed can also append multiply divs at the same time. When this happens the count can exceed the max of 20 divs. The problem with this is that my script just deletes 1 div and not all the divs that exceed the 20 count.</p> <p>This is my code:</p> <pre><code>var $auto_refresh = setInterval(function () { var $articleCount = $('div').length; if ($articleCount &gt; 20) { $('div:last-child').remove(); } $autoUpdate(); }, 10000); // refresh every 10000 milliseconds for new items </code></pre> <p>I need to remove all extra divs so there are always 20 divs. I hope someone can help me out with this.</p>
javascript jquery
[3, 5]
5,486,480
5,486,481
Passing a variable specifically from one function to another in jquery without making it global
<p>I am looking for some help in a jquery script I am in the process of creating, ill try and break it down in plain english.</p> <p>The script works off the back of a grid utilised via a <code>&lt;ul&gt;&lt;/ul&gt;</code> element, each <code>&lt;li&gt;&lt;/li&gt;</code> forms the individual component of the grid.</p> <p>If you hover over a list-item the jquery script will then expand that element to take up the entire dimensions of its parent through an animation. It stays there until the cursor is moved off and should resize itself back to its original position and it is there which I am having my problem (it seems the variable from the expand function is not passing properly into the shrink function).</p> <p>Hopefully that helps give a brief understanding, if not please view the jsfiddle example</p> <p><a href="http://jsfiddle.net/EzYeH/3/" rel="nofollow">http://jsfiddle.net/EzYeH/3/</a></p> <p>Thank you in advance anyone who could decode my ramblings and help.</p> <p>Dan.</p>
javascript jquery
[3, 5]
4,234,843
4,234,844
Java conversion to php?
<p>Is it possible to convert this java code snippet to php?</p> <pre><code>public void testBalanceReturnsToZeroOnVending() { sodaVendor.insertCoin(50); sodaVendor.insertCoin(20); sodaVendor.insertCoin(5); // The price is right! assertEquals("We have entered correct money", SODA_PRICE, sodaVendor.getCurrentBalance()); sodaVendor.dispenseItem(); assertEquals("After vending, the balance of soda vending machine is zero", 0, sodaVendor.getCurrentBalance()); } </code></pre>
java php
[1, 2]
2,851,839
2,851,840
android scale tab image
<p>I set an image for each tab and result is as expected but on some devices (tablets or some smartphone models) image is seen bigger and above text. How to solve it? Thank you.</p> <p>activity,</p> <pre><code> StateListDrawable selector = new StateListDrawable(); selector.addState(new int[] { android.R.attr.state_selected }, dSel); icon.setImageDrawable(selector); </code></pre> <p>layout,</p> <pre><code>&lt;TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@+id/mainLayout"&gt; &lt;FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:scrollbars="none" android:isScrollContainer="false"&gt; &lt;/FrameLayout&gt; &lt;TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0" /&gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p><img src="http://i.stack.imgur.com/ZE0pw.png" alt="enter image description here"><img src="http://i.stack.imgur.com/Rk7v7.png" alt="enter image description here"></p>
java android
[1, 4]
1,645,318
1,645,319
Embedding server side javascript frameworks in a Java desktop application?
<p>I've read that it's possible to embed Rhino into your Java application. Narwhal is also built on top of it by default and I was directed to <a href="http://narwhaljs.org/" rel="nofollow">http://narwhaljs.org/</a> which actually no longer exists.</p> <p>I would love to know of anything similar to nodejs,ringojs which can be embedded into my Java desktop application.</p>
java javascript
[1, 3]
1,233,775
1,233,776
Changing an input fields value in jQuery on click
<p>My site searches the Spotify Library and returns a list of results. The idea is that users can click on one of the results and have it added to a playlist which will in turn be posted as part of a form submit. The code below adds the clicked song to a .selected-list container, then adds a hidden input to the DOM with the value of the Spotify song href.</p> <p>This all works, but each time I click a new song and a new input is added, the href of all the previous added inputs changes too. I know that it's because I am identifying the .track which all the inputs have, but I can't quite figure out how to go about it. </p> <pre><code>$('.spotify-result').click(function() { $(this).clone().appendTo($('.selected-list')); $('.submit-spotify').before('&lt;input type="hidden" id="track_href" class="track" value="" name="track_href" /&gt;'); $('.track').val($('.track-href', this).text()); }); </code></pre>
javascript jquery
[3, 5]
760,851
760,852
Programming Challenge using jQuery
<p>This is a follow up to a previous question which seems to have confused people so I'll purify it a bit. Here is some markup.</p> <pre><code>&lt;div class="button width120 height30 iconLeft colorRed"&gt;&lt;/div&gt; &lt;div class="button width180 height20 iconPlus colorBlue"&gt;&lt;/div&gt; &lt;div class="button width200 height10 iconStar colorGreen"&gt;&lt;/div&gt; &lt;div class="button width110 height60 iconBack colorOrange"&gt;&lt;/div&gt; </code></pre> <p>The challenge is to fill in the code in the following.</p> <pre><code>$(".button").each(function(){ // Get the width from the class // Get the height from the class // Get the icon from the class // Get the color from the class }); </code></pre> <p>Now, I know that you shouldn't use classes this way so I'm not looking for alternative ways of doing it, this is an experiment and I'm interested to know if it's possible to do it this way.</p>
javascript jquery
[3, 5]
3,761,763
3,761,764
jquery open page in a tab and pass some POST values
<p>how can I open in a new window a php page and pass in some POST variable? I am using jquery.</p> <p>Thank you. </p>
javascript jquery
[3, 5]
5,627,719
5,627,720
android api call return simple array
<p>i am calling an api which should return an array of length between 0 to 9. Now i am not understanding how to get that array. for getting simple string other api's My code is:are working fine according to this code.</p> <pre><code>private String test(String url) { String str = null; int c; try { URL hp = new URL(url); //The String hp1 is passed in URL URLConnection hpCon = hp.openConnection(); hpCon.setUseCaches(false); hpCon.setConnectTimeout(10000); System.out.println("*url content for: " + url); InputStream input=hpCon.getInputStream(); StringBuffer sb = new StringBuffer(); while(((c=input.read())!= -1)) { sb.append((char)c); } str=sb.toString(); sb = null; //System.out.print(str); input.close(); input = null; hpCon = null; hp = null; } catch(Exception e) { } return str; } </code></pre>
java android
[1, 4]
366,691
366,692
Cancel a funcion in asp.net through javascript
<p>I have button that when an user click on it, if some fields are not correct, a message will be display but i would like to make that validation with javascript(or maybe someday i will) and i have no idea how to make that when the user click the button, the onclick funcion on the server side wont be execute.</p>
c# javascript asp.net
[0, 3, 9]
319,849
319,850
distinct and grab data while receiving it in php
<p>i have a jquery script wich send a get var with id to a page named ajaxprocess,php each time a specific element is clicked . i have 20 elements.</p> <p>the idea is create a temp table with 3 field , each time element is clicked it stores its value in field 1 , second in field 2 and third in field 3 and stop , i just want to get 3 ids stored .</p> <p>here is the code. the jQuery('#test').text(data); is to test if vars were sent. the elements are all like this : .</p> <pre><code>$(document).ready(function() { $(".element").click(function() { var path = $(this).attr('id'); $.get('ajaxprocess.php', { Path: path }, function(data) { $('#test').text(data); }); }); }); </code></pre> <p>i tried to make a count but no success. well i get perfect the first value sent when i click on an element . i want to grab this value on the database. then when i click on the second element i want to grab this second value to a second field until the third one. how can i make this ? please help</p>
php jquery
[2, 5]
4,425,944
4,425,945
jQuery click on scrollbar not registering as in the element in IE?
<p>This is referring specifically to the jQuery dropkick plugin:</p> <p><a href="http://jamielottering.github.com/DropKick/">http://jamielottering.github.com/DropKick/</a></p> <p>Scroll to the second demo where the lists overflow and there is a scrollbar. In ever browser but IE, you can interact with the scrollbar. In IE, the panel is hidden on mouse up, as if it is seeing that click as being outside of the element perhaps?</p> <p>I'd love any help trying to track down the issue.</p>
javascript jquery
[3, 5]
4,586,880
4,586,881
difference between c# and asp.net/c#
<p>do i need to be as strong in c# as an asp.net/c# developer as i would as a c# desktop application developer? there seems to be much less c# coding involved when developing asp.net websites than desktop applications. are there certain things in c# that aren't used as often when used in asp.net websites than in desktop software? i was just wondering if there were different ways of approaching learning the language depending on how it will be applied. thanks.</p>
c# asp.net
[0, 9]
1,758,882
1,758,883
Label a checkbox using jquery
<p>i'm not familiar with jquery.</p> <p>What i'm trying to do is, drag and drop a text which will be displayed as a checkbox and the checkbox should have the id and tooltip same to the dropped-text. For that i used the following code.but it's not working.please help</p> <pre><code> &lt;script type="text/javascript"&gt; $(init); function init() { function addColumn(column) { var iHtml; //Labeling and Tool Tip the Checkbox iHtml = "&lt;span title='ToolTipText'&gt;"+ "&lt;input id='&lt;%" + column + ".ClientID%&gt;' type='checkbox' name='&lt;%" + column + ".ClientID %&gt;' /&gt;"+ "&lt;label for='&lt;%" + column + ".ClientID%&gt;'&gt;MyCheckBox&lt;/label&gt;&lt;/span&gt;"; return iHtml } </code></pre> <p></p>
jquery asp.net
[5, 9]
3,781,410
3,781,411
How to add the ListActivities to the ViewPager in android?
<p>I am preparing the Swipe by using ViewPager. In my application display the 4 ListActivities by using ViewPager.I Know how to add the views in ViewPager but I dont Know how to add the ListActivity in my app. Please help me..................</p> <pre><code> private class MyPagerAdapter extends PagerAdapter { private ArrayList&lt;LinearLayout&gt; views; public MyPagerAdapter(Context context) { views = new ArrayList&lt;LinearLayout&gt;(); views.add(new ListView1Page(context)); views.add(new TextViewPage(context)); views.add(new ListView2Page(context)); views.add(new ButtonPage(context)); } @Override public void destroyItem(View view, int arg1, Object object) { ((ViewPager) view).removeView((LinearLayout) object); } @Override public void finishUpdate(View arg0) { } @Override public int getCount() { return views.size(); } @Override public Object instantiateItem(View view, int position) { LinearLayout myView = views.get(position); ((ViewPager) view).addView(myView);//addView(myView); return myView; } @Override public boolean isViewFromObject(View view, Object object) { return view == object; } @Override public void restoreState(Parcelable arg0, ClassLoader arg1) { } @Override public Parcelable saveState() { return null; } @Override public void startUpdate(View arg0) { } } </code></pre>
java android
[1, 4]
485,535
485,536
How to write a transaction to cover Moving a file and Inserting record in database?
<p>I want to have a transaction for copying a file and then inserting a record in database. something like below statement, but transaction doesn't cover copying file. What's the solution?</p> <pre><code>using (TransactionScope scope1 = new TransactionScope()) { // Copy a file fileMgr.Move(srcFileName, destFileName); // Insert a database record dbMgr.ExecuteNonQuery(insertSql); scope1.Complete(); } </code></pre>
c# asp.net
[0, 9]
3,884,816
3,884,817
Button click event not firing within use control in ASP .Net
<p>I am developing an asp web page in which I have a drop down combobox and a place holder below that. When the user selects an item from the drop down combobox, a postback is done to the server side and server loads an asp user control to the place holder in this parent page. Everything upto now is working fine.</p> <p>In the user control I have a button and the user control code behind is implemented to handle the button click event. The problem is, when I click this button, I can see that the postback is send to the server side (i.e. parent page Page_Load() is invoked in debug mode), but both the user control's Page_Load() or button click event handler is not invoked.</p> <p>Please help..</p> <p>Some additional information,</p> <ol> <li>My parent page is not an asp master page. Just a simple asp page.</li> <li>I am using VS2008 and .Net 3.5 SP1 and C#.</li> </ol>
c# asp.net
[0, 9]
2,623,264
2,623,265
Determine when a ScheduledExecutorService will fire next
<p>Is there a way to determine the current millisecond or other time measure of when a ScheduledExecutorService is going to fire next?</p> <pre><code>scheduleTaskExecutorUpdate = Executors.newSingleThreadScheduledExecutor(); </code></pre> <p>I have a longer running <code>ScheduledExecutorService(A)</code> and from a shorter running <code>ScheduledExecutorService(B)</code> I would like to update a TextView, display a countdown of when <code>ScheduledExecutorService(A)</code> is going to fire next.</p>
java android
[1, 4]
5,232,194
5,232,195
jQuery remove() not actually removing form fields in a DIV
<p>This is driving me a little bonkers,</p> <p>I have a form with a set of dynamic divs, each filled with several form fields. The user can remove one of these divs and when doing so I call jQuerys remove method on the container. </p> <p>I see in firebug that the container is destroyed and removed from the DOM. However, when I view the source of the page it is still there.</p> <p>When I post the form, the fields which should have been removed are still being posted!</p> <p>I suppose I could manually change the name of the form fields as a "hack", but am I missing something here?</p> <p>Here's an example</p> <pre><code>&lt;script language="javascript"&gt; $(document).ready( function(){ $(".remove").live("click", function(){ $(this).parents(".container").remove(); }); }); &lt;/script&gt; &lt;form&gt; &lt;div class="container"&gt; &lt;input type="text" name="name_1"&gt; &lt;a href="" class="remove"&gt;Remove&lt;/a&gt; &lt;/div&gt; &lt;div class="container"&gt; &lt;input type="text" name="name_2"&gt; &lt;a href="" class="remove"&gt;Remove&lt;/a&gt; &lt;/div&gt; &lt;input type="submit"&gt; &lt;/form&gt; </code></pre>
javascript jquery
[3, 5]
3,528,877
3,528,878
get values from links in html document with JavaScript and store them in an array
<p>I have a table with links in the html document and they looks something like (first link is just javascript:):</p> <pre><code>javascript: javascript:SelectField('{a guid}','2');return false; javascript:SelectField('{a guid}','23');return false; javascript:SelectField('{a guid}','1');return false; javascript:SelectField('{a guid}','14');return false; </code></pre> <p>I want the number after the guid.</p> <p>My current code is:</p> <pre><code>$("table").each(function(index, value) { $(this).addClass("table" + index); }); var hrefs = new Array(); $('.table449').children().children().each(function(){ var link = ($(this).find('a').attr('href')); var linkID = link.substring( link.indexOf(",'")+2, link.indexOf("');") ) hrefs.push(linkID); alert(hrefs); }); </code></pre> <p>I get the values I want in an array but the first place is "j" (without ""). I guess it is because of +2 after the indexOf but how do I get rid of the j? I only want the numbers in the array.</p> <p>Thanks in advance.</p> <p>Edit: or is there a better way to get the ID's? edit2: the alert shows j,1,2,4,5,7,8,10 and so on</p>
javascript jquery
[3, 5]
1,337,740
1,337,741
Unable to read data from the transport connection: Stream Reader Error
<p>Following code throws the error: <br/> <i>"Unable to read data from the transport connection: The connection was closed."-System.IO.IOException.</i> <br/> This method receives a URL as parameter, execute it and gets response from webserver. <br/> <br/>While reading the response by using a Stream, the line <code>liBytesRead = lStream.Read(lBytes, 0, 128);</code> inside while loop throws the quoted error.</p> <pre><code>public bool GetFromUrl(ref string psUrl, ref string rsResult, ref int piTimeoutSeconds) { System.Text.StringBuilder lStringB = new System.Text.StringBuilder(); try { WebRequest lWebRequest = WebRequest.Create(psUrl); int liTimeout = piTimeoutSeconds * 1000; lWebRequest.Timeout = liTimeout; WebResponse lWebResponse = lWebRequest.GetResponse; Stream lStream = default(Stream); lStream = lWebResponse.GetResponseStream; byte[] lBytes = new byte[129]; int liBytesRead = lStream.Read(lBytes, 0, 128); System.Text.Encoding lEncode = System.Text.Encoding.GetEncoding("utf-8"); while (liBytesRead &gt; 0) { lStringB.Append(lEncode.GetString(lBytes, 0, liBytesRead)); liBytesRead = lStream.Read(lBytes, 0, 128); } lStream.Close(); rsResult = lStringB.ToString(); return true; } catch (System.IO.IOException e) { rsResult = e.ToString(); return false; } } </code></pre> <p>Any idea why it is happening..... <br/> Thanks.</p>
c# asp.net
[0, 9]
4,435,949
4,435,950
prevent default on enter keypress in IE7
<p>I'm solving the problem with default submit button in IE7. When I press "enter" key in input field, than some button on the page is clicked. So I've found the solution for this:</p> <pre><code> $(document).bind("keypress", function(ev) { ev.keyCode == 13 &amp;&amp; ev.preventDefault(); }); </code></pre> <p>But there is the problem with this code: textarea tag don't get "new line". So I tried this:</p> <pre><code> $(document).bind("keypress", function(ev) { if (ev.keyCode == 13 &amp;&amp; ev.target.type != "textarea") ev.preventDefault(); }); </code></pre> <p>It works but looks dirty. The question is: can you advice better solution for the Problem?</p> <p>Thank you in advance.</p>
javascript jquery
[3, 5]
370,921
370,922
Display a variable in Android Widget
<p>I have a String variable that is declared and edited in the Main Activity.</p> <p>I would like it to be display in a widget, but not sure how.</p> <p>In the Widget file I have:</p> <pre><code>remoteViews.setTextViewText(R.id.widgetAmount, String.valueOf(number)) </code></pre> <p>but the number variable is declared in another class.</p>
java android
[1, 4]
180,495
180,496
jquery .animate() in a loop using the index on complete:
<p>I am working on a script that runs multiple animations at once, and based on when a new animation starts, the rest of the elements currently animating have to .stop() and move to another loation (this is working). So I built an array of animations that gets .animate()'ed when a new animation is added, and when each animation completes I need to remove it from the array. Here is the code I tried using:</p> <pre><code>for (var i = 0; i &lt; animations[key].length; i++) { animations[key][i].object.animate({ top: animations[key][i].endCoords.top, left: animations[key][i].endCoords.left }, { duration: 800, complete: function() { console.log(i); animations[key].splice(i, 1); console.log(animations); } }); } </code></pre> <p>The problem is when complete: runs, <code>i</code> is set to animations[key].length. I am pretty sure I understand why it is doing that, because the for loop is continuing before the animation is finished (which is good because it does allow me to run multiple animations at once), but is there any way to write the code so that when complete: runs it has the right index to do the splice?</p> <p>Thanks in advance!</p>
javascript jquery
[3, 5]
5,224,309
5,224,310
Image change on hover
<p>Hi, I have a HTML image that is setup like this:</p> <pre><code>&lt;input id="img" type="image" src=""&gt; </code></pre> <p>How can I change <code>src</code> on hover?</p> <p>.</p>
javascript jquery
[3, 5]
3,008,634
3,008,635
fetching client id in external javascript file
<p>How to fetch Client ID's of asp.net control in external javascript file i google it but didn't find any relevant answer if somebody can tell me or provide me some good links</p>
javascript jquery
[3, 5]
3,401,721
3,401,722
calling javascript from c#
<p>I need to use the javascript functions to show and hide an element on my page, but calling it from within a C# method. Is this possible?</p> <p>EDIT : I tried RegisterStartupScript (see below) but this did not hide the elements as I had hoped :</p> <pre><code>HidePopup("CompanyHQSetup", "$('#&lt;%=DivDataProvider.ClientID %&gt;').hide();$('#&lt;%=modalOverlay.ClientID %&gt;').hide();"); private void HidePopup(string Key, string jscript) { string str = ""; str += "&lt;script language='javascript'&gt;"; str += jscript; str += "&lt;/script&gt;"; RegisterStartupScript(Key, jscript); } </code></pre> <p>EDIT : Got around this by using a hidden field boolean to determine whether or not to hide or show the elements</p>
c# javascript
[0, 3]
5,552,726
5,552,727
Dynamically changing layout in application
<p>I want my users to have the ability to choose a few buttons which would be transferred to a different page, like a "favourite buttons" page. To do this, I need to change the layout from the app. I would like the modified layout to persist even after closing the app. Is it possible to do this?</p>
java android
[1, 4]
742,272
742,273
jQuery - double click class reveals drop down to select
<p>I am having major trouble with this.</p> <p>I am trying to write something in jQuery, when text is double clicked it hides that element and shows a select drop down... However, when the user leaves that element, the drop down should go back to the original text.</p> <p>I have tried so many methods, and none work. I tried using dblclick with hover, etc. </p> <p>In a short recap, user clicks div with text. Div is hidden select is shown. Users mouse leaves area, drop down is hidden, div is shown again.</p> <p>Thanks for the help, I have been playing with this for far too many hours!</p>
javascript jquery
[3, 5]
3,971,190
3,971,191
get elementId from event in jquery
<pre><code>function barvaInfo(event) { $(document).ready(function(){ var nid = window.event.srcElement.id; } </code></pre> <p>this works in IE but not in FF. Can i use jquery for this? i try with JQuery event api but then i do not know how to get ID from it.</p>
javascript jquery
[3, 5]
3,340,264
3,340,265
Binding a dropdown
<p>I am doing a report to display the records in Grid view based on some search parameters. In that one search filter is Drop down with Year values. The drop down should contain the years starting from 2000 to current year. If the year changes it should automatically bind the next year. How can I achieve this?</p>
c# asp.net
[0, 9]
1,674,259
1,674,260
jQuery check click for each link
<pre><code>$("#showKey").each( $(this).click(function(){ alert($(this).attr("value")); }) ); </code></pre> <p>And</p> <pre><code>&lt;a id="showKey" href="#" value="{{ customer.key }}"&gt; &lt;span class="icons icon-key"&gt;&lt;/span&gt; Show key &lt;/a&gt; </code></pre> <p>The alert gives and undefined output, just 'undefined'. I have a list of customers and a click on #showKey should reveal the key for the clicked customer.</p> <p>Whats wrong with my code?</p>
javascript jquery
[3, 5]
5,484,725
5,484,726
jquery filter out specific element
<p>I'm implementing accordion-style behavior, where only one element can be displayed at one point. I thought it'd be simplistic to implement a <code>show(e)</code> function that takes an element, <code>e</code>, to be displayed and hides everything BUT <code>e</code>. It saves me the hassle of keeping track of which element is being displayed as well. I could just attach <code>show(e)</code> as a callback to each element of the accordion.</p> <p>To do so, I was thinking the only way is to use <code>.each()</code> to iterate through all the elements ad compare each one to <code>e</code>, hiding it if it isn't equal to <code>e</code>.</p> <p>However, I recall there being a jQuery <code>.filter</code> function (http://api.jquery.com/filter/) but it only matches with the element, and not the opposite. (i.e. if I call the function and pass it <code>e</code> it'll only match <code>e</code> and not everything BUT <code>e</code>.)</p> <p>Is there any way to do so, or are there any recommendations for creating an accordion in general? Thanks in advance!</p>
javascript jquery
[3, 5]
328,515
328,516
JQuery extract string multiple time
<p>Given the following HTML that is in a JavaScript string variable I'd like to extract into an array the values 1234, 5678, 9012 using JQuery:</p> <pre><code>&lt;input type="hidden" id="name" value="1234"/&gt; &lt;input type="hidden" id="name" value="5678"/&gt; &lt;input type="hidden" id="name" value="9012"/&gt; </code></pre> <p>I've tried various reg expressions, but I'm having trouble looping or <code>$each</code> round the string to find all the <code>values="xxxx"</code></p>
javascript jquery
[3, 5]
2,494,308
2,494,309
How do i validate a field based on the input of another field
<p>i have 2 fields and i need to make one of the fields a required fields only if the other field has content of "NO" value in it. So i have researched online and this is what i ended up having. The only question i have and need help with this is the first part of the code where it calls this: .getElementByID. How can i construct that or if you could shed some lights on will be great. thanks.</p> <pre><code>&lt;script&gt; function Validate(source, args) { if (document.getElementById('&lt;%= TextBox1.ClientID %&gt;').value.toUpperCase() == "NO" &amp;&amp; document.getElementById('&lt;%= TextBox2.ClientID %&gt;').value.length == 0) args.IsValid = false; else args.IsValid = true; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;asp:TextBox ID="TextBox2" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="TextBox2 Should Be Filled" Display="Dynamic" ClientValidationFunction="Validate" OnServerValidate="CustomValidator1_ServerValidate"&gt;&lt;/asp:CustomValidator&gt; &lt;asp:Button ID="Button1" runat="server" Text="Button" /&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Page.Validate(); if (!Page.IsValid) Response.Write("TextBox2 should be filled"); } } protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) { args.IsValid = !(this.TextBox1.Text.Equals("NO", StringComparison.CurrentCultureIgnoreCase) &amp;&amp; this.TextBox2.Text.Length == 0); </code></pre>
c# asp.net
[0, 9]
2,540,245
2,540,246
Passing two values for ajaxForm(), using jQuery and PHP
<p>I want to pass both the values using ajaxForm, displaying both the values separately in test.php</p> <pre><code>-------test.php----------------------------------------- &lt;script language="javascript" type="text/javascript"&gt; $('#test_form').ajaxForm({ target:'#result', success:function() { $('#result').show(); } }); &lt;/script&gt; &lt;form id="test_form" method="" action="test1.php"&gt; &lt;input type="submit" id="sub" value="sub_value"&gt; &lt;/form&gt; &lt;div id="result"&gt;&lt;/div&gt; -------test1.php--------------------------------------- &lt;? $t="test value"; $u="test value 1"; ?&gt; </code></pre> <p>Thanks Jean</p>
php jquery
[2, 5]
1,789,148
1,789,149
delete record in jqgrid in asp.net
<p>i want to delete a record in jqgrid. for this i have the image and when the user clicks on this the record is getting deleted.but i want to show the confirm box and when true then only the record should get deleted. so any one can tell how to call javascript in jqgrid. my jqgrid is jQuery(document).ready(function() { jQuery("#list47").jqGrid({ url: 'AddFilterGrid.aspx?Show=ViewFilter', datatype: "json", id: "FilterName", colNames: ["SubCategory", "Filter", 'Delete','Edit'], colModel: [ { name: 'CategoryName', index: 'CategoryName', width: 150, align: 'left', sortable: true, sorttype: 'text' }, { name: 'FilterName', index: 'FilterName', width: 150, align: 'left', sortable: true, sorttype: 'text' }, </p> <pre><code> { name: 'f', index: 'f', width: 100, align: "center", formatter: 'showlink', formatter: formateadorLinkDelete }, { name: 'FilterId', index: 'FilterId', width: 100, align: "center", formatter: 'showlink', formatter: formateadorLinkEdit }, ], height: 280, width: 650, //autowidth: true, mtype: "GET", pager: '#plist47', rowNum: 10, rowList: [10,20,30,40], repeatitems: false, viewrecords: true, sortname: 'FilterName', viewrecords: true, sortorder: "desc", gridview: true, imgpath: '/Scripts/themes/redmond/images' }); }); </code></pre>
asp.net jquery
[9, 5]
5,077,365
5,077,366
Dot notation for hierarchical related string values
<p>I have a lot of constant string values in my application which I want to have as strongly typed objects in C# for code reuse and readability. I would like to be able to reference the string value like so:</p> <pre><code>Category.MyCategory //returns a string value ie “My Category” Category.MyCategory.Type.Private //returns a string value ie “private” Category.MyCategory.Type.Shared //returns a string value ie “shared” </code></pre> <p>I have started by implementing the following classes each containing a list of public string valued fields with a public property which exposes the child.</p> <p>Category, MyCategory, Type</p> <p>However I already know this is not the way to go so could do with a bit of advice on this one.</p> <p>An example of this is where I am using the Syndication classes to add a category to an atom feed. I am creating the items in this feed dynamically so need to use the notation as shown.</p> <pre><code>item.Categories.Add( new SyndicationCategory { Scheme = Category.PersonType, Label="My Category", Name=Category.MyCategory.Type.Private }); </code></pre>
c# asp.net
[0, 9]
1,938,086
1,938,087
Get Values of Dropdown based on First Dropdown selected
<p><strong>PHP/MYSQL</strong></p> <pre><code>&lt;div style="width:810px; margin:inherit; padding-left:170px;"&gt; &lt;select style="width:300px;" id="n" name="userListingCateory"&gt; &lt;option disabled="disabled"&gt;Category...&lt;/option&gt; &lt;?php while($row = $sth2-&gt;fetch(PDO::FETCH_ASSOC)) {echo "&lt;option value=". $row['catID'] . "&gt;" .$row['catName']."&lt;/option&gt;";} unset($sth2); ?&gt; &lt;/select&gt; &lt;select style="width:340px;" id="n" name="userListingSubCateory"&gt; &lt;option disabled="disabled"&gt;Sub-Category...&lt;/option&gt; &lt;?php while($row = $sth3-&gt;fetch(PDO::FETCH_ASSOC)) {echo "&lt;option value=". $row['scatID'] . "&gt;" .$row['scatName']."&lt;/option&gt;";} unset($sth3); ?&gt; &lt;/div&gt; &lt;/select&gt; </code></pre> <p>This HTML above gets all categories and sub-categories in two tables <code>[Category]</code> and <code>[SubCategory]</code></p> <p>The php/mysql that needs to run upon clicking the <code>[Category]</code> dropdown would look like:</p> <pre><code>SELECT scatID, scatName FROM Category C, SubCategory SC WHERE C.catID = SC.catID AND C.catID = $origCatIDSelected; </code></pre> <p>How do I get this to get the <code>sub-categories</code> based on which <code>category</code> is chosen?</p> <p>Is there any easy way to implement in jquery/php?</p> <p>Thanks</p>
php javascript jquery
[2, 3, 5]
1,237,684
1,237,685
geocoder.getLocations result in a var
<p>I've waste a lot of time, but I'm not able to do it.</p> <p>I'll appreciate help.</p> <p>How to get the result of the inverse geolocation in a variable?</p> <p>here is the script:</p> <pre><code>geocoder = new GClientGeocoder(); geocoder.getLocations('43.3372814,(-1.79548311)', showAddress); function showAddress(response) { place = response.Placemark[0]; point = new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]); marker = new GMarker(point); map.addOverlay(marker); return(place.address); } </code></pre> <p>I've tried to do:</p> <pre><code>var address = geocoder.getLocations('43.3372814,(-1.79548311)', showAddress); </code></pre> <p>but with no result.</p> <p>Really thnx for your help</p>
javascript jquery
[3, 5]
4,822,658
4,822,659
Eventmanager that calls other objects' functions
<p>I'm using javascript and jQuery. I have a "problem" that my web app has different views, and one action (like mouse click) should do different things in the different views.</p> <p>I've created an ActionManager that get's notified when an click event is fired. This manager object knows about the current view. Now I wan't the actionmanager to be able to trigger a function in different objects.</p> <p>What I've done is that the manager gets an instance of the different objects. This is done via a registration when they are initialized, where they register what kind of event they wan't to handle and what kind of view they are responsible for. </p> <p>the problem is that I want to make this as generic as possible, so that the actionmanager doesn't need to know about what the name of the function that is gonna be called is. Then the different instances can have different function names without letting the actionmanager to know about it. I could let the registration part store the function name for that event in that instance by sending a reference to the function, but then I can't do this:</p> <pre><code>myfunc : function (myinstance, myfunction) { myinstance.myfunction(); } </code></pre> <p>that will assume that myfunction() exists as a function in myinstance, and not use the real function name which could be "onMouseClick".</p> <p>Edit: Explanation for others seeing this tread and wondering why: The reason for my eventmanager is that I want to only add one click event on the elements that need it, and not changing the click event code. I also want to only call one method and run the code in that method. I don't want to call several methods and let the methods decide based on the view if they should run or not.</p>
javascript jquery
[3, 5]
3,475,490
3,475,491
How do I use JQuery to add an event to a textbox when the user pushes enter?
<p>And please don't submit the form when the user pushes enter on THAT SPECIFIC textbox.</p>
javascript jquery
[3, 5]
2,705,719
2,705,720
Postback using javascript
<p>How to cause a postback using javascript in ASP.NET.</p>
asp.net javascript
[9, 3]
2,596,582
2,596,583
Could this code create a potential memory leak?
<p>I'm using a custom Database class in my code to manage my database and handle transactions. Whenever I instantiate it, I pass the application context to it's constructor. Reading up on the articles at the Android developer site makes me wonder if I'm doing something that could cause a huge memory leak in my application. Simplified, my code looks like this, first off an activity:</p> <pre><code> public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.somelayout); Database db = new Database(getApplicationContext()); } } </code></pre> <p>And my database class (in a seperate file) looks like this:</p> <pre><code>public class Database { Context context; public Database(Context context) { this.context = context; } public DatabaseHelper extends SQLiteOpenHelper { // Pass the context to the constructor etc etc. } } </code></pre> <p>The code might have bugs, I wrote it quickly in notepad. Anyway, this got me worried that the db object keeps the context when the user navigates away from the activity, thus uneccesarily spending a huge amount of resources. If this is indeed the case, how can I avoid this? Is there a way to destroy and object when it is no longer needed?</p>
java android
[1, 4]
3,224,573
3,224,574
Javascript Variable value in PHP
<p>I have my code look like this </p> <pre><code>var bal=$(this).val(); var findbalance="&lt;?=balancefromid(bal);?&gt;"; alert(findbalance); </code></pre> <p>is that possible?</p>
php javascript
[2, 3]
5,393,223
5,393,224
Jquery event binding won't work when called as a method but will when called directly in console
<p>I have a maddening problem. I have a table that contains rows consisiting of text inputs and selects. I have custom method I have definied that when called in the code, or in the console, it does not bind the click event any of the selects. Only the text inputs. However, if I copy and paste the code of the method directly in the console, it works just fine. Below is my code.</p> <pre><code>addEditHandler : function(){ $('#table2 .ui-icon-pencil').click(function(){ $(this).parent().parent().parent().addClass("editing").find('input, select').removeAttr("readonly").css("background-color","white"); $('#table2 .ui-icon-disk').eq($(this).parent().parent().parent().index()).show(); $('#table2 .ui-icon-trash').eq($(this).parent().parent().parent().index()).show(); $('#table2 .ui-icon-triangle-2-n-s').eq($(this).parent().parent().parent().index()).show(); $('#table2 .ui-icon-pencil').hide(); if(addComponents.getCurrentComponents(getBOM.rawXML).size()&gt;0){ addComponents.add(); addComponents.populateComponents(); } }); }, </code></pre> <p>I am mostly focused on this main line:</p> <pre><code> $(this).parent().parent().parent().addClass("editing").find('input, select').removeAttr("readonly").css("background-color","white"); </code></pre> <p>Calling this method doesn't apply the formatting to the selects, just the text boxes. Copying and pasting the EXACT code into the console does. At a loss.</p> <p>Thanks in advance! </p>
javascript jquery
[3, 5]
4,260,115
4,260,116
C# Declaring Multiple Instances of the Same Table
<p>I have a table that needs 27 drop down menus in 27 cells to accept user input. Currently I am declaring all 27 of them like this:</p> <pre><code>DropDownList DropList1 = new DropDownList(); DropList1.ID = "TrendList1"; DropList1.AutoPostBack = true; DropList1.SelectedIndexChanged += new EventHandler(this.Selection_Change); DropList1.DataSource = CreateDataSource(); DropList1.DataTextField = "ColorTextField"; DropList1.DataValueField = "ColorValueField"; DropList1.DataBind(); DropDownList DropList2 = new DropDownList(); DropList2.ID = "TrendList2"; DropList2.AutoPostBack = true; DropList2.SelectedIndexChanged += new EventHandler(this.Selection_Change); DropList2.DataSource = CreateDataSource(); DropList2.DataTextField = "ColorTextField"; DropList2.DataValueField = "ColorValueField"; DropList2.DataBind(); etc... </code></pre> <p>However I know there has to be a better way than the brute force code I have written. Unfortunately I am new to web programming and I haven't been able to figure out a better way to do this.</p> <p>Any advice is appreciated.</p> <p>Regards.</p>
c# asp.net
[0, 9]
1,344,681
1,344,682
refreshing javascript result after some time
<p>I am making a site which displays result according to user's input. Now its based on javascript. I want to refresh this query made by javascript after some seconds and new results. This is what i want - </p> <p>The whole page shouldn't refresh completely. only new results for the same query should appear.</p>
javascript jquery
[3, 5]
84,816
84,817
Internal page refresh with JavaScript
<p>I have a form and everytime some performs a onchange()-event, the page should run my javascript code again (but a refresh of the page using a new url request is not an option).</p> <p>Any idea? I know this must be very simple.</p> <p>my javascript-code:</p> <pre><code> $(document).ready(function(){ formObject = document.forms['newBom']; var vendor = formObject.elements['inptHardware'].value; console.log('selected vendor: ' + vendor); var product = formObject.elements['inptProduct'].value; console.log('selected product: ' + product); }); </code></pre>
javascript jquery
[3, 5]
2,716,566
2,716,567
fetch values from cross browsers cookie
<p>Can we Fetch Values from Cross Browser Cookie ??? For Example USer Can use mozilla or chrome or any other browser </p> <p>when we <code>print_r($_COOKIE);</code></p> <p>All Browsers Cookie Will Print. </p>
php javascript
[2, 3]
4,966,536
4,966,537
Android:converting int to string and passing to methods
<p>Hi I am using the android wheel and getting the values of the time as below</p> <pre><code> //get values of the wheel hourvalue = hours.getCurrentItem(); Log.d(TAG, "hour value" +hourvalue ); minutevalue = mins.getCurrentItem(); Log.d(TAG, "minute value" +minutevalue ); </code></pre> <p>i want to pass them to a method as string , how can i do that and also iam getting the values of hours and minutes separately i want to store the hours and minutes in a single string variable anAndroid :numberpicker in alert dailog</p> <pre><code>private String getTraceId(String fbuserser,int hour) { String traceId = null; HttpClient client = new HttpClient(); GetMethod get = null; try { get = new GetMethod("http://" + Constants.CLOUD_SERVER_URL + Constants.facebookTrace); NameValuePair[] params = new NameValuePair[4]; NameValuePair param = new NameValuePair(); param.setName("gadget"); param.setValue("gettraceid"); params[0] = param; param = new NameValuePair(); param.setName("fbuserid"); param.setValue(fduserUser); params[1] = param; param = new NameValuePair(); param.setName("expiry"); -------------&gt; param.setValue(hour); params[2] = param; get.setQueryString(params); int statusCode = client.executeMethod(get); traceId = get.getResponseBodyAsString(); } catch (Exception e) { Log.e(TAG, "For Facebook Trace Id:", e); } finally { get.releaseConnection(); get = null; } return traceId; </code></pre> <p>In the above method i want to pass <code>int hour</code> as string.Any help is appreciated</p>
java android
[1, 4]
488,404
488,405
Is safe to put variables in a onclick definition?
<p>This is a really newbie question.</p> <p>I've managed to get some jQuery stuff running quite smootly but i ended up having many events like this one..</p> <pre><code>&lt;div class="aClass" id="B436" onclick="updateSearch('B436', '','Brand','193557', 0)"&gt;My Name&lt;/div&gt; </code></pre> <p>Now i'm wondering if it's "safe" to put all my necessary function variables in this way. I check everything in the function so even if with firebug someone change some values they can't hurt much but... is this the correct way to do ?</p> <p>Thanks</p>
javascript jquery
[3, 5]
1,436,946
1,436,947
div fades out if mouse does not hover over it
<p>I want code in which a div fades out if mouse does not hover over it. This is the code which makes the div visible. As soon as it is displayed it fades out. I want that if a user hovers over it while it is fading out it stops fading and becoming as it was initially. And then as user hovers out of it it fades again.</p> <pre><code>$('#popuup_div').css({left:leftVal,top:topVal}).show().fadeOut(2000); </code></pre>
javascript jquery
[3, 5]
2,727,964
2,727,965
Subtract from a integer using jquery
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/12354458/subtract-from-an-integer-using-jquery">Subtract from an integer using jquery</a> </p> </blockquote> <p>I want to subtract 50 from the offset of a div. My code is this.</p> <pre><code>if (scroll) { $('html, body').animate({"scrollTop": $(scroll).offset().top - 50}); $(scroll).css('color', 'blue'); $(scroll).mouseleave(function() { $(this).css('color', 'black'); }); } </code></pre> <p>But this isn't working. Can someone help me ?</p>
javascript jquery
[3, 5]
3,693,854
3,693,855
dynamically adding validators
<p>In my case I would like to dynamically add validators to my control based on given logic. For each control I first check something in my DB and if it goes aout that field is required I would like to add requiredField to that control. I firt iterate through each control and if its required I add attribute required="true".</p> <p>I added this code but it doens work I mean nothing happens, none validation is being made.</p> <pre><code>if(gc.Attributes["controlid"] != null) { RequiredFieldValidator validator = new RequiredFieldValidator(); validator.ControlToValidate = gc.Attributes["controlid"]; validator.ErrorMessage = gc.Attributes["errormessage"]; this.Controls.Add(validator); } </code></pre> <p>Thanks for any suggestions.</p>
c# asp.net
[0, 9]
4,404,693
4,404,694
c# Compilation on runtime
<p>I am working on a C# Web application which in fact the user is going to built through this application a new web application with his requirements. It is going to be like an Object relational mapping online platform. For this i will need a runtime compiler. I found some examples for winforms projects but nothing for web application runtime compilation. Any help or examples from where can i start? </p>
c# asp.net
[0, 9]
3,115,349
3,115,350
checkbox image replacement,nothing happend
<pre><code>&lt;?php //require 'includes/db.inc.php'; require 'includes/configs.inc.php'; ?&gt; &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;?php $site_name ?&gt;&lt;/title&gt; &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt; &lt;link rel="stylesheet" type="text/css" href="/css/style.css"&gt; &lt;script type="text/javascript" src="/js/jquery.imageTickBox.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; jQuery(document).ready(function(){ jQuery("input:[type=checkbox]").imageTickBox({ tickedImage: "/images/checked.png", unTickedImage: "/images/unchecked.png", imageClass: "tickbox" }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="mirror" class="center"&gt; &lt;!--some code deleted--&gt; &lt;input type="checkbox" id="Music" name="hobbies[]" value="Music"&gt; &lt;!--some code deleted--&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>any wrong with the code above????name index.php and put it on root dir.</p> <p>but not work , i see the jquery checkbox plugin guide at </p> <p><a href="http://blog.leenix.co.uk/2009/10/jquery-plugin-imagetickbox-change-any.html" rel="nofollow">http://blog.leenix.co.uk/2009/10/jquery-plugin-imagetickbox-change-any.html</a></p>
javascript jquery
[3, 5]
3,336,211
3,336,212
quick [php function] -> [javascript function] question
<p>if anyone fancies doing me a really quick favour, it would be really appreciated:</p> <pre><code>static function make_url_safe($z){ $z = strtolower($z); $z = preg_replace('/[^a-zA-Z0-9\s] /i', '', $z); $z = str_ireplace(' ', '-', $z); return $z; } </code></pre> <p>what js functions should i be looking at to convert this function to javascript?</p>
php javascript
[2, 3]
4,136,848
4,136,849
Initializing JavaScript Variables on Server Side
<p>I am having problems setting JavaScript variables on the Server Side in ASP.Net Web Forms (Not MVC) using Master Pages.</p> <p>Basically I want to do something like this:</p> <pre><code>&lt;script type="text/javascript"&gt; var z = '&lt;%# Request.QueryString["Env"] %&gt;'; &lt;/script&gt; </code></pre> <p>After I run the code I see: var z=’’;</p> <p>I also tried: </p> <p>var z = '&lt;%= Request.QueryString["Env"] %>';</p> <p>After I run that code I get the following error so I assume that is not correct:</p> <p>The Controls collection cannot be modified because the control contains code blocks (i.e. &lt;% ... %>).</p> <p>I have been doing mainly MVC development these past few years so I am not sure what I am doing wrong.</p> <p>Please let me know. </p> <p>Thanks</p>
javascript asp.net
[3, 9]
5,245,600
5,245,601
Read Gridview exact rows after adding a dynamically added header?
<p>I am adding a table header row dynamically as shown below. It is rendered correctly. So now I have 2 headers.</p> <pre><code>protected void gvCustomers_RowDataBound(object sender, GridViewRowEventArgs e) </code></pre> <p>{</p> <pre><code>if (e.Row.RowType == DataControlRowType.Header) { GridViewRow newHeaderRow = new GridViewRow(-1, -1, DataControlRowType.Header, DataControlRowState.Normal); TableCell cell1 = new TableHeaderCell(); cell1.ColumnSpan = 1; //e.Row.Cells.Count; cell1.Text = "Expected"; TableCell cell2 = new TableCell(); cell2.ColumnSpan = 2; cell2.Text = "One"; TableCell cell3 = new TableCell(); cell3.ColumnSpan = 2; cell3.Text = "Two"; TableCell cell4 = new TableCell(); cell4.ColumnSpan = 2; cell4.Text = "Three"; newHeaderRow.Cells.Add(cell1); newHeaderRow.Cells.Add(cell2); newHeaderRow.Cells.Add(cell3); newHeaderRow.Cells.Add(cell4); ((GridView)sender).Controls[0].Controls.AddAt(0, newHeaderRow); } </code></pre> <p>}</p> <p>If my gridview is having 3 rows, and loop through gridview it will read only 2 row. It is skiping the last row.</p> <p>Any thoughts</p>
c# asp.net
[0, 9]
4,936,573
4,936,574
fill drop down list
<p>How do i fill radio button list and drop downlist from database.</p>
c# asp.net
[0, 9]
736,768
736,769
Can I use contains inside of a find in jQuery?
<p>I have this html:</p> <pre><code>&lt;table&gt; &lt;tr id="1"&gt;&lt;td&gt;test&lt;/td&gt;&lt;td id="90"&gt;value&lt;/td&gt;&lt;/tr&gt; &lt;tr id="2"&gt;&lt;td&gt;another&lt;/td&gt;&lt;td id="98"&gt;somthing&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; </code></pre> <p>and this jquery:</p> <pre><code> $("tr td:nth-child(2)").find(":contains('value')").each(function(){ alert($(this).parent().attr("id")); }); </code></pre> <p>I had assumed this would work, but it doesn't alert anything. If I remove the <code>find</code> portion it will alert with both values. Is there a way that I can include the find somehow?</p> <p>Here is the fiddle:</p> <p><a href="http://jsfiddle.net/B4wMp/2/" rel="nofollow">http://jsfiddle.net/B4wMp/2/</a></p>
javascript jquery
[3, 5]
1,089,942
1,089,943
Confused on scoping and this
<p>I received a code snipper from here: <a href="http://jsdude.wordpress.com/2012/12/19/jquery-event-callbacks-and-javascript-oop-methods/" rel="nofollow">http://jsdude.wordpress.com/2012/12/19/jquery-event-callbacks-and-javascript-oop-methods/</a>:</p> <pre><code> var CounterButton = function(el){ this.$el = $(el); this.counter = 0; this.bindEvents(); this.myVal = 1; } CounterButton.prototype.bindEvents = function(){ this.$el.click(this.clicked); }; CounterButton.prototype.clicked = function(){ this.increase(); this.showMessage(); }; </code></pre> <p>I am trying to figure out this specific line: <code>his.$el.click(this.clicked);</code>. When you have <code>this</code> inside the <code>click</code> function does that refer to whats being clicked on which would be <code>this.$el</code>?</p>
javascript jquery
[3, 5]
3,390,046
3,390,047
jquery function passsing variables
<p>hi i am building a php mysql database pagination page, so i have a list of records 2 rows long at the bottom of the record i want a div which opens up when the span above it is clicked, how do i set up the jquery to make it so that it takes the id of the <code>&lt;p&gt;</code> and expands it in jquery</p> <pre><code>&lt;span id="button1"&gt;Toggle&lt;/span&gt; &lt;p id="p1"&gt; hello&lt;br/&gt;hello &lt;/p&gt; &lt;script&gt; $("#button1").click(function () { $("#p1").slideToggle("slow"); }); &lt;/script&gt; </code></pre> <p>when i output it in php mysql the button will all have a different id and the p will have different ids as well</p>
php jquery
[2, 5]
5,032,931
5,032,932
How to update view in a cursor adapter?
<p>I have extended a cursor adapter</p> <pre><code>public class MyAdapter extends CursorAdapter { MyAdapter(View view, Context context, Cursor cursor) { ... } public void bindView(View view, Context con, Cursor c) { if (OtherClass.currentlyPlaying.equals(ring)) { TextView.setTextColor(Color.red); } } } </code></pre> <p>The 'currentlyPlaying' is a string in another class that corresponds with a title that is currently playing. The 'ring' is a title that is found when binding the view in the adapter. I have the textview change color when it's selected. When it's selected it changes colors, but when I click another item in the listview it changes color too, but the old item that was selected remains the same color. </p> <p>Can anyone tell me if there is a way to update the view or how I would be able to apply maybe a viewholder to this? Thanks!</p>
java android
[1, 4]
2,815,790
2,815,791
Why isn't this code jquery working?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1970793/changing-password-field-to-text-with-checkbox-with-jquery">changing password field to text with checkbox with jquery</a> </p> </blockquote> <p>The code is supposed to check if a checkbox is checked, then change a password field from password to regular text and vice versa. </p> <pre><code>$('#cpassword_lf').change(function(){ if($('#cpassword_lf').is(':checked')) { $('#password_loginform').attr('type', 'text'); } else { $('#password_loginform').attr('type', 'password'); } }); </code></pre>
javascript jquery
[3, 5]
1,667,765
1,667,766
Creating an international website
<p>The question might sound weird, but I am planning to create a asp.net website, which when fully done, will ideally cater to all countries.</p> <p>I am currently in the architecture phase.. and is there anything that I should keep in might when doing this?</p> <p>like<br> saving all datetime fields in utc<br> using user's timezone to display all time related data<br> all labels in the website to be localizable </p> <p>is there anything else??</p> <p>thanks,<br> Chris</p>
c# asp.net
[0, 9]
4,962,898
4,962,899
What is the equivalent jQuery code to the following JavaScript which saves off onclick events?
<p>So in JavaScript I can do the following:</p> <pre><code>var someObj = document.getElementById("foo"); var fooClick = foo.onclick; var someOtherObj = document.getElementById("bar"); someOtherObj.onclick = fooClick; </code></pre> <p>I'm wondering, what is the jQuery equivalent to the code above?</p> <p>Thanks!</p>
javascript jquery
[3, 5]
3,372,310
3,372,311
change color of bottom boundary upto certain range
<p>hi everyone is there any way to change the color of bottom boundary of a div up-to certain distance or range (i.e. not complete bottom border). i am using the following code but it will change the color of complete bottom:</p> <pre><code>style.borderBottom = "2px solid blue"; </code></pre>
javascript jquery
[3, 5]
4,228,897
4,228,898
How to find extension of a file?
<p>in my web application (asp.net,c#) i am uploading video file in a page but i want to upload only flv videos. how can i restrict when i upload other extension videos help me please.</p>
c# asp.net
[0, 9]
1,270,621
1,270,622
Jquey - Text replace on string
<p>I have code which check all the checkboxes and add or remove checked status (this part is working). I need to change text when this function is clicked from "Select All" to "De-select All". Button to select all:</p> <pre><code>&lt;a class="zute_strane_izmena_selektuj_sve"&gt;Select All&lt;/a&gt; </code></pre> <p>Jquery code:</p> <pre><code>var selektuj_sve = $('.zute_strane_izmena_selektuj_sve'), slike = $('.zuta_strana_trenutne_slike'), box = slike.find(':checkbox'); selektuj_sve.on('click', function(){ box.attr('checked', !box.is(':checked')); }); </code></pre> <p>What I need to do?</p>
javascript jquery
[3, 5]
2,549,545
2,549,546
jQuery append an element more than once
<p>I'm currently trying to add n number of divs to the bottom of the body, however using this code: </p> <pre><code>star = $('&lt;div class="star" /&gt;'); for(i=0; i&lt;12; i++) { $('body').append(star); } </code></pre> <p>results in just one div being appended to the bottom of the body. I'm guessing this is because the content of the body is not being refreshed between each iteration of the for loop, but can't figure out how to best to solve it.</p>
javascript jquery
[3, 5]
4,236,466
4,236,467
Make Image visible true in a button click event
<p>I have image in my aspx page and i want to make it visible true in an button click event . .I made it as visible false in pageload and again making visible true in the button click event...</p> <p>Please any one can solve my problem</p>
c# asp.net
[0, 9]
4,415,634
4,415,635
jQuery toggle help
<p>Currently, clicking on the h2 tag toggles the div with slideToggle. However, I'm trying to also fade in and out the <code>.hint_text_heading</code> that exists within the h2 tag. So, originally, what I tried to do at least, I am adding an <code>.active</code> class to the h2 tag thats open, then fading in the <code>.hint_text_heading</code>. However, I can't get <code>.hint_text_heading</code> to fade out when I close the div.</p> <p>Any suggestions? Thanks!</p> <h1>html</h1> <pre><code>&lt;h2 class="collapsible_head"&gt;This is a title.&lt;span class="hint_text_heading"&gt;This is a hint.&lt;/span&gt;&lt;/h2&gt; &lt;div&gt; This is the toggled content. &lt;/div&gt; </code></pre> <h1>jquery</h1> <pre><code>$(document).ready(function(){ $('span.hint_text_heading').hide(); $('h2.collapsible_head').click(function() { $(this).next().slideToggle('slow'); $(this).toggleClass('active'); $('h2.active span.hint_text_heading').fadeIn(); }).next().hide(); }); </code></pre> <p>UPDATE/</p> <p>Here's an example in jsFiddle. As you can see, the div toggles, and the hint text fades in, however, when the div is hidden, the hint text remains. I am trying to get that to fade out:</p> <p><a href="http://jsfiddle.net/UGHgx/" rel="nofollow">http://jsfiddle.net/UGHgx/</a></p>
javascript jquery
[3, 5]
982,908
982,909
Javascript: Add a class where class
<p>I am working with js and i need to remove one class and add another, in this case visible and invisible(self explanatory css i think), to all elements with the class 'edit'. Is it possible to use a class as a selector for adding a class?</p> <p>I have tried:</p> <pre><code>$(function){ $('#hide').click(function(){ $('.edit').addClass('visible'); }); }; </code></pre> <p>This does not work. Any ideas? </p>
javascript jquery
[3, 5]
5,088,271
5,088,272
Help with Jquery function
<p>Ok, Here is my problem:</p> <p>I have this function in a third party javascript library defined as <code>RedirectLink(a,b,c,d,e)</code> where a,b,c,d,e are strings.</p> <p>I also have a link in my webSite which is again autogenerated (And I can't change it)</p> <pre><code>&lt;a href="javascript: RedirectLink("1", "2", "3" ,"4" ,"5")" id="mylink" &gt; </code></pre> <p>What I need to do is, read this anchor's (mylink) href and I need to call RedirectLink function such as <code>javascript: RedirectLink("1", "2", "3" + param, "4" , "5")</code>. where <code>param</code> will come from query string.</p> <p>The first part is easy, reading the href but how to alter the third parameter ?</p>
javascript jquery
[3, 5]
5,855,833
5,855,834
how to save value onDestroy or onStop and get it back with the program launch again?
<p>I wonder if I could save a value (in my program its an index) so I could call it back when the program launches back again (even if the program destroyed) and the user could start from where finish.</p> <p>Thanks </p>
java android
[1, 4]
739,407
739,408
Passing multiple values from MYSQL/PHP table to jQuery
<p>Basically, I have working solution for this, but I'm wondering if it could (should?) be done better in some other way.</p> <p>I have table I'm creating in PHP with values from MYSQL. Each item in table has multiple values. In each line there is single link and clicking on this link fires up jQuery function. In each link there is also VALUE attribute with values from multiple MYSQL fields and joined with &amp;&amp;:</p> <p>PHP code is:</p> <pre><code> foreach ($this-&gt;_data as $l) { ?&gt; ... &lt;td&gt;&lt;a href="#" class="clickMe" value="&lt;?php echo $l-&gt;data1 . '&amp;&amp;' . $l-&gt;data2; ?&gt;"&gt;Link&lt;/a&gt;&lt;/td&gt; ... &lt;?php } </code></pre> <p>And jQuery function to fire up when clickin' on link is:</p> <pre><code>$(".clickMe").click(function() { myData = $(this).attr('value').split('&amp;&amp;'); }); </code></pre> <p>Script splits string in VALUE attribute on &amp;&amp; and creates an array myData with values:</p> <p>myData[0] => value passed from $l->_data1 in PHP</p> <p>myData[1] => value passed from $l->_data2 in PHP</p> <p>Is this the right way to do it?</p>
php jquery
[2, 5]
3,881,397
3,881,398
Target individual class function instead of the whole class group
<p>I have a script that shows more info when clicked and when clicked again it hides the info. The problem is that when clicked it shows and hides information of all the div's with the same class name instead of only the one that was clicked. I was looking around and I would think that I need to add "this" somewhere in it so that it only affects the clicked object. Could someone explain what I am doing wrong and how to achieve this effect?</p> <p>Javascript</p> <pre><code> &lt;script type="text/javascript"&gt; this$(document).ready(function(){ $(".toggle").click(function(){ $(".hiddenDiv").slideToggle("slow"); }); }); &lt;/script&gt; </code></pre> <p>HTML</p> <pre><code> &lt;span class="toggle" onClick='return false'&gt; &lt;h4 class='arrow'&gt;Group Health Insurance&lt;/h4&gt; &lt;/span&gt; &lt;div class='hiddenDiv'&gt; &lt;p&gt;&lt;img src="../images/group.jpg" border="0" alt="Group Insurance" align="left" hspace="5" /&gt;Group health insurance coverage is a policy that is purchased by an employer and is offered to eligible employees of the company blah blah blah&lt;/p&gt; &lt;/div&gt; &lt;hr /&gt; &lt;span class="toggle" onClick='return false'&gt; &lt;h4 class='arrow'&gt;Insurance&lt;/h4&gt; &lt;/span&gt; &lt;div class='hiddenDiv'&gt; &lt;p&gt;&lt;img src="../images/group.jpg" border="0" alt="Group Insurance" align="left" hspace="5" /&gt;More info about other types of insurance blah blah blah&lt;/p&gt; &lt;/div&gt; &lt;hr /&gt; </code></pre> <p>Thanks for your help in advance!</p>
javascript jquery
[3, 5]
1,660,099
1,660,100
Odd Problem With window.close()
<p>I have an odd problem with window.close() or self.close() (Both create the same issue). I have a window that pops up when a link is clicked, a simple form is submitted then a button is shown that when clicked closes the window using the aforementioned method. This works fine, the problem I'm having is when this is performed multiple times. After 10 - 20 times of performing this task the pop up window no longer loads (It's not hitting any code within the pop up, not even the Page_PreInit). The problem doesn't occur in Firefox or Safari, only IE. It's definatly linked to window.close() as if the window is closed using the X in the top right corner everything works fine. Any ideas what might be causing this? Is it an IE bug?</p>
c# asp.net javascript
[0, 9, 3]
875,475
875,476
How To: Stackoverflow / Twitter JS dialogue box
<p>I am trying to build a text-bar above the website like <a href="http://techdows.com/wp-content/uploads/2010/12/older-verison-of-twitter.png" rel="nofollow">Twitter or SO does.</a> Any advice on how to build this would be great. I do not know what you call this feature, but maybe there is a jQuery plugin to do it?</p> <p>The functionality I'm thinking of is "message" [x] to close the alert.</p> <p>Thanks for your help!</p>
javascript jquery
[3, 5]
1,277,011
1,277,012
Jquery tablesorter plugin not sorting correct
<p>I have some columns with the format:</p> <pre><code>&lt;td&gt;148 kr. &lt;/td&gt; </code></pre> <p>The tablesorter plugin does not sort them correct. It is like random.</p> <p>I also have columns like this one:</p> <pre><code>&lt;td&gt;148 kr. &lt;br&gt;(Oprettelse 49 kr.)&lt;/td&gt; </code></pre> <p>Were I want to sort by the first number <code>148 kr.</code> </p> <p>What should I do? </p>
javascript jquery
[3, 5]
5,200,246
5,200,247
Listen to phone state throughout the application?
<p>I nee to liste to phone state using phone state listener .I have many activities in a project. Should I register the listener to each of the activities or else is ther a better way.</p> <p>ps: i am not interested to use broadcast receiver</p>
java android
[1, 4]
4,480,494
4,480,495
Android shared library which is not JNI based
<p>I am developing a library for Android applications which does not use native code (JNI). I have tried suppling the library as an external jar in my Android projects but this method does not include the library contents in the apk and thus throws class not found errors when run in the emulator or device. I have also tried creating the library as an Android project in itself and this does work, but only for public static properties (not methods). With the library and application both being in separate apk's I can see that the VM notices references to the library and can read some properties, but when an attempt to instantiate a class in the library is executed I get class not found even though I can read the public static properties from it (very frustrating!!). </p> <p>I realize that Davlik byte code is not the same as Java byte code but I am having trouble even finding good information about how to solve what would seem to be a very simple issue in Android. I am looking into the old PlatformLibrary stuff right now but I am not convinced this will work either since the sample has been removed from the Android site :(</p> <p>So help me out if you can, if I find the answer before this happens I will share it.</p> <p>viva la Android!</p>
java android
[1, 4]
1,426,659
1,426,660
Making your javascript maintainable
<p>I am in the process of converting an internal application to use more Ajax via jQuery. I am moving away from the standard code behind of the current ASP.NET application and incorporating JavaScript methods that are going to run client side. My concern is what is the best method for allowing this application to stay maintainable for those who come behind me. </p>
javascript jquery
[3, 5]
4,851,986
4,851,987
File Download popup overwrites the alert popup
<p>When the user clicks on the "Export to Excel" link, the standard "File download" dialog is presented to the user. <a href="http://i.imgur.com/bsXM9.jpg" rel="nofollow">See here for an example image</a>. </p> <p>But before exporting the excel file, I want to display an alert popup. But the Save dialog is obscuring the view of the alert popup. </p> <p>How can I display the popup without it being obscured? </p> <p>Here is my code...</p> <pre><code>dsResult = clsObj.getSearchResults_BL(detObj); if (OrdDifference != null &amp;&amp; OrdDifference.Any()) { ScriptManager.RegisterClientScriptBlock(this.up, this.GetType(), "export", "alert('.....')", true); set(dsResult, strName); } else { set(dsResult, strName); } private void set(DataSet ds, string strFileName) { ExcelEngine excelEngine = new ExcelEngine(); IApplication application = excelEngine.Excel; application.DefaultVersion = ExcelVersion.Excel2007; IWorkbook workbook = application.Workbooks.Create(1); IWorksheet sheet = workbook.Worksheets[0]; try { sheet.Name = strFileName; sheet.ImportDataTable(ds.Tables[0], true, 1, 1, -1, -1); ... workbook.SaveAs(strFileName, ExcelSaveType.SaveAsXLS, HttpContext.Current.Response, ExcelDownloadType.PromptDialog); } catch (Exception ex) { } } </code></pre>
c# javascript asp.net
[0, 3, 9]
972,879
972,880
Javascript - Dynamically change the contents of a function
<p>I have this function that (on page load) changes my margin using the "css" jQuery method...</p> <pre><code>function page_change() { var h = window.location.hash; switch (h) { case 'home': $('.page-slide-box').css({marginLeft: 0}); break; case 'history': $('.page-slide-box').css({marginLeft: '-820px'}); break; // more cases here..... } } </code></pre> <p>...but after the page is loaded, I'd like to <strong>animate</strong> the change instead. I was thinking I could alter the existing function using replace() (rather than writing another redundant function), like so:</p> <pre><code>window.onhashchange = function() { var get = page_change.toString(); var change = get.replace(/css/g, 'animate'); page_change(); } </code></pre> <p>This successfully changes all instances of "css" to "animate" in my page_change() function. How do I get this function to change dynamically once I've replaced the strings? Or is this just a bad idea?</p>
javascript jquery
[3, 5]
4,161,345
4,161,346
Where's the width() function in jQuery source?
<p>Where's the <code>width()</code> function in <a href="http://code.jquery.com/jquery-1.5.js" rel="nofollow">jQuery source</a>?</p>
javascript jquery
[3, 5]
2,700,862
2,700,863
Plupload - how to open more than one time and refresh the list?
<p><strong>js:</strong></p> <pre><code>$(".butAnexarDoc").live("click", function(){ $("#anexarArquivos").plupload({ // General settings runtimes : 'html5,html4', url : 'js/plupload/examples/upload.php', max_file_size : '1000mb', max_file_count : 20, // user can add no more then 20 files at a time chunk_size : '1mb', unique_names : false, multiple_queues : true }); }); </code></pre> <p>ok, first time work perfect, but if i click in a diferent place to open again, the list its not been reloaded.</p> <p>its always the same, to reload the list i need to refresh the page.</p> <p>how can i fix this ?</p>
javascript jquery
[3, 5]
4,853,564
4,853,565
How to Convert an array of jQuery Objects to an HTML String
<p>In the jQuery Infinite Carousel, it uses <code>.clone()</code> to do the infinite effect. This works great unless the code it's cloning has HTML5 Elements. IE7 and IE8 have trouble applying HTML5 Element-specific CSS rules to cloned or otherwise post-page-load inserted elements.</p> <p>The <a href="http://jdbartlett.github.com/innershiv/" rel="nofollow">innerShiv</a> JavaScript plugin inserts the elements in a way that IE7 and IE8 will render just fine with the appropriate CSS. </p> <p>The problem is that innerShiv takes an HTML string as a parameter, but the jQuery .clone() method returns an array of jQuery objects.</p> <p>In order to use the two together, I need to convert the output from .clone() into an HTML string that innerShiv will be able to parse.</p> <p>Any thoughts on how this could be done?</p>
javascript jquery
[3, 5]