473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Ajax How-to Force size of 'span' child image

When i read in an image from xml and write it to post. I create is as a span but it seems im stuck with not knowing how to FORCE THE SIZE of the image.

Even when i do !important on the css the browser still shows the full size image and not 120x80:
/* video */
.cl-video {width:120px;height:80px;float:left;background-Color:#EEEEEE;position:relative; left:12px;}

The code:

case 'img':
e1 = document.createElement(el[j]);
e1.setAttribute('src', items[j][i].firstChild.nodeValue);
// added line below July 3 2006
e1.setAttribute('id', 'vlink'+i);
break;
e1.appendChild(document.createTextNode(items[j][i].firstChild.nodeValue));

we1.appendChild(document.createTextNode(elpretext[j])); // adds text in front of element
we1.appendChild(e1);

we1.setAttribute('class',wrapelementclass[j]);
we1.setAttribute('className',wrapelementclass[j])

outerWrapper.appendChild(we1)

Please help!
Jun 16 '07 #1
5 1500
acoder
16,027 Expert Mod 8TB
Try changing the image width and height rather than the span containing the image.
Jun 18 '07 #2
Try changing the image width and height rather than the span containing the image.
That is exactly what I'm trying to avoid. Is there a way other than resizing the image?
Jun 18 '07 #3
acoder
16,027 Expert Mod 8TB
That is exactly what I'm trying to avoid. Is there a way other than resizing the image?
Why do you want to avoid that? You can always resize the image to its real size when you need to. Resizing the image would achieve the same result.
Jun 19 '07 #4
If I grab different content from all websites around the net and i want to avoid taking time in resizing all to thumbs in specific size saves tons of time

its a time saver x 1000s of clips and pictures.
Jun 22 '07 #5
acoder
16,027 Expert Mod 8TB
When you resize an image, you aren't actually modifying the image. It's just a modification of the display of the image. You can also just change the height or the width and the other will resize automatically by the same ratio.
Jun 22 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: darrel | last post by:
Anyone using Ajax with .net? Are there any controls/tools that make building with ajax easier or is it, for now, just a matter of connecting the javascript to the back end manually as needed? ...
21
by: javainfo | last post by:
How can i refresh IFRAME and load data through AJAX?
5
by: aroraamit81 | last post by:
I am using AJAX, it works very fine.............. But the problem is my back end aspx page does not get refreshed rather it picks old values now when I execute the aspx page explictly then the...
1
by: Peter Rilling | last post by:
I am starting work on a website that uses Ajax heavily. I have never developed an Ajax app before and am currently evaluating the various libraries. Are there any articles that discuss best...
1
by: tysu | last post by:
When I visit programming talk I find out a hot topic talking about Levyo Ajax Technology Gallery. Their site is at http://levyo.com - demo at http://gettingzone.com. They build Ajax application on...
2
by: Mike P | last post by:
Whenever I startup an Ajax Control Toolkit Website I get the following error: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,...
3
by: Max2006 | last post by:
Hi, I use ASP.NET Ajax in my web site and I am monitoring the HTTP requests per each page by using fidler. I am surprised by the excessive call of ScriptResource.axd with different query string...
5
by: Eyeinstyin | last post by:
Basic Problem is Every scroll of scrollbar makes an ajax call.So if user play with scrollbar say 100 times 100 ajax calls go and server starts processing 100 calls.So abort won't help.The last time...
2
by: Greg Smith | last post by:
I have just installed vs2008. The ToolBox has a Ajax tab but only ScriptManager, ScriptManager Proxy, Timer, UpDatePanel and Update Progress are in there. How do I add all the toolkit controls?...
1
by: smithcarvo | last post by:
Hi all, How can I implement Ajax in asp.net 2.0 application. I will highly appreciate your feed back. Thanks in advance. --
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.