Results 1 to 4 of 4
Thread: AJAX + Javascript problem
- 02-22-2011, 02:38 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 2
- Rep Power
- 0
AJAX + Javascript problem
Hi,
AJAX nor Javascript is not my cup of tea...
I have php page submitting form thru ajax to display another form - sadly when displayion form with javascript functionality thru ajax - javascript functions have ceased to work (or maybe I'm dumb enough not to figure it out right.)
Could anyone advise please - what sould I fix on following code:
index file:
post_main.php:Java Code:<script type="text/javascript"> http = getHTTPObject(); function getHTTPObject(){ var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(E){ xmlhttp = false; } } @else xmlhttp = false; @end @*/ if(!xmlhttp && typeof XMLHttpRequest != 'undefined'){ try { xmlhttp = new XMLHttpRequest(); }catch(e){ xmlhttp = false; } } return xmlhttp; } function doMath1(){ var url = "post_main.php"; http.open("GET", url, true); http.onreadystatechange = handleHttpResponse; http.send(null); } function handleHttpResponse(){ if(http.readyState == 4){ document.getElementById('algus').innerHTML = http.responseText; } } </script> <div id="keskel" style="visibility: hidden"> </div>
The problem is that onClick is not modifying textfield anymore (when displayed thru AJAX in div - keskel)Java Code:<form name="em3" id="em3" action="" method="post" target="_self"> <input name="res3" value="" type="text" readonly="readonly"> <input onclick="javascript:document.em3.res3.value=document.em3.butnnrr3.value;" type="button" name="butnnrr3" id="butnnrr3" value="Update"> </form>
Any help or ideas?Last edited by dapikk; 02-22-2011 at 03:05 PM. Reason: x
-
I'm not sure how this relates to programming in Java as this seems a pure JavaScript problem (which is as similar to Java as ham is to hamster). If so, then your best bet is to Google for a JavaScript or AJAX forum.
Luck.
- 02-22-2011, 03:06 PM #3
Member
- Join Date
- Feb 2011
- Posts
- 2
- Rep Power
- 0
Sry - just ought to ask from you guys aswell....
Mybad....
-
Similar Threads
-
Problem with Ajax Tabs
By amma2009 in forum Advanced JavaReplies: 0Last Post: 02-24-2010, 03:56 PM -
ajax problem
By anthrax in forum Advanced JavaReplies: 2Last Post: 12-24-2009, 01:21 PM -
ajax jsp tag problem (formupdate.view ?)
By anthrax in forum Advanced JavaReplies: 1Last Post: 12-20-2009, 04:51 PM -
Java Developer – AJAX/XHTML/Javascript – Milton Keynes
By ICResourcing in forum Jobs OfferedReplies: 0Last Post: 11-09-2009, 12:04 PM -
JSP - AJAX problem
By MaheshReddy in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 09-27-2009, 01:54 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks