Loading ...
Sorry, an error occurred while loading the content.

Solution for: Inner Html Java script doesent work...

Expand Messages
  • Caridy Patiño Mayea
    Hello fellows: I was facing the same problem for a while, and I already wrote a plugin to figure out this kind of situations... Here is an example of dynamic
    Message 1 of 5 , Apr 3, 2007
    • 0 Attachment
      Hello fellows:

      I was facing the same problem for a while, and I already wrote a
      plugin to figure out this kind of situations...

      Here is an example of dynamic areas with script tags:
      http://bubbling.comarq.com/themes/bubbling/examples/plugin-dispatcher-dynamic-contents.html

      And here is the full explanation:
      http://bubbling.comarq.com/eng/node/dispatcher/
      (también disponible en español
      http://bubbling.comarq.com/esp/node/dispatcher/)

      Also, this plugin (YAHOO.util.Dispatcher) can work with a tabview
      instance to management the dynamic tabs, see the example here:
      http://bubbling.comarq.com/themes/bubbling/examples/plugin-dispatcher-dynamic-tabs.html

      Well, just let me know if this plugin solve the problem...

      Note: to go deep in this issue, you can read this post (AJAX, onDemand
      JavaScript or Dynamic Script Tags)
      http://andreineculau.wordpress.com/2006/09/29/ajax-ondemand-javascript-or-dynamic-script-tags/

      Regards.
      Caridy

      --- In ydn-javascript@yahoogroups.com, "praveenreddy_s"
      <praveenreddy_s@...> wrote:
      >
      >
      > as a response i am invoking the following jsp page,
      > <html>
      > <head>
      > <script type="text/javascript">
      > alert("Testing...");
      > </script>
      > </head>
      > <body>
      > <input type="text" name="uname">
      > </body>
      > </html>
      >
      > i have used <script id="frd" type="text/javascript"><script>
      > when i click on a button the following message will be displayed as
      > test "<html><head><script type="text/javascript"> alert("Testing...");
      > </script></head><body><input type="text" name="uname"></body></html> "
      >
      > when i use script tag body part and java script part both are not
      working
      >
      >
      >
      > --- In ydn-javascript@yahoogroups.com, Vigneswaran R <vignesh@> wrote:
      > >
      > > Hi,
      > > If you want to execute the javascript code which is coming from
      > > the .jsp file,
      > > you should put the code inside a <script> element instead of <div>
      > > element.
      > > Change the following line,
      > > <div id="frd" style="display:none;"></div>
      > > to
      > > <script id="frd" type="text/javascript"><script>
      > >
      > > Everything else seems ok to me. Hope this may help.
      > >
      > > Regards,
      > > Vignesh
      > >
      > >
      > > On Thu, 2007-03-29 at 09:06 +0000, praveenreddy_s wrote:
      > > > Inner Html Java script doesent work please help me i am ussing
      > > > YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
      > > >
      > > > i jave a jsp page where i am getting a response here i have some
      > > > script and a html form so the script for this form is not working.
      > > >
      > > > My code is a follows
      > > >
      > > > <table> here i am having 5 radio buttons when we click on a
      > > > button it goes to a java script code and the response we store in
      > > > frd div tag(as a response i am getting script and html page)
      </table>
      > > > <div id="frd" style="display:none;"></div> <br>
      > > >
      > > > java script code:
      > > >
      > > > function makeRequest(val) /* val is value of radio button */
      > > > {
      > > > var postData = "payby="+val;
      > > > var callback ={
      > > > success: handleSuccess,
      > > > failure: handleFailure
      > > > };
      > > > var sUrl = "payment.jsp"; /* this page contains java script
      > > > which doesnt work*/
      > > > var request = YAHOO.util.Connect.asyncRequest('POST', sUrl,
      > > > callback, postData);
      > > > return 1;
      > > > };
      > > >
      > > > var divq = document.getElementById("frd");
      > > >
      > > > function handleSuccess(o) {
      > > > if(o.responseText != undefined) {
      > > > divq.innerHTML = o.responseText; // in this response i am
      > > > getting java script code which doesnt work.(from payment .jsp).
      > > > }
      > > > divq.style.display='inline';
      > > > };
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.