image placement

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved

Join Date: May 2008
Posts: 113
Reputation: Merlin33069 is an unknown quantity at this point 
Solved Threads: 4
Merlin33069 Merlin33069 is offline Offline
Junior Poster

image placement

 
0
  #1
Jun 9th, 2009
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
Do you geek alone?

<<TimmCo>> Custom Computers

~Executive
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: image placement

 
1
  #2
Jun 9th, 2009
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;" />
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 113
Reputation: Merlin33069 is an unknown quantity at this point 
Solved Threads: 4
Merlin33069 Merlin33069 is offline Offline
Junior Poster

Re: image placement

 
0
  #3
Jun 9th, 2009
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)
Do you geek alone?

<<TimmCo>> Custom Computers

~Executive
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 113
Reputation: Merlin33069 is an unknown quantity at this point 
Solved Threads: 4
Merlin33069 Merlin33069 is offline Offline
Junior Poster

Re: image placement

 
0
  #4
Jun 9th, 2009
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
Do you geek alone?

<<TimmCo>> Custom Computers

~Executive
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 583 | Replies: 3
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC