Author: tyrell
Date: Sat Jul 19 19:27:04 2008
New Revision: 19646
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19646

Log:
Fixing MASHUP-978. Additional html tags are sent by the yahoo API. Filtering 
them out.

Modified:
   trunk/mashup/java/modules/www/cert_manager.jsp

Modified: trunk/mashup/java/modules/www/cert_manager.jsp
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/cert_manager.jsp?rev=19646&r1=19645&r2=19646&view=diff
==============================================================================
--- trunk/mashup/java/modules/www/cert_manager.jsp      (original)
+++ trunk/mashup/java/modules/www/cert_manager.jsp      Sat Jul 19 19:27:04 2008
@@ -80,8 +80,8 @@
     function harvestMessage(response) {
         // response = "<ns:blah xmlns:'blahblah'> <ns:return>Sample response 
message</ns:return> </ns:blah>"
 
-        var markerElem = "<ns:return>";
-        var markerElemEnd = "</ns:return>";
+        var markerElem = "<SPAN class=tx>";
+        var markerElemEnd = "</SPAN>";
         var firstOccIndex = response.indexOf(markerElem);
 
         if (firstOccIndex == -1) {
@@ -102,14 +102,14 @@
     }
 
     function handleUpload(o) {
-        var responseText = harvestMessage(o.responseText);
+        var responseText = o.responseText;
         if (responseText == null) {
-            WSO2.MashupUtils.dialog("Exception occured", "Could not connect to 
backend service.<br><input type='button' value='Close' 
onclick='WSO2.MashupUtils.dialog.close();'", 300, 70);
+            WSO2.MashupUtils.dialog("An Exception occured", "Could not connect 
to backend service.<br><input type='button' value='Close' 
onclick='WSO2.MashupUtils.dialog.close();'", 300, 70);
         } else {
+            responseText = harvestMessage(responseText);              
             if (responseText.indexOf("Exception occured") != -1) {
-                WSO2.MashupUtils.dialog("Exception occured", responseText + 
"<br><input type='button' value='Close' 
onclick='WSO2.MashupUtils.dialog.close();'", 300, 70);
-            } else {
-                
+                WSO2.MashupUtils.dialog("An Exception occured", responseText + 
"<br><input type='button' value='Close' 
onclick='WSO2.MashupUtils.dialog.close();'", 300, 70);
+            } else {                  
                 WSO2.MashupUtils.dialog("Operation successfull", responseText 
+ "<br><input type='button' value='Close' onclick='handleSuccess();'", 300, 
70);                
             }
         }

_______________________________________________
Mashup-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to