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....
User Profile
Collapse
-
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.
... -
This works:
Code:function getTestpage() { url = "afunc.php"; initAjax(url, function (response) { document.getElementById(theOutput).innerHTML = response.responseText; document.getElementById('fldname').focus(); }); }
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...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); }
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) {
Leave a comment:
-
Code:function getRatecard() { url = "Rfunc.php"; initAjax(url, function (response) { document.getElementById(theOutput).innerHTML = response.responseText; }); }
...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) {
Leave a comment:
-
Interesting:
Code:function getRatecard() { url = "Rfunc.php"; initAjax(url, function response(){ document.getElementById(theOutput).innerHTML = http.responseText; }); }
Code:function getRatecard() { url = "Rfunc.php"; initAjax(url, function response(){ document.getElementById(theOutput).innerHTML = 'blah'; }); }
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 doCode:http.onreadystatechange = http.responseText;;
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); }
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 --- }); }
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
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()'>
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.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.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;
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) {
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!...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...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(); }
Leave a comment:
No activity results to display
Show More
Leave a comment: