Announcement Announcement Module
Collapse
No announcement yet.
$('#dialogbox').load() javascript function with spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • $('#dialogbox').load() javascript function with spring

    Hello. I was trying to load a jsp page inside a dialog box using $('#dialog').load() function in javascript.. I have installed jqueryui for the effects.. the effects works fine, however.. once the dialog opens, it won't load the specified jsp page. my jsp files were on the same directory in my project named 'simple' the jsp files were on this directory: simple/war/WEB-INF/jsp.

    here is my code for the viewReports.jsp:
    Code:
    $.fx.speeds._default = 1000;
    			$(function() {
    				$('#tryLang').dialog({
    					autoOpen: false,
    					show: 'explode',
    					hide: 'highlight'
    				});
    				
    				$('#opener').click(function() {
    					$('#tryLang').dialog('open');
    					$('#tryLang').load('WEB-INF/jsp/simpleForm.html');
    					return false;
    				});
    			});
    take note that 'tryLang' was an id for a <div> tag while 'opener' was my id for a button..

    I've tried these codes but still nothing works for loading the specified file.

    Code:
    $('#tryLang').load('WEB-INF/jsp/simpleForm.html');
    or
    $('#tryLang').load('simpleForm.html');
    or
    $('#tryLang').load('WEB-INF/jsp/simpleForm.jsp');
    or
    $('#tryLang').load('simpleForm.jsp');
    do i need to do something else with the controller or the servlet.xml that i have? I really have no idea. please help..

  • #2
    it should be
    $('#tryLang').load("http://localhost:8080/simple/simpleForm.html");

    Comment

    Working...
    X