Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. this is banner.jsp :
  2.  
  3. <select id = "selectValue" onchange="loadInternationalDoc()">
  4. <option value="domestic">Domestic (India)</option>
  5. <option value = "international">International</option>
  6. </select>
  7.  
  8. <script>
  9. function loadInternationalDoc() {
  10. var xmlhttp;
  11. var selectionValue = document.getElementById('selectValue').value;
  12. var url;
  13. if(selectionValue == 'international') {
  14. url="internationalDefault.jsp";
  15. }
  16. else {
  17. var url = "default.jsp";
  18. }
  19.  
  20. if (window.XMLHttpRequest)
  21. {
  22. xmlhttp=new XMLHttpRequest();
  23. }
  24. else
  25. {
  26. xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  27. }
  28. if (xmlhttp.readyState==4 && xmlhttp.status==200)
  29. {
  30. document.getElementById("fullwrapper").innerHTML=xmlhttp.responseText;
  31. }
  32. xmlhttp.open("GET", url, true);
  33. xmlhttp.send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement