#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2009
    Posts
    9
    Rep Power
    0

    Postback refresh in whole page, not div


    Hello,

    I have a website at http://www.shahspace.com/nuts_and_bolts/home.html.

    If you click on the "contact" link, you be taken to a form that you can fill out. You can go ahead fill it out and click submit. An email will be sent to me.

    What I'd like you to notice is that when you click submit, the entire window gets taken over by the page in the div below the menu. This must have something to do with the way postback works on aspx pages.

    You should note that the way I linking the aspx page into the bottom div (Where the form shows up) is through some jquery. I have this on home.html:

    Code:
    ...
    	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js">
    	</script>
    ...
    	<script type="text/javascript">
    ...
    		function loadContent(elementSelector, sourceURL)
    		{
    			$(elementSelector).load(sourceURL);
    		}
    	
    	</script>
    ...
    		<div id="contact" class="menu"
    		onmouseover="italicize('contact'); return false;"
    		onmouseout="unitalicize('contact'); return false;">
    			<a href="javascript:loadContent('#content', 'contact.aspx');">
    				Contact
    			</a>
    		</div>
    So when you click the "contact" link, the loadContent javascript function gets called, which loads contact.aspx into the "content" div.

    How can I program it so that the refresh of contact.aspx at postback does not take over the entire browser window and instead stays confined to the div it was originally in?
    Last edited by gib0563569; September 20th, 2012 at 08:09 PM. Reason: misspelling in title

IMN logo majestic logo threadwatch logo seochat tools logo