[Dojo-interest] Simple Task, easy solution?

Yogesh Mujumdar yogesh.mujumdar at gmail.com
Thu Feb 22 15:11:11 MST 2007


If you are starting, then start good. This article should be very helpful to
you.

http://today.java.net/pub/a/today/2006/04/27/building-ajax-with-dojo-and-json.html

Though it explains using jsp, you can just neglect it and concentrate on the
techniques on how to use dojo.

On 2/23/07, Jon Jaques <wayvirgo at comcast.net> wrote:
>
>  Hello,
>
>
>
> I'm just getting started using Ajax, and I have a simple task that I need
> to accomplish, for starters…
>
>
>
> In a form, I have some icons with onClick events assigned to them, and
> when clicked, I want to call an asp page, capture it's output, and then
> stuff that output into a div tag. I've actually got all this running using a
> library from DynamicDrive.com, but it's not very "nice", and has
> limitations.
>
>
>
> The structure I've currently got looks something like this; I've snipped
> out irrelevant portions of code because I'd rather rebuild this using the
> DoJo libraries, if possible.
>
>
>
> <head>
>
> <script language="javascript">
>
> function processGetPost() {
>
>                 // snip
>
> // call page, get response
>
>                 // return response
>
> }
>
> // snip
>
> function overlay(curobj, subobjstr, opt_position, nav_id){
>
>                 // snip
>
>                 var subobj=document.getElementById(subobjstr)
>
>                 var myContent = ajaxpack.getAjaxRequest("
> getHelpContent.asp", "NavID=" + nav_id, processGetPost, "txt");
>
>                  subobj.innerHTML = myContent;
>
>                 // snip
>
> }
>
> </script>
>
> </head>
>
> <body>
>
> <a href="#" onClick="return overlay(this, 'subcontent2', 'leftbottom',
> 25)"><img src="questionmark.gif"></a>
>
> <DIV id="subcontent2" style="position:absolute; display:none; border: 9px
> solid black; background-color: lightyellow; width: 350px; height: 150px;
> padding: 8px; overflow:auto;">
>
>
>
> <img src="loading.gif" alt="Please Wait..." />Loading...
>
>
>
> <div align="right"><a href="#" onClick="overlayclose('subcontent2');
> return false">Close Box</a></div>
>
>
>
> </DIV>
>
> </body>
>
>
>
> Could somebody please set me in the right direction? I'd greatly
> appreciate it!
>
>
>
> --Jon
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>


-- 
regards/Yogesh

"One can resist the invasion of an army but one cannot resist the invasion
of ideas." - Victor Hugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20070222/339fc6ae/attachment.html


More information about the Dojo-interest mailing list