943,515 Members | Top Members by Rank

Ad:
Jun 9th, 2009
0

image placement

Expand Post »
so im really getting into the ajax crowd, though i dont strictly use ajax (no xml) i like the functionality of calling server side scripts for dynamic php functions...

anyway i have a few images in this form ive made that i would like to be placed correctly

let me explain....

I have a form input..

<input type='text' name='provided' id='prov' onkeyup='checker(cariables)'>

then i have a div:

<td><div id='prov1'></div></td>

the ajax function calls the variables in the onkeyup section and based on the result displays an image.

so the problem is the image is not displaying in the right size OR the right place in the div... if i use valign='bottom' it doesnt change, which is the problem, instead of aligning with the bottom of the table cell it stays above, and makes the table all messed up, and messes with my layout...

the code for the images is:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <img src='../images/loading.gif' align='center' valign='bottom' width='16' height='16' />

so im wondering if anyone can even understand my problem, let alone help me...

thank you...
~Ryan
Similar Threads
Reputation Points: 10
Solved Threads: 4
Junior Poster
Merlin33069 is offline Offline
126 posts
since May 2008
Jun 9th, 2009
1

Re: image placement

Try this first on the image that corresponds to your ajax call:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <img src='../images/loading.gif' style="display : block; width : auto; height : auto; margin : 0 auto;" />
Featured Poster
Reputation Points: 114
Solved Threads: 138
Posting Shark
essential is offline Offline
973 posts
since Aug 2008
Jun 9th, 2009
0

Re: image placement

that didnt change the placement

so i showed the borders of the table and its actually making the talbe bigger and putting space below the image that shouldnt be there, so it might be adding a break below the image, but whatever its doing it does it even if i dont use the ajax (place image directly in html)
Reputation Points: 10
Solved Threads: 4
Junior Poster
Merlin33069 is offline Offline
126 posts
since May 2008
Jun 9th, 2009
0

Re: image placement

actually, i got it, the problem was that the entire code looked like this:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <table cellpadding='0' cellspacing='0' border='1'><tr><td>#2:&nbsp;<td><input type='text' value='0' maxlength='7' size='7' name='required_item_entry_2' id='rie2' onkeyup='checker("rie2", "rie2-1", "world", "items", "entry", "exists", "0")'>&nbsp;<td cellpadding="0" cellspacing="0"><div id='rie2-1'></div>&nbsp;<td><input type='text' value='0' maxlength='7' size='7' name='required_item_amount_2'></td></tr></table><br>

that was ONE line of the form

it goes like:

name - input - image - input

its all in a table and the problem was this:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <td cellpadding="0" cellspacing="0"><div id='rie2-1'></div>&nbsp;<td>

the non breaking space in the code is not in the div tag, so its still in the code after the image is inserted..... lol
Reputation Points: 10
Solved Threads: 4
Junior Poster
Merlin33069 is offline Offline
126 posts
since May 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: ajax slider
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Need help with getDOCTYPE() function





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC