Solved

URL to pass image name to a web page

Posted on 2014-09-16
2
155 Views
Last Modified: 2014-09-16
I know we can open an image in a browser: http://www.mysite.com/imagename.jpg

I need to add some style(size) to the image. I'm thinking that if I could pass the name of the jpg in the url I could create a webpage containing the style. For example something like: http://www.mysite.com/imagewrapper.html?imagename.jpg

In the imagewrapper.html page I would need to collect the imagename , add some style to it like style="width:250px;"

The idea is that no matter what the original size of the image or the size of the browser window is the image will always display with a width of 250 pixels.

Any suggestions?
0
Comment
Question by:garysamuels
2 Comments
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 250 total points
ID: 40325789
I am not at all sure I understand what you are trying to do. If you want am image to render at a specific size you simply apply the style in the page where it resides.

Cd&
0
 
LVL 32

Accepted Solution

by:
Big Monty earned 250 total points
ID: 40325804
I think you're better off displaying the image in a modal dialog box rather than a brand new page. jquery offers several options, I particularly like LightView the best as it's easy to customize and the docs are pretty decent. ColorBox is also a good option for a simpler approach
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now