User Profile

Collapse

Profile Sidebar

Collapse
webhead
webhead
Last Activity: Jan 10 '12, 04:04 AM
Joined: Mar 8 '06
Location: Ohio
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • webhead
    replied to IE problem with unordered list
    Amen.


    Everything I try with margin and padding only affects the whole list and doesn't change the relative distance between the first line and the rest.

    It's got to have something to do with the news reader, I'm guessing, since only that list is bad and the normal list above it ('local websites')is okay....
    See more | Go to post

    Leave a comment:


  • webhead
    started a topic IE problem with unordered list

    IE problem with unordered list

    I have a website at This Link which contains some unordered lists at the right. The news headlines list has the first item appearing normally, but all the other items are pushed over to the right. Other than the first item being one line instead of two, I don't see any difference in the other lines.

    Why would only IE do this (even v.7) but not Firefox or Safari? Since it's in an Ajax div, I can't view the page source code.
    ...
    See more | Go to post

  • This works:
    Code:
    function getTestpage() { 
    	url = "afunc.php";
    	initAjax(url, function (response) { 
    			document.getElementById(theOutput).innerHTML = response.responseText;
    			document.getElementById('fldname').focus();
    		});
    	}
    Whew!

    Felt like wandering in the desert for 40 years just to go 20 miles, but worth the trip because things were learned. Thanks again for all...
    See more | Go to post

    Leave a comment:


  • Having fun... like the time our driver's ed instructor hit the car in front when we asked him to show us parallel parking with real cars instead of cones... 8-)

    Code:
    function initAjax(url, callback) {
    	var http = getHTTPObject(); 
    	http.open("GET", url, true);
    	http.onreadystatechange = function() {
    		if (http.readyState == 4) { callback(http); } 
    		};
    	http.send(null);
    	}
    ...
    See more | Go to post

    Leave a comment:


  • Tried this:
    Code:
    function initAjax(url, callback) {
    	var http = getHTTPObject(); 
    	http.open("GET", url, true);
    	http.onreadystatechange = function(response) {
    		if (response.readyState == 4) { callback(response); } 
    		};
    	alert('ack');
    	http.send(null);
    	}
    
    function getTestpage() { 
    	url = "afunc.php";
    	initAjax(url, function (response) {
    ...
    See more | Go to post

    Leave a comment:


  • Code:
    function getRatecard() {
    	url = "Rfunc.php";
    	initAjax(url, function (response) { 
    		document.getElementById(theOutput).innerHTML = response.responseText;
    		}); 
    	}
    Done, but still nothing from "response.respo nseText;". Is it possible we need to wait for "http.readyStat e == 4"? I tried putting that around the "...innerHTML.. ." line but still nothing.

    ...
    See more | Go to post

    Leave a comment:


  • Oops, how did I do that with the ()? Fixed, added the eval, but still nothing. Tried this too and still nothing:
    Code:
    function initAjax(url, callback) {
    	var http = getHTTPObject(); 
    	http.open("GET", url, true); 
    	http.onreadystatechange = callback;
    	http.send(null);
    	}
    
    function getRatecard() {
    	url = "Rfunc.php";
    	initAjax(url, function (response) {
    ...
    See more | Go to post

    Leave a comment:


  • Interesting:
    Code:
    function getRatecard() {
    	url = "Rfunc.php";
    	initAjax(url, function response(){ document.getElementById(theOutput).innerHTML = http.responseText; }); 
    	}
    puts out nothing but:
    Code:
    function getRatecard() {
    	url = "Rfunc.php";
    	initAjax(url, function response(){ document.getElementById(theOutput).innerHTML = 'blah'; }); 
    	}
    puts out "blah"....
    See more | Go to post

    Leave a comment:


  • Yes, but now and then you need a little Ex-Lax to get things moving ;-)


    So anything "new" creates a variable that holds a string, number, or function, right? So if I pass an empty function { } it's just like passing an empty string.

    ...
    A little fuzzy on how that works but right now I'm happy to take your word for it.

    Question: We used to do
    Code:
    http.onreadystatechange = http.responseText;;
    ...
    See more | Go to post

    Leave a comment:


  • This can't be right:
    Code:
    function initAjax(url, callback) {
    	var http = getHTTPObject(); 
    	var http = new XMLHttpRequest();
    	http.open("GET", url, true);
    	http.onreadystatechange = callback;
    	http.send(null);
    	}
    See more | Go to post

    Leave a comment:


  • Aaaahhhhh, I see. (Can't tell I'm a n00b at AJAX can ya? Or that I even had anything working at all just by copy/paste from sketchy tutorials?)

    So now it goes a little something like this:

    Code:
    function getFunky() {
    	url = "doStuff.php?button=add";
    	initAjax(url, function response(){ --- stuff here if needed --- });
    	}
    And "function response" can be empty between the {} if I...
    See more | Go to post

    Leave a comment:


  • Moved the "var http = getHTTPObject() ;" to initAjax, but since it's no longer global I assume I must add that line to any other functions, right? My page won't load at all so I went ahead and added it to other functions, but I must have it in the wrong place since it still won't load. Example:
    Code:
    function nutherFunction(theButton) {
    	str = "moreStuff.php?button="+theButton;
            // add line here
    ...
    See more | Go to post

    Leave a comment:


  • Here it is:
    Code:
    /* moreStuff.php */
    
    <?php 
    ...
    $button = $_GET['button']; 
    $recn = $_GET['recn'];
    ...
    // FIND SPECIFIC RECORD FROM GOTO BOX
    if ($button=="goto") {
    	...
    	 // find record and track which page we're on
    	}
    ...
    ?>
    
    <!--  DISPLAY FORM  -->
    ...
    	<img src='icons/goto.png' onClick='getGoto()'>
    ...
    See more | Go to post

    Leave a comment:


  • It's looking like the old game of whack-a-mole: I can either get focus or find a record, but as soon as one thing works the other doesn't.
    See more | Go to post

    Leave a comment:


  • Houston, we have focus!

    Thanks!

    But...

    I had it so clicking in the recno box would actually go and find the record. That's what the url pointed to, the Find code. But it doesn't execute the code, just does the focus.
    See more | Go to post

    Leave a comment:


  • Worked on it some and have this now:
    Code:
    function initAjax(url, callback) {
    	http.open("GET", url, true);
    	http.onreadystatechange = callback;
    	http.send(null);
    	}
    function doStuff() {
    	recn=document.getElementById('recno').value;
    	initAjax("moreStuff.php?recn="+recn, function response(){
    		http.open("GET", str, true);
    		http.onreadystatechange = handleHttpResponse;
    ...
    See more | Go to post

    Leave a comment:


  • I must have something messed up, because now the page won't work at all (shows blank). Here's what I've got:
    Code:
    function initAjax(url, callback) {
    	http.open("GET", url, true);
    	http.onreadystatechange = callback;
    	http.send(null);
    	}
    
    function doStuff() {
    	recn=document.getElementById('recno').value;
    	initAjax("moreStuff.php?recn="+recn, function(response) {
    ...
    See more | Go to post

    Leave a comment:


  • Heck, I though it sounded more like an auto parts store ;-)

    Anyway, getting late and I'll see if I can try that tomorrow. Thanks!...
    See more | Go to post

    Leave a comment:


  • Hi, thanks for your help. But the problem is I have the handleHttpRespo nse code being called by many functions and only want the focus executed in one of them.

    Recno is a field in a form, with different fuctions being called depending on which buttons the user clicks.

    Basically, I have an accounts receivable app that includes searches by various fields, and when a particular set of records is chosen I have controls...
    See more | Go to post

    Leave a comment:


  • I'm having the same problem but tried doing the focus in the function and it still doesn't work. Here's my javascript:
    Code:
    function doStuff() {
    	recn=document.getElementById('recno').value;
    	str = "moreStuff.php?recn="+recn;
    	http.open("GET", str, true);
    	http.onreadystatechange = handleHttpResponse;
    	http.send(null);
    	recno.focus();
    	}
    Is this the wrong place to call...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...