Viagra Cartoon

May 24th, 2014 by Lynn Demarest in ASP.NET, jQuery, Miscellaneous, Technical, Web

Buying viagra in the us The jQueryUI sortable widget works like magic. Buying viagra in the us Apply it to an HTML DIV that contains other DIVs and you can magically drag and drop the inner DIVs to reorder them on the client. Buying viagra in the us Say, buying viagra in the us for example, buying viagra in the us you have an image gallery and want to allow the site administrator to reorder the images. Buying viagra in the us Drop the images into the inner DIVs, buying viagra in the us attach the widget to the outer DIV and you’re done.

Buying viagra in the us Here’s how:

Buying viagra in the us 1. Buying viagra in the us Add jQuery files

Buying viagra in the us <script type=”text/javascript” src=”//code.jquery.com/jquery-2.1.1.min.js” ></script>

Buying viagra in the us <script type=”text/javascript” src=”//code.jquery.com/ui/1.10.4/jquery-ui.min.js” ></script>

Buying viagra in the us <link rel=”stylesheet” href=”//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css” />

Buying viagra in the us 2. Buying viagra in the us Insert startup scripts to make the outer DIV with the ID “sortable” sortable

Buying viagra in the us <script>

Buying viagra in the us $(function () {

$(“#sortable”).sortable();

}

Buying viagra in the us </script>

Buying viagra in the us 3. Buying viagra in the us Create the div with the sortable ID. Buying viagra in the us Put the inner divs inside it.

Buying viagra in the us <div id=”sortable” >

Buying viagra in the us <div style=”height:200px;”>
<img id=”ctl00_ContentPlaceHolder1_RIL1_Repeater1_ctl00_Image1″ ImageID=”50″ src=”http://www.mysite.com/donuts.jpg” style=”height:200px;border-width:0px;” />
<input type=”hidden” name=”ids” id=”ids” value=’50′ />
</div>

Buying viagra in the us <div style=”height:200px;”>
<img id=”ctl00_ContentPlaceHolder1_RIL1_Repeater1_ctl01_Image1″ ImageID=”48″ src=”http://www.mysite.com/BMproduce.jpg” style=”height:200px;border-width:0px;” />
<input type=”hidden” name=”ids” id=”ids” value=’48′ />
</div>
… and so on

Buying viagra in the us </div> <!– end id=sortable –>

Buying viagra in the us The thing to notice here is that, buying viagra in the us instead of trying to use the widget’s fancy UPDATE event to trigger a javascript routine charged with reporting the new image order back to the server, buying viagra in the us perhaps via AJAX, buying viagra in the us we instead include in each list element a hidden input field containing the id of the element to be reordered. Buying viagra in the us When a list item gets dragged to a new position, buying viagra in the us this hidden field gets dragged along with it.

Buying viagra in the us Finally, buying viagra in the us we give all of these hidden fields the same name: ids. Buying viagra in the us When the form is posted back, buying viagra in the us the form field named ids contains the keys in order, buying viagra in the us like this:

Buying viagra in the us ids=23, buying viagra in the us43, buying viagra in the us54, buying viagra in the us67, buying viagra in the us65, buying viagra in the us87, buying viagra in the us67

Buying viagra in the us Given these record keys, buying viagra in the us of course, buying viagra in the us you can just create SQL statements to update each record’s “SEQ” value. Buying viagra in the us In other words, buying viagra in the us set the SEQ of record 23 to 1, buying viagra in the us set the SEQ of record 43 to 2 and so on.

Buying viagra in the us Simple!

Buying viagra in the us  

Average Rating: 4.9 out of 5 based on 298 user reviews.

No Comments

 

Comments have been closed for this post.