Results 1 to 2 of 2

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

  1. #1

    Default $('#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. #2

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •