Archive

Archive for the ‘Ajax’ Category

JavaScript: Access Iframe

February 20th, 2009 karlosp No comments

t = window.frames['iframe'].document.getElementById('someID').innerHTML = "karlos";

CODE:
  1. $('#iframe').load( function(){
  2.           //$(this.contentDocument).find('body').find("#mojDiv").click(function(){
  3.               $(this.contentDocument).find('body').find("#hidden").attr("value", "test");
  4.           //});
  5.     });

Categories: Ajax Tags:

Jump to first unread post in phpBB forums!

February 2nd, 2009 karlosp No comments

ONLY FOR FIREFOX

  1. First install Greasemonkey if you do not have it yet
  2. Restart firefox and then
  3. Install phpbb_new_postuser by clicking it

It should work on all phpBB forums witch have "viewtopic.php" in URL

Categories: Ajax Tags: , , ,

jQuery(string) create not valid DOM when string is html with newlines

January 12th, 2009 karlosp No comments
JAVASCRIPT:
  1. function jquery_from_html(data) {
  2.         return $("<div id='inner' />").append(data);
  3. }
  4.  
  5. or
  6.  
  7. remove javascript and head overhead
  8. var htmlDOM = $("<div id='inner' />").append(html.replace(/<script [\s\S]*\/script>|<head [\s\S]*\/head>/img,""));

Categories: jQuery Tags: , ,

Get selected value with jQuery

December 17th, 2008 karlosp No comments
JAVA:
  1. var selected =
  2.  
  3. $("#myList").children("option:selected").attr("value").trim()

Categories: Ajax, jQuery Tags:

Ajax History

November 25th, 2008 karlosp No comments
Categories: Ajax Tags:
101895 pages viewed, 159 today
53334 visits, 93 today
FireStats icon Powered by FireStats