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 UI dialog form, not sending correct variable -


i'm loading customer info page using jquery. there's list of customers link next it:

<a href="#" onclick="load_customer(<?php echo $c->id; ?>);return false;">view</a> 

that triggers function:

function load_customer(id) {   $("#dashboard").load('get_info/' + id); } 

that works perfectly. on page i'm loading, have jquery ui modal dialog form adding new information.

<div id="addinfo">   <form><input type="hidden" name="customer_id" value="<?php echo $c->id; ?>" /></form> </div> 

my javascript:

  $("#addinfobutton").click(function(){             $("#addinfo").dialog("open");             return false;    });    $("#addinfo").dialog({             autoopen:false,             width:400,             height:550,             modal: true    }); 

when select customer first time, populates hidden field correctly, stays same after selecting other customers.

i thought loading new customer page, form reset well... apparently it's being stored/cached somewhere. if echo id anywhere else in page, shows correctly... not in "addinfo" div.

any help/suggestions appreciated! thanks!

jquery dialog's dont reload content when open them. tend have ajax call replacing content of div dialog on (or tweakng values in it) when dialog opened.

if want hidden field, wouldn't put within dialog, should able retrieve value outside dialog.


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 -