Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

jQuery and iframes and weird positioning: is there a workaround? -


i've got draggable thing outside iframe, , droppable target inside it. here i've shown iframe containing snippet of html loaded src attribute.

<div id="draggables">   <img src="drag-me.gif"> </div>  <iframe src="iframe-src.html" id="iframe">   <!-- html gubbins -->    <div id="droppable">&nbsp;</div>    <!-- more html gubbins --> </iframe> 

i use jquery (ui draggable/droppable) stuff:

$("#iframe").load(function() {     var $this = $(this);     var contents = $this.contents();      contents.find('#droppable').droppable({         drop: function (event, ui) { alert('dropped'); }     });     $('#draggables img').draggable(); }); 

the draggables become draggable , droppable drop target. problem landing zone drop area not displayed on screen. is, alert fired when draggable dropped somewhere above drop target, , not on target itself.

a few tests did suggest difference between target on screen , jquery thinks is related vertical position of iframe on page, can't find direct correlation. know whether problem has been investigated anywhere and, perchance, solved?

failing that, can suggest way may able load external html file page without using iframe , without 2 pages' structures , styles interfering 1 another? i'm considering loading inner page directly , using javascript draw page controls around it.

tia altreus

you're trying access parent element within child iframe. haven't tested it, try set context jquery selector. otherwise, it'll inside current iframe.

$('#draggables img', parent).draggable(); 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -