The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Is there a way of showing multiple numbers of the same image other than writing <img src = ""blahdeblah.gif""> numerous times?
In other words something like: < display""x5"" img src = ""blahdeblah.gif"">
to show the blahdeblah.gif 5 times
Thanks,
In other words something like: < display""x5"" img src = ""blahdeblah.gif"">
to show the blahdeblah.gif 5 times
Thanks,
Sist redigert av
Postet den
Easy.
To do it with a function:
Otherwise, to do it on a single occasion:
To do it with a function:
Code:
Save this in "inc_func_common.asp":
Function M_Image(intQty,strMImage)
For intMI=1 to intQty
Response.Write "<img src=""" & strImageURL & "&strMImage&"" />"
Next
End Function
Call the function in your code like this:
M_Image(5,"blahdeblah.gif")
Otherwise, to do it on a single occasion:
Code:
For intMI=1 to 5
Response.Write "<img src=""" & strImageURL & "blahdeblah.gif"" />"
Next
Postet den
Amazing [^]
Thanks Carefree I'll give it a go later
Thanks Carefree I'll give it a go later
Postet den
I'm curious why you would want to do this.
I fight with my members that post long lines of smilies. I actually have my bad word filter set up to fight it.
I fight with my members that post long lines of smilies. I actually have my bad word filter set up to fight it.
Postet den
Originally posted by bobby131313
I'm curious why you would want to do this.
Ditto. This sounds an awful lot like asking if I should hammer a nail with an old shoe or a glass bottle...
Postet den
The reason I asked was a long standing member of our forums recently asked if he could have a different coloured set of stars under his name than the ones we were using for normal members.
As this member has been good to us I decided it was a small request that I could/should honor and so coded it into topics.asp so that it looked up his member ID when posting and replying to topics and if it was such then to display five gold stars instead of the set blue ones.
The thought occured to me afterwards, hence my question, if it was possible to code for multiple instances of the same image rather than repeating the img src code five times
More from a curiosity perspective than a requirement
The thought occured to me afterwards, hence my question, if it was possible to code for multiple instances of the same image rather than repeating the img src code five times
More from a curiosity perspective than a requirement
Postet den
This can also be done using a single image, set it as the background to a div, set the background to repeat and set the div to the width you need to display x number of stars
Example
Example
Postet den
Well that actually makes sense.
Postet den
Having just reread this and HuwR's reply I just realised that if I made the single image into a larger image of 5 stars and called it for example bladeblah5.gif, I'd only have to add the image code once anyway lol
What's that about thinking too deep
?
What's that about thinking too deep
Postet den
As long as the image is not animated, that would be the easiest solution.
Email Member
Message Member
Post Moderation
Filopplasting
If you're having problems uploading, try choosing a smaller image.
Forhåndsvis post
Send Topic
Loading...